DHIS2 User Guide Manual En

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 540 [warning: Documents this large are best viewed by clicking the View PDF Link!]

DHIS2 User guide
2.30
ii
© 2006-2017
DHIS2 Documentation Team
Revision HEAD@a85285c
2018-03-13 20:54:47
Version 2.30
Warranty: THIS DOCUMENT IS PROVIDED BY THE AUTHORS ''AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS MANUAL AND PRODUCTS MENTIONED HEREIN, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
License: Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or any
later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is
included in the source of this documentation, and is available here online: http://
www.gnu.org/licenses/fdl.html.
-->
DHIS2 User guide Contents
iii
Table of Contents
About this guide .................................................................................................................. xix
1. Getting started - help to navigate the user guide ............................................................. 1
2. What is DHIS2? .................................................................................................................. 5
2.1. DHIS2 Background ................................................................................................... 5
2.2. Key features and purpose of DHIS2 ........................................................................ 5
2.3. Use of DHIS2 in HIS: data collection, processing, interpretation, and analysis. ....... 6
2.4. Technical background .............................................................................................. 7
2.4.1. DHIS2 as a platform ..................................................................................... 7
2.4.2. Understanding platform independence ......................................................... 8
2.4.3. Deployment strategies - online vs offline ..................................................... 8
2.4.3.1. Offline Deployment ............................................................................. 8
2.4.3.2. Online deployment ............................................................................. 9
2.4.3.3. Hybrid deployment ........................................................................... 10
2.4.3.4. Server hosting .................................................................................. 10
2.5. Difference between Aggregated and Patient data in a HIS ................................... 12
2.6. Free and Open Source Software (FOSS): benefits and challenges ......................... 12
3. Managing dashboards ...................................................................................................... 15
3.1. About dashboards .................................................................................................. 15
3.2. Dashboard and control bar ................................................................................... 15
3.2.1. Searching in the list of dashboards ............................................................ 16
3.2.2. Customizing the height of the control bar .................................................. 16
3.3. Creating a dashboard ............................................................................................ 16
3.3.1. Adding items to the dashboard .................................................................. 16
3.3.1.1. Spacer items .................................................................................... 17
3.3.2. Removing items .......................................................................................... 18
3.3.3. Saving the dashboard ................................................................................. 18
3.4. Editing an existing dashboard ............................................................................... 19
3.4.1. Translating dashboard title and description ............................................... 19
3.4.2. Deleting a dashboard .................................................................................. 19
3.5. Viewing a dashboard ............................................................................................. 20
3.5.1. Starred dashboards ..................................................................................... 20
3.5.2. Filtering a dashboard .................................................................................. 20
3.5.3. Dashboard items with charts, pivot tables and maps ................................. 20
3.5.3.1. Switching between visualizations ..................................................... 20
3.5.4. Interpretations ............................................................................................. 21
3.5.5. Sharing a dashboard ................................................................................... 21
4. Messaging ........................................................................................................................ 23
4.1. About messages and feedback messages ............................................................. 23
4.2. Create a message ................................................................................................. 24
4.3. Read a message .................................................................................................... 24
4.4. Create a feedback message .................................................................................. 24
4.5. Manage feedback messages ................................................................................. 25
4.6. Configure feedback message function .................................................................. 26
5. Using the Data Entry app ................................................................................................ 27
5.1. About the Data Entry app ..................................................................................... 27
5.2. Enter data in a data entry form ............................................................................ 27
5.3. Mark a data value for follow-up ............................................................................ 29
5.4. Edit data values in a completed data entry form .................................................. 29
5.5. Display a data value's history ............................................................................... 30
5.6. Display a data value's audit trail .......................................................................... 30
5.7. Create minimum maximum value range manually ............................................... 31
5.8. Enter data offline ................................................................................................... 31
5.9. Enable multi-organisation unit data entry ............................................................. 32
5.10. See also ............................................................................................................... 33
DHIS2 User guide Contents
iv
6. Using the Event Capture app .......................................................................................... 35
6.1. About the Event Capture app ............................................................................... 35
6.2. Register an event .................................................................................................. 36
6.3. Edit an event ......................................................................................................... 36
6.4. Edit events in grid ................................................................................................. 37
6.5. Share events in edit mode .................................................................................... 37
6.6. View an event audit history .................................................................................. 37
6.7. Delete an event ..................................................................................................... 37
6.8. Modify an event list's layout ................................................................................. 38
6.9. Print an event list .................................................................................................. 38
6.10. Download an event list ....................................................................................... 38
7. Using the Tracker Capture app ........................................................................................ 39
7.1. About the Tracker Capture app ............................................................................. 39
7.2. About tracked entity instance (TEI) dashboards ................................................... 40
7.3. Workflow ................................................................................................................ 40
7.4. Create a TEI and enroll it in a program ................................................................ 41
7.5. Open an existing TEI dashboard ........................................................................... 42
7.5.1. Lists ............................................................................................................. 42
7.5.2. Search ......................................................................................................... 44
7.6. Enroll an existing TEI in a program ....................................................................... 45
7.7. Enter event data for a TEI .................................................................................... 45
7.7.1. Widgets for data entry ................................................................................ 45
7.7.1.1. ........................................................................................................... 45
7.7.2. Creating an event ....................................................................................... 46
7.7.3. Schedule an event ...................................................................................... 46
7.7.4. Refer an event ............................................................................................ 46
7.7.5. Compare events .......................................................................................... 47
7.8. Manage a TEI's enrollments .................................................................................. 47
7.8.1. Deactivate a TEI's enrollment ..................................................................... 47
7.8.2. Activate a TEI's enrollment ......................................................................... 47
7.8.3. Mark TEI's enrollment as complete ............................................................. 47
7.8.4. Reopen completed enrollment .................................................................... 48
7.8.5. Display TEI's enrollment history ................................................................. 48
7.8.6. Create a TEI enrollment note ..................................................................... 48
7.9. Send a message to a TEI ...................................................................................... 48
7.10. Mark a TEI for follow-up ...................................................................................... 48
7.11. Edit a TEI's profile ............................................................................................... 48
7.12. Add a relationship to a TEI .................................................................................. 49
7.13. Share a TEI dashboard ........................................................................................ 49
7.14. Deactivate a TEI .................................................................................................. 49
7.15. Activate a TEI ...................................................................................................... 50
7.16. Delete a TEI ......................................................................................................... 50
7.17. Configure the TEI dashboard ............................................................................... 50
7.17.1. Show or hide widgets ............................................................................... 50
7.17.2. Save the dashboard's layout as default .................................................... 50
7.17.3. Lock dashboard's layout ........................................................................... 50
7.17.4. Top bar ...................................................................................................... 51
7.18. Create reports ..................................................................................................... 51
8. Analyze data in pivot tables ............................................................................................ 53
8.1. About the Pivot Table app ..................................................................................... 53
8.2. Create a pivot table .............................................................................................. 53
8.2.1. Select dimension items ............................................................................... 54
8.2.2. Modify pivot table layout ............................................................................ 56
8.3. Change the display of your pivot table ................................................................. 57
8.4. Manage favorites ................................................................................................... 60
8.4.1. Open a favorite ........................................................................................... 61
8.4.2. Save a favorite ........................................................................................... 61
DHIS2 User guide Contents
v
8.4.3. Rename a favorite ...................................................................................... 61
8.4.4. Write an interpretation for a favorite ......................................................... 61
8.4.5. Create a link to a favorite .......................................................................... 61
8.4.6. Delete a favorite ......................................................................................... 61
8.4.7. View interpretations based on relative periods .......................................... 61
8.5. Download data from a pivot table ........................................................................ 62
8.5.1. Download table layout data format ............................................................ 62
8.5.2. Download plain data source format ............................................................ 62
8.5.3. Download a CSV format without rendering data in the web browser .......... 63
8.6. Embed a pivot table in an external web page ...................................................... 63
8.7. Visualize pivot table data as a chart or a map ..................................................... 64
8.7.1. Open a pivot table as a chart ..................................................................... 64
8.7.2. Open a pivot table selection as a chart ...................................................... 64
8.7.3. Open a pivot table as a map ...................................................................... 64
8.7.4. Open a pivot table selection as a map ....................................................... 64
9. Using the Data Visualizer app ......................................................................................... 65
9.1. About the Data Visualizer app .............................................................................. 65
9.2. Create a chart ....................................................................................................... 65
9.3. Select a chart type ................................................................................................ 66
9.4. Select dimension items ......................................................................................... 66
9.4.1. Select indicators ......................................................................................... 67
9.4.2. Select data elements .................................................................................. 67
9.4.3. Select reporting rates ................................................................................. 67
9.4.4. Select fixed and relative periods ................................................................ 67
9.4.5. Select organisation units ............................................................................ 68
9.4.6. Select additional dimension items .............................................................. 68
9.5. Select series, category and filter .......................................................................... 69
9.6. Change the display of your chart .......................................................................... 70
9.7. Manage favorites ................................................................................................... 72
9.7.1. Open a favorite ........................................................................................... 72
9.7.2. Save a favorite ........................................................................................... 72
9.7.3. Rename a favorite ...................................................................................... 73
9.7.4. Write an interpretation for a favorite ......................................................... 73
9.7.5. Create a link to a favorite .......................................................................... 73
9.7.6. Delete a favorite ......................................................................................... 73
9.7.7. View interpretations based on relative periods .......................................... 73
9.8. Download a chart as an image or a PDF ............................................................... 73
9.9. Download chart data source ................................................................................. 74
9.10. Embed charts in any web page .......................................................................... 75
9.11. Open a chart as a pivot table or as a map ......................................................... 75
10. Using the GIS app .......................................................................................................... 77
10.1. About the GIS app ............................................................................................... 77
10.2. Create a new thematic map ................................................................................ 77
10.3. Manage event layers ........................................................................................... 78
10.3.1. Create or modify event layer .................................................................... 78
10.3.2. Turn off cluster ......................................................................................... 79
10.3.3. Modify cluster style ................................................................................... 80
10.3.4. Modify information in event pop-up windows ........................................... 80
10.3.5. Clear event layer ...................................................................................... 80
10.4. Manage facility layers ......................................................................................... 80
10.4.1. Create or modify a facility layer ............................................................... 81
10.4.2. Search for an organisation unit ................................................................ 81
10.4.3. Clear facility layer ..................................................................................... 81
10.5. Manage facilities in a layer ................................................................................. 81
10.5.1. Relocate a facility ..................................................................................... 82
10.5.2. Swap longitude and latitude of a facility .................................................. 82
10.5.3. Display facility information ....................................................................... 82
DHIS2 User guide Contents
vi
10.6. Manage thematic layers 1- 4 .............................................................................. 82
10.6.1. Create or modify a thematic layer ............................................................ 83
10.6.2. Filter values in a thematic layer ............................................................... 83
10.6.3. Search for an organisation unit ................................................................ 84
10.6.4. Navigate between organisation hierarchies .............................................. 84
10.6.5. Clear thematic layer ................................................................................. 84
10.7. Manage boundary layers ..................................................................................... 84
10.7.1. Create or modify boundary layers ............................................................ 85
10.7.2. Search for organisation units .................................................................... 85
10.7.3. Navigate between organisation hierarchies .............................................. 85
10.7.4. Clear boundary layer ................................................................................ 85
10.8. Manage Earth Engine layer ................................................................................. 86
10.8.1. Create or modify an Earth Engine layer ................................................... 86
10.9. Add external map layers ..................................................................................... 87
10.10. Manage map favorites ....................................................................................... 89
10.10.1. Save a map as a favorite ....................................................................... 89
10.10.2. Open a favorite ....................................................................................... 89
10.10.3. Rename a favorite .................................................................................. 89
10.10.4. Overwrite a favorite ................................................................................ 90
10.10.5. Share a map interpretation .................................................................... 90
10.10.6. Modify sharing settings for a favorite ..................................................... 90
10.10.7. Delete a favorite ..................................................................................... 91
10.11. Save a map as an image .................................................................................. 91
10.12. Embed a map in an external web page ............................................................ 91
10.13. Search for a location ......................................................................................... 91
10.14. Measure distances and areas in a map ............................................................ 92
10.15. Get the latitude and longitude at any location ................................................. 92
10.16. View a map as a pivot table or chart ................................................................ 92
10.16.1. Open a map as a chart ........................................................................... 92
10.16.2. Open a map as a pivot table .................................................................. 92
10.17. See also ............................................................................................................. 92
11. Using the Maps app ....................................................................................................... 93
11.1. About the Maps app ............................................................................................ 93
11.2. Create a new map ............................................................................................... 95
11.3. Manage event layers ........................................................................................... 95
11.3.1. Create an event layer ............................................................................... 96
11.3.2. Modify an event layer ............................................................................... 99
11.3.3. Modify information in event pop-up windows ........................................... 99
11.3.4. Clear event layer .................................................................................... 100
11.4. Manage facility layers ....................................................................................... 100
11.4.1. Create a facility layer ............................................................................. 101
11.4.2. Create or modify a facility layer ............................................................. 102
11.4.3. Filter values in a facility layer ................................................................ 102
11.4.4. Search for a facility ................................................................................ 103
11.4.5. Remove facility layer .............................................................................. 103
11.4.6. Manage facilities in a layer ..................................................................... 103
11.4.6.1. Relocate a facility ......................................................................... 104
11.4.6.2. Swap longitude and latitude of a facility ...................................... 104
11.4.6.3. Display facility information ........................................................... 104
11.5. Manage thematic layers .................................................................................... 104
11.5.1. Create a thematic layer .......................................................................... 106
11.5.2. Modify a thematic layer .......................................................................... 107
11.5.3. Filter values in a thematic layer ............................................................. 108
11.5.4. Search for an organisation unit .............................................................. 109
11.5.5. Navigate between organisation hierarchies ............................................ 109
11.5.6. Remove thematic layer ........................................................................... 109
11.6. Manage boundary layers ................................................................................... 109
DHIS2 User guide Contents
vii
11.6.1. Create a boundary layer ......................................................................... 110
11.6.2. Modify a boundary layer ......................................................................... 111
11.6.3. Filter values in a boundary layer ............................................................ 112
11.6.4. Search for an organisational unit ............................................................ 112
11.6.5. Navigate between organisation hierarchies ............................................ 112
11.6.6. Remove boundary layer .......................................................................... 113
11.7. Manage Earth Engine layer ............................................................................... 113
11.7.1. Create an Earth Engine layer ................................................................. 114
11.8. Add external map layers ................................................................................... 114
11.9. Manage map favorites ....................................................................................... 115
11.9.1. Open a favorite ....................................................................................... 115
11.9.2. Save a map as a new favorite ................................................................ 116
11.9.3. Overwrite the current favorite ................................................................ 116
11.9.4. Rename a favorite .................................................................................. 116
11.9.5. Delete a favorite ..................................................................................... 117
11.9.6. Modify sharing settings for a favorite ..................................................... 117
11.9.7. Share a map interpretation .................................................................... 117
11.10. Save a map as an image ................................................................................ 118
11.11. Search for a location ....................................................................................... 118
11.12. Measure distances and areas in a map ........................................................... 118
11.13. Get the latitude and longitude at any location ............................................... 119
11.14. See also ........................................................................................................... 119
12. Using the Event Reports app ....................................................................................... 121
12.1. About the Event Reports app ............................................................................ 121
12.2. Create an event report ...................................................................................... 121
12.3. Select dimension items ..................................................................................... 122
12.4. Select series, category and filter ...................................................................... 123
12.5. Change the display of your table ...................................................................... 123
12.6. Download chart data source ............................................................................. 125
12.7. Manage favorites ............................................................................................... 125
12.7.1. Open a favorite ....................................................................................... 125
12.7.2. Save a favorite ........................................................................................ 126
12.7.3. Rename a favorite .................................................................................. 126
12.7.4. Write an interpretation for a favorite ...................................................... 126
12.7.5. Create a link to a favorite ...................................................................... 126
12.7.6. Delete a favorite ..................................................................................... 126
12.7.7. View interpretations based on relative periods ...................................... 126
12.8. Visualize an event report as a chart ................................................................. 127
13. Using the Event Visualizer app .................................................................................... 129
13.1. About the Event Visualizer app ......................................................................... 129
13.2. Create a chart ................................................................................................... 129
13.3. Select a chart type ............................................................................................ 129
13.4. Select dimension items ..................................................................................... 130
13.5. Select series, category and filter ...................................................................... 132
13.6. Change the display of your chart ...................................................................... 132
13.7. Download a chart as an image or a PDF ........................................................... 134
13.8. Download chart data source ............................................................................. 134
13.9. Manage favorites ............................................................................................... 135
13.9.1. Open a favorite ....................................................................................... 135
13.9.2. Save a favorite ........................................................................................ 135
13.9.3. Rename a favorite .................................................................................. 135
13.9.4. Write an interpretation for a favorite ...................................................... 135
13.9.5. Create a link to a favorite ...................................................................... 136
13.9.6. Delete a favorite ..................................................................................... 136
13.9.7. View interpretations based on relative periods ...................................... 136
13.10. Visualize a chart as a pivot table .................................................................... 136
14. Control data quality ..................................................................................................... 137
DHIS2 User guide Contents
viii
14.1. About data quality checks ................................................................................. 137
14.2. Validation rule analysis ..................................................................................... 137
14.2.1. About validation rule analysis ................................................................. 137
14.2.2. Workflow ................................................................................................. 138
14.2.3. Schedule a validation rule analysis to run automatically ........................ 138
14.2.4. Run a validation rule analysis manually ................................................. 139
14.2.5. See also .................................................................................................. 140
14.3. Standard deviation outlier analysis ................................................................... 140
14.3.1. About standard deviation outlier analysis ............................................... 140
14.3.2. Run a standard deviation outlier analysis ............................................... 140
14.3.3. Modify a standard deviation outlier value .............................................. 141
14.4. Minimum maximum outlier analysis .................................................................. 142
14.4.1. About minimum maximum value based outlier analysis ......................... 142
14.4.2. Workflow ................................................................................................. 142
14.4.3. Configure a minimum maximum outlier analysis .................................... 142
14.4.3.1. Create minimum maximum value range automatically ................ 142
14.4.3.2. Create minimum maximum value range manually ....................... 143
14.4.3.3. Delete minimum maximum value range ...................................... 143
14.4.4. Run a minimum maximum outlier analysis ............................................. 144
14.5. Follow-up analysis ............................................................................................. 145
14.5.1. About follow-up analysis ......................................................................... 145
14.5.2. Create list of data values marked for follow-up ...................................... 145
15. Data approval .............................................................................................................. 147
15.1. Approving and accepting ................................................................................... 147
15.2. Authorities for approving data .......................................................................... 148
15.3. Configuring data approval ................................................................................. 148
15.4. Data visibility ..................................................................................................... 149
15.5. Approving data .................................................................................................. 150
15.6. Approving by category option group set ........................................................... 150
15.6.1. Approving by one category option group set .......................................... 150
15.6.2. Approving by multiple category option group sets ................................. 151
16. Using reporting functionality ........................................................................................ 153
16.1. Reporting functionality in DHIS2 ....................................................................... 153
16.2. Using standard reports ...................................................................................... 153
16.3. Using dataset reports ........................................................................................ 154
16.4. Using resources ................................................................................................. 155
16.5. Using reporting rate summary .......................................................................... 155
16.6. Using organisation unit distribution reports ...................................................... 156
16.7. Generate analytics tables .................................................................................. 157
17. Set user account preferences ...................................................................................... 159
18. Manage users, user roles and user groups .................................................................. 161
18.1. About user management ................................................................................... 161
18.1.1. About users ............................................................................................. 162
18.1.2. About user roles ...................................................................................... 162
18.1.3. About user groups .................................................................................. 163
18.2. Workflow ............................................................................................................ 163
18.3. Manage users .................................................................................................... 163
18.3.1. Create a user .......................................................................................... 163
18.3.2. Edit user objects ..................................................................................... 166
18.3.3. Disable users ........................................................................................... 167
18.3.4. Display a user's profile ........................................................................... 167
18.3.5. View users by organisation unit .............................................................. 167
18.3.6. Assign search organisation units to users .............................................. 167
18.3.7. Delete current user ................................................................................. 167
18.3.8. Clone users ............................................................................................. 167
18.3.9. Change user password ............................................................................ 168
18.3.10. Delete user objects ............................................................................... 168
DHIS2 User guide Contents
ix
18.3.11. Display details of user objects .............................................................. 168
18.4. Manage user roles ............................................................................................. 169
18.4.1. Create a user role ................................................................................... 169
18.4.2. Edit user objects ..................................................................................... 169
18.4.3. Delete user objects ................................................................................. 170
18.4.4. Display details of user objects ................................................................ 170
18.4.5. Change sharing settings for user objects ............................................... 170
18.5. Manage user groups .......................................................................................... 170
18.5.1. Create a user group ................................................................................ 170
18.5.2. Join user groups ...................................................................................... 170
18.5.3. Leave user groups .................................................................................. 170
18.5.4. Edit user objects ..................................................................................... 170
18.5.5. Delete user objects ................................................................................. 171
18.5.6. Display details of user objects ................................................................ 171
18.5.7. Change sharing settings for user objects ............................................... 171
18.6. Enable support for OpenID ................................................................................ 171
18.7. Decentralize user management ........................................................................ 171
18.8. Example: user management in a health system ............................................... 172
19. Visualize usage statistics ............................................................................................. 175
19.1. About the Usage Analytics app ......................................................................... 175
19.2. Create a usage analytics graph ........................................................................ 175
20. Configure metadata ..................................................................................................... 177
20.1. About the Maintenance app .............................................................................. 177
20.2. Manage categories ............................................................................................ 177
20.2.1. About categories ..................................................................................... 177
20.2.2. Workflow ................................................................................................. 178
20.2.3. Create or edit a category option ............................................................ 178
20.2.4. Create or edit a category ....................................................................... 179
20.2.5. Create or edit a category combination ................................................... 179
20.2.6. Create or edit a category option group .................................................. 180
20.2.7. Create or edit a category option group set ............................................ 180
20.2.8. Use category combinations for data sets ............................................... 180
20.2.9. Assign a code to a category option combination .................................... 181
20.2.10. Clone metadata objects ........................................................................ 181
20.2.11. Change sharing settings for metadata objects ..................................... 182
20.2.12. Delete metadata objects ....................................................................... 182
20.2.13. Display details of metadata objects ...................................................... 182
20.2.14. Translate metadata objects .................................................................. 183
20.3. Manage data elements ...................................................................................... 183
20.3.1. About data elements .............................................................................. 183
20.3.2. Workflow ................................................................................................. 183
20.3.3. Create or edit a data element ................................................................ 184
20.3.4. Create or edit a data element group ...................................................... 187
20.3.5. Create or edit a data element group set ................................................ 187
20.3.6. Clone metadata objects .......................................................................... 188
20.3.7. Change sharing settings for metadata objects ....................................... 188
20.3.8. Delete metadata objects ......................................................................... 189
20.3.9. Display details of metadata objects ........................................................ 189
20.3.10. Translate metadata objects .................................................................. 189
20.4. Manage data sets and data entry forms ........................................................... 189
20.4.1. About data sets and data entry forms .................................................... 189
20.4.2. Workflow ................................................................................................. 191
20.4.3. Create or edit a data set ........................................................................ 192
20.4.4. Create or edit Data set Notification ........................................................ 194
20.4.4.1. What to send? .............................................................................. 194
20.4.4.2. When to send? ............................................................................. 195
20.4.4.3. Who to send? ............................................................................... 195
DHIS2 User guide Contents
x
20.4.5. Override data elements' category combinations in a data set ................ 196
20.4.6. Edit compulsory data elements in a data set ......................................... 196
20.4.7. Download default data forms in PDF format ........................................... 196
20.4.8. Manage section forms ............................................................................. 196
20.4.8.1. Create a section form .................................................................. 196
20.4.8.2. Edit a section form ....................................................................... 198
20.4.8.3. Manage grey fields in a section form ........................................... 198
20.4.8.4. Change section display order in a section form ........................... 199
20.4.8.5. Delete a section in a section form ............................................... 199
20.4.8.6. Translate a section in a section form ........................................... 200
20.4.9. Manage custom forms ............................................................................ 200
20.4.9.1. Create a custom form .................................................................. 200
20.4.9.2. Scripting in custom forms ............................................................ 201
20.4.10. Change sharing settings for metadata objects ..................................... 202
20.4.11. Delete metadata objects ....................................................................... 203
20.4.12. Display details of metadata objects ...................................................... 203
20.4.13. Translate metadata objects .................................................................. 203
20.5. Manage indicators ............................................................................................. 204
20.5.1. About indicators ...................................................................................... 204
20.5.2. Workflow ................................................................................................. 206
20.5.3. Create or edit an indicator type ............................................................. 206
20.5.4. Create or edit an indicator ..................................................................... 207
20.5.5. Create or edit an indicator group ........................................................... 209
20.5.6. Create or edit an indicator group set ..................................................... 210
20.5.7. Clone metadata objects .......................................................................... 210
20.5.8. Change sharing settings for metadata objects ....................................... 211
20.5.9. Delete metadata objects ......................................................................... 211
20.5.10. Display details of metadata objects ...................................................... 211
20.5.11. Translate metadata objects .................................................................. 212
20.6. Manage organisation units ................................................................................ 212
20.6.1. About organisation units ......................................................................... 212
20.6.2. Workflow ................................................................................................. 213
20.6.3. Create or edit an organisation unit ......................................................... 214
20.6.4. Create or edit an organisation unit group .............................................. 215
20.6.5. Create or edit an organisation unit group set ......................................... 216
20.6.6. Assign names to organisation unit levels ............................................... 218
20.6.7. Move organisation units within a hierarchy ............................................ 219
20.6.8. Close an organisation unit ...................................................................... 219
20.6.9. Clone metadata objects .......................................................................... 219
20.6.10. Change sharing settings for metadata objects ..................................... 219
20.6.11. Delete metadata objects ....................................................................... 220
20.6.12. Display details of metadata objects ...................................................... 220
20.6.13. Translate metadata objects .................................................................. 220
20.7. [Work in progress] Manage validation rules ...................................................... 221
20.7.1. About validation rules ............................................................................. 221
20.7.1.1. About sliding windows .................................................................. 221
20.7.1.2. About validation rule groups ........................................................ 222
20.7.1.3. About validation notifications ....................................................... 222
20.7.2. Create or edit a validation rule ............................................................... 222
20.7.3. Create or edit a validation rule group .................................................... 224
20.7.4. Create or edit a validation notification ................................................... 224
20.7.5. Clone metadata objects .......................................................................... 225
20.7.6. Change sharing settings for metadata objects ....................................... 225
20.7.7. Delete metadata objects ......................................................................... 226
20.7.8. Display details of metadata objects ........................................................ 226
20.7.9. Translate metadata objects .................................................................... 226
20.8. Manage attributes ............................................................................................. 226
DHIS2 User guide Contents
xi
20.8.1. About attributes ...................................................................................... 226
20.8.2. Create or edit an attribute ...................................................................... 227
20.8.3. Clone metadata objects .......................................................................... 227
20.8.4. Delete metadata objects ......................................................................... 228
20.8.5. Display details of metadata objects ........................................................ 228
20.8.6. Translate metadata objects .................................................................... 228
20.9. Manage constants ............................................................................................. 229
20.9.1. About constants ...................................................................................... 229
20.9.2. Create or edit a constant ........................................................................ 229
20.9.3. Clone metadata objects .......................................................................... 229
20.9.4. Change sharing settings for metadata objects ....................................... 230
20.9.5. Delete metadata objects ......................................................................... 230
20.9.6. Display details of metadata objects ........................................................ 230
20.9.7. Translate metadata objects .................................................................... 231
20.10. Manage option sets ......................................................................................... 231
20.10.1. About option sets .................................................................................. 231
20.10.2. Create or edit an option set ................................................................. 232
20.10.3. Clone metadata objects ........................................................................ 232
20.10.4. Change sharing settings for metadata objects ..................................... 232
20.10.5. Delete metadata objects ....................................................................... 233
20.10.6. Display details of metadata objects ...................................................... 233
20.10.7. Translate metadata objects .................................................................. 233
20.11. Manage legends .............................................................................................. 234
20.11.1. About legends ....................................................................................... 234
20.11.2. Create or edit a legend ........................................................................ 234
20.11.3. Clone metadata objects ........................................................................ 235
20.11.4. Change sharing settings for metadata objects ..................................... 235
20.11.5. Delete metadata objects ....................................................................... 236
20.11.6. Display details of metadata objects ...................................................... 236
20.11.7. Translate metadata objects .................................................................. 236
20.11.8. Assign a legend to indicator or data element ....................................... 236
20.11.9. See also ................................................................................................ 236
20.12. Manage predictors ........................................................................................... 237
20.12.1. About predictors ................................................................................... 237
20.12.2. Sampling past periods .......................................................................... 237
20.12.2.1. Sequential sample count ............................................................ 237
20.12.2.2. Sequential skip count ................................................................. 238
20.12.2.3. Annual sample count .................................................................. 238
20.12.2.4. Sequential and annual sample counts together ......................... 238
20.12.2.5. Sequential, annual, and skip sample counts together ................ 239
20.12.2.6. Sample skip test ......................................................................... 239
20.12.3. Create or edit a predictor ..................................................................... 240
20.12.4. Clone metadata objects ........................................................................ 242
20.12.5. Delete metadata objects ....................................................................... 243
20.12.6. Display details of metadata objects ...................................................... 243
20.12.7. Translate metadata objects .................................................................. 243
20.13. Manage push reports ....................................................................................... 243
20.13.1. About push reports ............................................................................... 243
20.13.2. Create or edit a push report ................................................................. 245
20.13.3. Preview push reports ............................................................................ 246
20.13.4. Run push report jobs ............................................................................ 246
20.13.5. Clone metadata objects ........................................................................ 246
20.13.6. Delete metadata objects ....................................................................... 246
20.13.7. Display details of metadata objects ...................................................... 247
20.13.8. Translate metadata objects .................................................................. 247
20.14. Manage external map layers ........................................................................... 247
20.14.1. About external map layers ................................................................... 247
DHIS2 User guide Contents
xii
20.14.2. Create or edit an external map layer ................................................... 247
20.14.3. Clone metadata objects ........................................................................ 249
20.14.4. Delete metadata objects ....................................................................... 249
20.14.5. Display details of metadata objects ...................................................... 249
20.14.6. Translate metadata objects .................................................................. 249
20.15. Edit multiple object groups at once ................................................................ 250
20.15.1. Edit multiple objects in an object group ............................................... 250
20.15.2. Edit an object in multiple object groups ............................................... 250
21. Configure programs in the Maintenance app .............................................................. 253
21.1. About programs ................................................................................................. 253
21.2. Configure event programs in the Maintenance app .......................................... 255
21.2.1. About event programs ............................................................................ 255
21.2.2. Workflow: Create an event program ....................................................... 256
21.2.3. Create or edit an event program ............................................................ 256
21.2.3.1. Enter event program details ........................................................ 256
21.2.3.2. Assign data elements ................................................................... 257
21.2.3.3. Create data entry forms ............................................................... 258
21.2.3.4. Assign organisation units ............................................................. 258
21.2.3.5. Create program notifications ........................................................ 258
21.2.4. Reference information: Program notification parameters ....................... 259
21.3. Configure tracker programs in the Maintenance app ........................................ 260
21.4. Configure program indicators ............................................................................ 260
21.4.1. About program indicators ....................................................................... 260
21.4.2. Create or edit a program indicator ......................................................... 264
21.4.3. Create or edit a program indicator group ............................................... 264
21.4.4. Reference information: Expression and filter examples per value type .. 265
21.4.5. Reference information: Functions, variables and operators to use in
program indicator expressions and filters .......................................................... 266
21.4.5.1. Functions to use in a program indicator expression or filter ......... 266
21.4.5.2. Variables to use in a program indicator expression or filter ......... 267
21.4.5.3. Operators to use in a program indicator filter .............................. 268
21.5. Configure program rules ................................................................................... 269
21.5.1. About program rules ............................................................................... 269
21.5.2. Workflow ................................................................................................. 270
21.5.3. Create or edit a program rule variable ................................................... 270
21.5.4. Create or edit a program rule ................................................................. 272
21.5.5. Example: Program rules .......................................................................... 277
21.5.6. Reference information: Operators and functions to use in program rule
expression ........................................................................................................... 285
21.6. Configure relationship types .............................................................................. 291
21.6.1. About relationship types ......................................................................... 291
21.6.2. Create or edit a relationship type ........................................................... 291
21.7. Configure tracked entities ................................................................................. 291
21.7.1. About tracked entities ............................................................................ 291
21.7.2. Create or edit a tracked entity attribute ................................................ 291
21.7.3. Create or edit a tracked entity type ....................................................... 294
21.8. Configure search ............................................................................................... 294
21.8.1. Configure search for tracker program .................................................... 294
21.8.2. Configure search for tracked entity type ................................................ 295
21.8.3. Configure search organisation units for a user ....................................... 295
21.9. Clone metadata objects .................................................................................... 295
21.10. Delete metadata objects ................................................................................. 296
21.11. Change sharing settings for metadata objects ................................................ 296
21.12. Display details of metadata objects ................................................................ 296
21.13. Translate metadata objects ............................................................................. 297
22. Configure programs in the Programs/Attributes app (legacy app) ............................... 299
22.1. About programs ................................................................................................. 299
DHIS2 User guide Contents
xiii
22.2. Manage programs .............................................................................................. 301
22.2.1. Create a program ................................................................................... 301
22.2.2. Assign a program to organisation units .................................................. 302
22.2.3. Edit programs ......................................................................................... 303
22.2.4. Change sharing settings for programs .................................................... 303
22.2.5. Delete programs ..................................................................................... 303
22.2.6. Display programs .................................................................................... 303
22.2.7. Translate program names ....................................................................... 303
22.3. Manage program stages .................................................................................... 304
22.3.1. About program stages ............................................................................ 304
22.3.2. Create a program stage .......................................................................... 304
22.3.3. Create a program stage section ............................................................. 306
22.3.4. Change program stage sort order .......................................................... 306
22.3.5. Change program stage section sort order .............................................. 306
22.3.6. Edit program stages ............................................................................... 306
22.3.7. Display program stages .......................................................................... 307
22.3.8. Translate program stages ....................................................................... 307
22.4. Manage program notifications ........................................................................... 307
22.4.1. About program notifications ................................................................... 307
22.4.2. Create a program notification ................................................................. 308
22.4.3. Create a program stage notification ....................................................... 310
22.5. Manage custom registration forms .................................................................... 311
22.5.1. About program custom registration forms .............................................. 311
22.5.2. About program stage data entry forms .................................................. 312
22.5.3. Create a custom program registration form ........................................... 312
22.5.4. Create a program stage data entry form ................................................ 312
23. About sharing of objects .............................................................................................. 313
23.1. Sharing of objects ............................................................................................. 313
23.2. Metadata sharing and access control ................................................................ 314
23.3. Metadata sharing applied .................................................................................. 314
23.4. Data sharing and access control ....................................................................... 315
23.4.1. Data sharing for event based programs ................................................. 315
23.4.2. Data sharing for data sets ...................................................................... 316
24. Data Administration ..................................................................................................... 319
24.1. Data integrity .................................................................................................... 319
24.1.1. Data elements without data set ............................................................. 319
24.1.2. Data elements without groups ................................................................ 319
24.1.3. Data elements violating exclusive group sets ........................................ 319
24.1.4. Data elements in data set but not in form or sections ........................... 319
24.1.5. Data elements assigned to data sets with different period types ........... 319
24.1.6. Data sets not assigned to organisation units .......................................... 320
24.1.7. Sections with invalid category combinations .......................................... 320
24.1.8. Indicators with identical formulas ........................................................... 320
24.1.9. Indicators without groups ....................................................................... 320
24.1.10. Invalid indicator numerators ................................................................. 320
24.1.11. Invalid indicator denominators .............................................................. 320
24.1.12. Indicators violating exclusive group sets .............................................. 320
24.1.13. Duplicate periods .................................................................................. 320
24.1.14. Organisation units with cyclic references ............................................. 321
24.1.15. Orphaned organisation units ................................................................. 321
24.1.16. Organisation units without groups ........................................................ 321
24.1.17. Organisation units violating compulsory group sets ............................. 321
24.1.18. Organisation units violating exclusive group sets ................................. 321
24.1.19. Organisation unit groups without group sets ........................................ 321
24.1.20. Validation rules without groups ............................................................ 321
24.1.21. Invalid validation rule left side expressions .......................................... 322
24.1.22. Invalid validation rule right side expressions ........................................ 322
DHIS2 User guide Contents
xiv
24.2. Maintenance ...................................................................................................... 322
24.3. Resource tables ................................................................................................. 323
24.4. Locale Management .......................................................................................... 324
24.5. SQL View ........................................................................................................... 324
24.5.1. Creating a new SQL view ........................................................................ 325
24.5.2. SQL View management ........................................................................... 325
24.6. Duplicate data elimination ................................................................................ 325
24.7. Data statistics .................................................................................................... 326
24.8. Lock exceptions ................................................................................................. 326
24.9. Min-Max Value Generation ................................................................................ 327
24.10. Cache Statistics ............................................................................................... 327
24.11. Scheduling ....................................................................................................... 327
24.11.1. Creating a job ....................................................................................... 328
24.11.2. Configuring a job .................................................................................. 329
24.11.3. Deleting a job ....................................................................................... 329
24.12. Data synchronization ....................................................................................... 329
24.13. Metadata Synchronization Scheduling ............................................................. 330
25. Datastore Manager ...................................................................................................... 333
25.1. Using the Datastore Manager ........................................................................... 333
25.2. Add a new namespace and key to the Datastore Manager ............................... 333
25.3. Add a key to an existing namespace in the Datastore Manager ....................... 333
25.4. Delete a namespace or key from the Datastore Manager ................................. 333
25.5. Search for namespaces or keys ........................................................................ 333
25.6. Search your JSON library ................................................................................... 334
25.7. Edit namespaces or keys in the Datastore Manager ......................................... 334
26. Configure the GIS app ................................................................................................. 335
26.1. Context .............................................................................................................. 335
26.2. Importing coordinates ........................................................................................ 335
27. Configure report functionality ...................................................................................... 339
27.1. Data sources for reporting ................................................................................ 339
27.1.1. Types of data and aggregation ............................................................... 339
27.1.1.1. Terminology .................................................................................. 339
27.1.1.2. Basic rules of aggregation ............................................................ 339
27.1.1.3. Dimensions of aggregation ........................................................... 340
27.1.1.4. Aggregation operators, methods for aggregation ......................... 341
27.1.1.5. Advanced aggregation settings (aggregation levels) ................... 341
27.1.2. Resource tables ...................................................................................... 342
27.1.3. Report tables .......................................................................................... 342
27.2. How to create report tables .............................................................................. 342
27.2.1. General options ....................................................................................... 343
27.2.2. Selecting data ......................................................................................... 344
27.2.3. Selecting report parameters ................................................................... 344
27.2.4. Data element dimension tables .............................................................. 346
27.2.5. Report table - best practices .................................................................. 347
27.3. Report table outcome ........................................................................................ 348
27.4. Standard reports ................................................................................................ 349
27.4.1. What is a standard report? ..................................................................... 349
27.4.2. Designing Standard reports in iReport .................................................... 349
27.4.2.1. Download and open the design file .............................................. 349
27.4.2.2. Editing the report ......................................................................... 350
27.4.2.3. Text .............................................................................................. 351
27.4.2.4. Filtering the table rows ................................................................ 353
27.4.2.5. Sorting .......................................................................................... 355
27.4.2.6. Changing indicator/data element names ...................................... 357
27.4.2.7. Adding horizontal totals ............................................................... 359
27.4.2.8. Groups of tables ........................................................................... 359
27.4.2.9. Charts ........................................................................................... 363
DHIS2 User guide Contents
xv
27.4.2.10. Adding the Report to DHIS2 ....................................................... 376
27.4.2.11. Some final guidelines ................................................................. 377
27.4.3. Designing SQL based standard reports ................................................... 377
27.4.4. Designing HTML based standard reports ................................................ 378
28. Import and export data and metadata ........................................................................ 381
28.1. Meta-data import ............................................................................................... 381
28.1.1. Meta-data import .................................................................................... 381
28.1.1.1. Dry run before importing ............................................................. 382
28.1.1.2. Matching identifiers in DXF2 ........................................................ 384
28.1.2. Import CSV meta-data ............................................................................ 384
28.1.3. GML data import ..................................................................................... 384
28.2. Import data ........................................................................................................ 384
28.2.1. XML data import ..................................................................................... 384
28.2.2. Import CSV data ..................................................................................... 384
28.2.3. Event data import ................................................................................... 385
28.2.4. Import PDF data ...................................................................................... 385
28.2.5. Import data from DHIS2 1.4 ................................................................... 385
28.2.5.1. DHIS2 1.4 File (database) Import ................................................. 385
28.2.5.2. DHIS2 1.4 XML Import .................................................................. 386
28.2.5.3. Limitations to DHIS2 1.4 imports ................................................. 387
28.3. Export data and meta-data ............................................................................... 387
28.3.1. Metadata export ...................................................................................... 387
28.3.2. Metadata export with dependencies ....................................................... 388
28.3.3. Data export ............................................................................................. 390
28.3.4. Event data export ................................................................................... 391
28.3.5. Export data to other systems ................................................................. 392
28.3.5.1. DHIS2 1.4 Meta-data export ......................................................... 392
28.3.5.2. DHIS2 1.4 Detailed Metadata Export ............................................ 392
28.3.5.3. DHIS2 1.4 Data export ................................................................. 393
28.3.5.4. XLS metadata export .................................................................... 393
29. Configure metadata synchronizing .............................................................................. 395
29.1. About data and metadata synchronization ....................................................... 395
29.2. Workflow ............................................................................................................ 396
29.3. Configure metadata versioning on central instance .......................................... 396
29.4. Connect local instance to central instance ........................................................ 397
29.5. Configure automatic metadata synchronization on local instance .................... 397
29.6. Create a new metadata version manually on central or local instance ............. 398
29.7. Reference information: metadata synchronization configuration parameters ... 400
30. Mobile ........................................................................................................................... 403
30.1. DHIS2 Mobile Introduction ................................................................................. 403
30.2. Mobile browser based data entry ...................................................................... 404
30.2.1. Getting started with mobile browser data entry ..................................... 404
30.3. J2ME GPRS/3G Client ......................................................................................... 432
30.3.1. Data connection availability .................................................................... 432
30.3.2. J2ME GPRS 3G facility reporting client .................................................... 433
30.3.3. Detailed configuration of data sets and reporting forms ........................ 433
30.3.3.1. The mapping of data sets to form layout on the phone ............... 433
30.3.3.2. Sorting of forms ........................................................................... 433
30.3.3.3. Versioning of data sets ................................................................ 434
30.3.3.4. Language support ......................................................................... 434
30.3.4. Mobile application setup ......................................................................... 434
30.3.4.1. Installation and initialization ......................................................... 434
30.3.4.2. Logging in (for regular use) .......................................................... 436
30.3.4.3. Facility Reporting Module ............................................................. 436
30.4. SMS Command .................................................................................................. 442
30.4.1. Set up SMS command ............................................................................. 443
30.4.2. SMS Command Type ............................................................................... 444
DHIS2 User guide Contents
xvi
30.4.2.1. SMS Command for Reporting Data ............................................... 444
30.4.2.2. SMS Command for Entity Enrollment ........................................... 445
30.4.2.3. SMS Command for Program Stage Data Entry ............................. 445
30.4.2.4. SMS Command for Alerting, Registering ...................................... 446
30.4.2.5. SMS Command for Event Registration .......................................... 446
30.5. SMS Service ....................................................................................................... 447
30.5.1. Setting up SMS service ........................................................................... 447
30.5.1.1. Configure SMS Gateway ............................................................... 447
30.5.1.2. Configure GenericHttp Gateway ................................................... 447
30.5.2. Gateway Configurations .......................................................................... 448
31. DHIS2 Tutorials ............................................................................................................ 451
31.1. Create Scorecards using the Pivot Table app .................................................... 451
31.1.1. Create a legend for your scorecard ........................................................ 451
31.1.2. Create a scorecard in the Pivot Table app .............................................. 452
31.1.3. Organise the layout and display of your scorecard ................................. 454
31.1.4. Save and share your scorecard .............................................................. 455
31.2. Working with TextPattern .................................................................................. 456
31.2.1. TextPattern syntax .................................................................................. 456
31.2.2. Designing TextPattern for generating ids ............................................... 458
31.2.3. Understanding TextPattern capacity ....................................................... 459
31.2.3.1. Calculating capacity for generated segments .............................. 459
31.2.4. Random segments and why you should avoid it .................................... 460
31.2.4.1. Generating random values ........................................................... 460
31.2.5. Data entry for TextPattern based metadata ........................................... 460
31.2.5.1. Validation of values using TextPattern ......................................... 460
31.2.5.2. Different data entry flows for TextPattern .................................... 460
32. About demo server, live package and database design .............................................. 463
32.1. Using the DHIS2 demo server ........................................................................... 463
32.2. Using the DHIS2 live package ........................................................................... 463
32.2.1. Starting the DHIS2 Live package ............................................................ 463
32.2.1.1. Prerequisites for DHIS2 Live ......................................................... 463
32.2.1.2. Starting up with a blank database ............................................... 463
32.2.2. Downloading and installing the server version ....................................... 464
32.3. Logging on to DHIS2 ......................................................................................... 464
32.4. Logging out of DHIS2 ........................................................................................ 464
32.5. Quick intro to designing a DHIS2 database ....................................................... 465
32.5.1. The organisational hierarchy .................................................................. 465
32.5.2. Data Elements ......................................................................................... 466
32.5.3. Datasets and data entry forms ............................................................... 467
32.5.3.1. Data entry forms .......................................................................... 467
32.5.4. Validation rules ....................................................................................... 468
32.5.5. Indicators ................................................................................................ 468
32.5.6. Report tables and reports ....................................................................... 468
32.5.7. GIS ........................................................................................................... 469
32.5.8. Charts and dashboard ............................................................................. 469
33. About data dimensions in DHIS2 ................................................................................. 471
33.1. Data dimensions: Core building blocks in DHIS2 ............................................... 471
33.2. Data elements: The What dimension ................................................................ 472
33.2.1. Data element categories ......................................................................... 472
33.2.2. Data element group sets ........................................................................ 473
33.3. The organisation unit dimension ....................................................................... 474
33.3.1. Organisation unit group sets and groups ................................................ 474
33.3.1.1. Inherit the values of an organisation unit group set ..................... 474
33.3.1.2. Alternative organisation unit hierarchies - advanced use of
group sets and groups ................................................................................ 474
33.3.2. Best practice on the use of group sets and groups ................................ 475
33.4. The period dimension in DHIS2 ......................................................................... 475
DHIS2 User guide Contents
xvii
33.4.1. Period types ............................................................................................ 475
33.4.2. Relative periods ...................................................................................... 476
33.4.3. Aggregation of periods ........................................................................... 476
33.4.3.1. Sum and average aggregation along the period dimension ......... 476
33.5. Data collection vs. data analysis ....................................................................... 477
33.5.1. Data collection and storage .................................................................... 477
33.5.2. Input does not equal Output ................................................................... 477
33.6. Extended examples of data elements and forms .............................................. 478
33.7. How this works in pivot tables .......................................................................... 479
33.8. Case study: From paper forms to multidimensional datasets - lessons learned . 483
33.8.1. From tables to category combinations - designing multi-dimensional
data sets ............................................................................................................. 483
33.8.2. Step-by-step approach to designing datasets ......................................... 487
34. DHIS2 Frequently Asked Questions ............................................................................. 489
35. Release and upgrade notes ......................................................................................... 491
A. User authorities .............................................................................................................. 493
B. System settings ............................................................................................................. 501
B.1. General settings .................................................................................................. 501
B.2. Analytics settings ................................................................................................ 502
B.3. Server settings .................................................................................................... 504
B.4. Appearance settings ............................................................................................ 505
B.5. Email settings ...................................................................................................... 507
B.6. Messaging settings .............................................................................................. 507
B.7. Access settings .................................................................................................... 507
B.8. Calendar settings ................................................................................................ 509
B.9. Data import settings ........................................................................................... 510
B.10. Synchronization settings ................................................................................... 510
B.11. OAuth2 clients ................................................................................................... 512
DHIS2 Glossary ................................................................................................................... 513
Bibliography ........................................................................................................................ 517
Index ................................................................................................................................... 519
About this guide
xix
About this guide
The DHIS2 documentation is a collective effort and has been developed by the development
team and users. While the guide strives to be complete, there may be certain functionalities
which have been omitted or which have yet to be documented. This section explains some of
the conventions which are used throughout the document.
DHIS2 is a browser-based application. In many cases, screenshots have been included for
enhanced clarity. Shortcuts to various functionalities are displayed such as Data element >
Data element group. The ">" symbol indicates that you should click Data element and then
click Data element group in the user interface.
Different styles of text have been used to highlight important parts of the text or particular
types of text, such as source code. Each of the conventions used in the document are explained
below.
Note
A note contains additional information which should be considered or a reference to
more information which may be helpful.
Tip
A tip can be a useful piece of advice, such as how to perform a particular task more
efficiently.
Important
Important information should not be ignored, and usually indicates something which is
required by the application.
Caution
Information contained in these sections should be carefully considered, and if not
heeded, could result in unexpected results in analysis, performance, or functionality.
Warning
Information contained in these sections, if not heeded, could result in permanent data
loss or affect the overall usability of the system.
Program listings usually contain some type of computer code.
They will be displayed with a shaded background and a different font.
Commands will be displayed in bold text, and represent a command which would
need to be executed on the operating system or database.
Links to external web sites or cross references will be displayed in blue text, and underlined
like this..
Bibliographic references will displayed in square brackets like this [Store2007]. A full reference
can be found in the bibliography contained at the end of this document.
Getting started - help to navigate the
user guide
1
Chapter 1. Getting started - help to
navigate the user guide
What do you want to do? Link to
documentation
Related app(s)
Enter data Enter aggregate
data
Using the Data Entry
app
Data Entry
Enter data for a
program without
registration (event
program)
Using the Event
Capture app
Event Capture
Enter data for
a program with
registration (tracker
program)
Using the Tracker
Capture app
Tracker Capture
Analyze and
visualize data
Analyze data in a
table
Analyze data in
pivot tables
Pivot Table
Visualize data in a
chart
Using the Data
Visualizer app
Data Visualizer
Visualize data in a
map
Using the GIS app GIS
Visualize data in a
better map
Using the Maps app Maps
Analyze data in two
types of reports.
Using the Event
Reports app
Event Report
Visualize program
data in a chart
Using the Event
Visualizer app
Event Visualizer
Create a dashboard Manage dashboards Dashboard
Control data quality Control data quality Data Quality
Manage users and
authorities
Create or edit users,
user roles or user
groups
Manage users,
user roles and user
groups
Users
Look up all user
authorities
Appendix A. User
authorities
Users
Visualize statistics
about how users
work with the
Dashboard, Pivot
Table, GIS, Event
Visualizer, Data
Visualizer and
Event Reports
apps
Visualize usage
statistics
Usage Analytics
Customize the user
interface
Change your
account preferences
Set user account
preferences
-
Configure metadata Create metadata,
for example
Configure metadata Maintenance
Getting started - help to navigate the
user guide
2
What do you want to do? Link to
documentation
Related app(s)
organisation units
and data elements
Create metadata to
use in an event or a
tracker program
Configure programs
in the Maintenance
app
Maintenance
Configure the
system
Look up all system
settings
Appendix B. System
settings
System Settings
Perform database
maintenance
Data administration Data
Administration
Set up metadata
synchronization
between a central
instance and
multiple local
instances
Configure metadata
synchronization
System Settings
Data
Administration
Configure data
approval
Data approval System Settings
Configure data and
metadata import or
export
Import and export
data and metadata
Import-Export
Learn more about
sharing of objects
About sharing of
objects
-
Import coordinates
and configure the
GIS app
Configure the GIS
app
Manage legends
Manage external
map layers
Maintenance
Set up report
functionality
Configure report
functionality
-
Learn about
event and tracker
programs
Create a program Configure programs
in the Maintenance
app
Configure programs
in the Programs/
Attributes app
(legacy app)
Maintenance
Program
Enter data for
a program with
registration (tracker
program)
Using the Tracker
Capture app
Tracker Capture
Enter data for a
program without
registration (event
program)
Using the Event
Capture app
Event Capture
Visualize data from
a program in a chart
Using the Event
Visualizer app
Event Visualizer
Getting started - help to navigate the
user guide
3
What do you want to do? Link to
documentation
Related app(s)
Analyze data from
a program in two
types of reports
Using the Event
Reports app
Event Report
Learn more about
DHIS2
What is DHIS2? What is DHIS2? -
Learn about
the DHIS2 data
dimensions
Data dimensions in
DHIS2
-
What is DHIS2? DHIS2 Background
5
Chapter 2. What is DHIS2?
After reading this chapter you will be able to understand:
What is DHIS2 and what purpose it serves with respect to health information systems (HIS)?
What are the major technological considerations when it comes to deploying DHIS2, and
what are the options are for extending DHIS2 with new modules?
What is the difference between patient based and aggregate data?
What are some of the benefits and challenges with using Free and Open Source Software
(FOSS) for HIS?
2.1. DHIS2 Background
DHIS2 is a tool for collection, validation, analysis, and presentation of aggregate and patient-
based statistical data, tailored (but not limited) to integrated health information management
activities. It is a generic tool rather than a pre-configured database application, with an open
meta-data model and a flexible user interface that allows the user to design the contents of a
specific information system without the need for programming. DHIS2 is a modular web-based
software package built with free and open source Java frameworks.
DHIS2 is open source software released under the BSD license and can be obtained at no cost.
It runs on any platform with a Java Runtime Environment (JRE 7 or higher) installed.
DHIS2 is developed by the Health Information Systems Programme (HISP) as an open and
globally distributed process with developers currently in India, Vietnam, Tanzania, Ireland, and
Norway. The development is coordinated by the University of Oslo with support from NORAD
and other donors.
The DHIS2 software is used in more than 40 countries in Africa, Asia, and Latin America, and
countries that have adopted DHIS2 as their nation-wide HIS software include Kenya, Tanzania,
Uganda, Rwanda, Ghana, Liberia, and Bangladesh. A rapidly increasing number of countries
and organisations are starting up new deployments.
The documentation provided herewith, will attempt to provide a comprehensive overview of
the application. Given the abstract nature of the application, this manual will not serve as a
complete step-by-step guide of how to use the application in each and every circumstance,
but rather will seek to provide illustrations and examples of how DHIS2 can be implemented
in a variety of situations through generalized examples.
Before implementing DHIS2 in a new setting, we highly recommend reading the DHIS2
Implementation Guide (a separate manual from this one), also available at the main DHIS2
website.
2.2. Key features and purpose of DHIS2
The key features and purpose of DHIS2 can be summarised as follows:
Provide a comprehensive data management solution based on data warehousing principles
and a modular structure which can easily be customised to the different requirements of a
management information system, supporting analysis at different levels of the organisational
hierarchy.
Customisation and local adaptation through the user interface. No programming required to
start using DHIS2 in a new setting (country, region, district etc.).
Provide data entry tools which can either be in the form of standard lists or tables, or can
be customised to replicate paper forms.
What is DHIS2? Use of DHIS2 in HIS: data collection,
processing, interpretation, and analysis.
6
Provide different kinds of tools for data validation and improvement of data quality.
Provide easy to use - one-click reports with charts and tables for selected indicators or
summary reports using the design of the data collection tools. Allow for integration with
popular external report design tools (e.g. JasperReports) to add more custom or advanced
reports.
Flexible and dynamic (on-the-fly) data analysis in the analytics modules (i.e. GIS,
PivotTables,Data Visualizer, Event reports, etc).
A user-specific dashboard for quick access to the relevant monitoring and evaluation tools
including indicator charts and links to favourite reports, maps and other key resources in
the system.
Easy to use user-interfaces for metadata management e.g. for adding/editing datasets or
health facilities. No programming needed to set up the system in a new setting.
Functionality to design and modify calculated indicator formulas.
User management module for passwords, security, and fine-grained access control (user
roles).
Messages can be sent to system users for feedback and notifications. Messages can also be
delivered to email and SMS.
Users can share and discuss their data in charts and reports using Interpretations, enabling
an active information-driven user community.
Functionalities of export-import of data and metadata, supporting synchronisation of offline
installations as well as interoperability with other applications.
Using the DHIS2 Web-API , allow for integration with external software and extension of the
core platform through the use of custom apps.
Further modules can be developed and integrated as per user needs, either as part of
the DHIS2 portal user interface or a more loosely-coupled external application interacting
through the DHIS2 Web-API.
In summary, DHIS2 provides a comprehensive HIS solution for the reporting and analysis needs
of health information users at any level.
2.3. Use of DHIS2 in HIS: data collection, processing, interpretation, and
analysis.
The wider context of HIS can be comprehensively described through the information
cycle presented in Figure 1.1 below. The information cycle pictorially depicts the different
components, stages and processes through which the data is collected, checked for quality,
processed, analysed and used.
Figure2.1.The health information cycle
What is DHIS2? Technical background
7
DHIS2 supports the different facets of the information cycle including:
Collecting data.
Running quality checks.
Data access at multiple levels.
• Reporting.
Making graphs and maps and other forms of analysis.
Enabling comparison across time (for example, previous months) and space (for example,
across facilities and districts).
See trends (displaying data in time series to see their min and max levels).
As a first step, DHIS2 serves as a data collection, recording and compilation tool, and all data
(be it in numbers or text form) can be entered into it. Data entry can be done in lists of data
elements or in customised user defined forms which can be developed to mimic paper based
forms in order to ease the process of data entry.
As a next step, DHIS2 can be used to increase data quality. First, at the point of data entry, a
check can be made to see if data falls within acceptable range levels of minimum and maximum
values for any particular data element. Such checking, for example, can help to identify typing
errors at the time of data entry. Further, user can define various validation rules, and DHIS2 can
run the data through the validation rules to identify violations. These types of checks help to
ensure that data entered into the system is of good quality from the start, and can be improved
by the people who are most familiar with it.
When data has been entered and verified, DHIS2 can help to make different kinds of reports.
The first kind are the routine reports that can be predefined, so that all those reports that need
to be routine generated can be done on a click of a button. Further, DHIS2 can help in the
generation of analytical reports through comparisons of for example indicators across facilities
or over time. Graphs, maps, reports and health profiles are among the outputs that DHIS2
can produce, and these should routinely be produced, analysed, and acted upon by health
managers.
2.4. Technical background
2.4.1. DHIS2 as a platform
DHIS2 can be perceived as a platform on several levels. First, the application database
is designed ground-up with flexibility in mind. Data structures such as data elements,
organisation units, forms and user roles can be defined completely freely through the
application user interface. This makes it possible for the system to be adapted to a multitude
of locale contexts and use-cases. We have seen that DHIS2 supports most major requirements
for routine data capture and analysis emerging in country implementations. It also makes it
possible for DHIS2 to serve as management system for domains such as logistics, labs and
finance.
Second, due to the modular design of DHIS2 it can be extended with additional software
modules or through custom apps. These software modules/apps can live side by side with the
core modules of DHIS2 and can be integrated into the DHIS2 portal and menu system. This is
a powerful feature as it makes it possible to extend the system with extra functionality when
needed, typically for country specific requirements as earlier pointed out.
The downside of the software module extensibility is that it puts several constraints on the
development process. The developers creating the extra functionality are limited to the DHIS2
technology in terms of programming language and software frameworks, in addition to the
What is DHIS2? Understanding platform independence
8
constraints put on the design of modules by the DHIS2 portal solution. Also, these modules
must be included in the DHIS2 software when the software is built and deployed on the web
server, not dynamically during run-time.
In order to overcome these limitations and achieve a looser coupling between the DHIS2 service
layer and additional software artifacts, a REST-based API has been developed as part of DHIS2.
This Web API complies with the rules of the REST architectural style. This implies that:
The Web API provides a navigable and machine-readable interface to the complete DHIS2
data model. For instance, one can access the full list of data elements, then navigate using
the provided URL to a particular data element of interest, then navigate using the provided
URL to the list of data sets which the data element is a member of.
(Meta) Data is accessed through a uniform interface (URLs) using plain HTTP requests. There
are no fancy transport formats or protocols involved - just the well-tested, well-understood
HTTP protocol which is the main building block of the Web today. This implies that third-party
developers can develop software using the DHIS2 data model and data without knowing the
DHIS2 2specific technology or complying with the DHIS2 design constraints.
All data including meta-data, reports, maps and charts, known as resources in REST
terminology, can be retrieved in most of the popular representation formats of the Web
of today, such as XML, JSON, PDF and PNG. These formats are widely supported in
applications and programming languages and gives third-party developers a wide range of
implementation options.
2.4.2. Understanding platform independence
All computers have an Operating System (OS) to manage it and the programs running it. The
operating system serves as the middle layer between the software application, such as DHIS2,
and the hardware, such as the CPU and RAM. DHIS2 runs on the Java Virtual Machine, and can
therefore run on any operating system which supports Java. Platform independence implies
that the software application can run on ANY OS - Windows, Linux, Macintosh etc. DHIS2 is
platform independent and thus can be used in many different contexts depending on the exact
requirements of the operating system to be used.
Additionally, DHIS2 supports three major database management systems systems (DBMS).
DHIS2 uses the Hibernate database abstraction framework and is compatible with the
following database systems: PostgreSQL, MySQL and H2. PostgreSQL and MySQL are high-
quality production ready databases, while H2 is a useful in-memory database for small-scale
applications or development activities.
Lastly, and perhaps most importantly, since DHIS2 is a browser-based application, the
only real requirement to interact with the system is with a web browser. DHIS2 supports
most web browsers, although currently either Google Chrome, Mozilla Firefox or Opera are
recommended.
2.4.3. Deployment strategies - online vs offline
DHIS2 is a network enabled application and can be accessed over the Internet, a local intranet
as well as a locally installed system. The deployment alternatives for DHIS2 are in this chapter
defined as i) offline deployment ii) online deployment and iii) hybrid deployment. The meaning
and differences will be discussed in the following sections.
2.4.3.1. Offline Deployment
An off-line deployment implies that multiple standalone off-line instances are installed for end
users, typically at the district level. The system is maintained primarily by the end users/district
health officers who enters data and generate reports from the system running on their local
server. The system will also typically be maintained by a national super-user team who pay
What is DHIS2? Deployment strategies - online vs offline
9
regular visits to the district deployments. Data is moved upwards in the hierarchy by the end
users producing data exchange files which are sent electronically by email or physically by
mail or personal travel. (Note that the brief Internet connectivity required for sending emails
does not qualify for being defined as on-line). This style of deployment has the obvious benefit
that it works when appropriate Internet connectivity is not available. On the other side there
are significant challenges with this style which are described in the following section.
Hardware: Running stand-alone systems requires advanced hardware in terms of servers
and reliable power supply to be installed, usually at district level, all over the country. This
requires appropriate funding for procurement and plan for long-term maintenance.
Software platform: Local installs implies a significant need for maintenance. From
experience, the biggest challenge is viruses and other malware which tend to infect local
installations in the long-run. The main reason is that end users utilize memory sticks
for transporting data exchange files and documents between private computers, other
workstations and the system running the application. Keeping anti-virus software and
operating system patches up to date in an off-line environment are challenging and bad
practices in terms of security are often adopted by end users. The preferred way to overcome
this issue is to run a dedicated server for the application where no memory sticks are allowed
and use an Linux based operating system which is not as prone for virus infections as MS
Windows.
Software application: Being able to distribute new functionality and bug-fixes to the health
information software to users are essential for maintenance and improvement of the system.
Relying on the end users to perform software upgrades requires extensive training and a
high level of competence on their side as upgrading software applications might a technically
challenging task. Relying on a national super-user team to maintain the software implies a
lot of traveling.
Database maintenance: A prerequisite for an efficient system is that all users enter data
with a standardized meta-data set (data elements, forms etc). As with the previous point
about software upgrades, distribution of changes to the meta-data set to numerous off-line
installations requires end user competence if the updates are sent electronically or a well-
organized super-user team. Failure to keep the meta-data set synchronized will lead to loss
of ability to move data from the districts and/or an inconsistent national database since the
data entered for instance at the district level will not be compatible with the data at the
national level.
2.4.3.2. Online deployment
An on-line deployment implies that a single instance of the application is set up on a server
connected to the Internet. All users (clients) connect to the on-line central server over the
Internet using a web browser. This style of deployment is increasingly possible due to increased
availability in (mobile) Internet coverage globally, as well as readily available and cheap cloud-
computing resources. These developments make it possible to access on-line servers in even
the most rural areas using mobile Internet modems (also referred to as dongles).
This on-line deployment style has huge positive implications for the implementation process
and application maintenance compared to the traditional off-line standalone style:
Hardware: Hardware requirements on the end-user side are limited to a reasonably modern
computer/laptop and Internet connectivity through a fixed line or a mobile modem. There
is no need for a specialized server for each user, any Internet enabled computer will be
sufficient. A server will be required for on-line deployments, but since there is only one (or
several) servers which need to be procured and maintained, this is significantly simpler (and
cheaper) than maintaining many separate servers is disparate locations. Given that cloud-
computing resources continue to steadily decrease in price while increasing in computational
power, setting up a powerful server in the cloud is far cheaper than procuring hardware.
Software platform: The end users only need a web browser to connect to the on-line
server. All popular operating systems today are shipped with a web browser and there is
no special requirement on what type or version. This means that if severe problems such
What is DHIS2? Deployment strategies - online vs offline
10
as virus infections or software corruption occur one can always resort to re-formatting and
installing the computer operating system or obtain a new computer/laptop. The user can
continue with data entry where it was left and no data will be lost.
Software application: The central server deployment style means that the application can
be upgraded and maintained in a centralized fashion. When new versions of the applications
are released with new features and bug-fixes it can be deployed to the single on-line server.
All changes will then be reflected on the client side the next time end users connect over the
Internet. This obviously has a huge positive impact for the process of improving the system
as new features can be distributed to users immediately, all users will be accessing the same
application version, and bugs and issues can be sorted out and deployed on-the-fly.
Database maintenance: Similar to the previous point, changes to the meta-data can be
done on the on-line server in a centralized fashion and will automatically propagate to all
clients next time they connect to the server. This effectively removes the vast issues related
to maintaining an upgraded and standardized meta-data set related to the traditional off-
line deployment style. It is extremely convenient for instance during the initial database
development phase and during the annual database revision processes as end users will be
accessing a consistent and standardized database even when changes occur frequently.
This approach might be problematic in cases where Internet connectivity is volatile or
missing in long periods of time. DHIS2 however has certain features which requires Internet
connectivity to be available only part of the time for the system to work properly, such as
offline data entry. In general however, DHIS2 does require Internet connectivity of some sort,
but this is increasingly an easy problem to solve even in remote locations.
2.4.3.3. Hybrid deployment
From the discussion so far one realizes that the on-line deployment style is favourable over the
off-line style but requires decent Internet connectivity where it will be used. It is important to
notice that the mentioned styles can co-exist in a common deployment. It is perfectly feasible to
have on-line as well as off-line deployments within a single country. The general rule would be
that districts and facilities should access the system on-line over the Internet where sufficient
Internet connectivity exist, and off-line systems should be deployed to districts where this is
not the case.
Defining decent Internet connectivity precisely is hard but as a rule of thumb the download
speed should be minimum 10 Kbyte/second for the client and at least 1 MBit/sec (dedicated)
bandwidth for the server.
In this regard mobile Internet modems which can be connected to a computer or laptop and
access the mobile network is an extremely capable and feasible solution. Mobile Internet
coverage is increasing rapidly all over the world, often provide excellent connectivity at low
prices and is a great alternative to local networks and poorly maintained fixed Internet lines.
Getting in contact with national mobile network companies regarding post-paid subscriptions
and potential large-order benefits can be a wort-while effort. The network coverage for
each network operator in the relevant country should be investigated when deciding which
deployment approach to opt for as it might differ and cover different parts of the country.
2.4.3.4. Server hosting
The on-line deployment approach raises the question of where and how to host the server
which will run the DHIS2 application. Typically there are several options:
1. Internal hosting within the Ministry of Health
2. Hosting within a government data centre
3. Hosting through an external hosting company
The main reason for choosing the first option is often political motivation for having “physical
ownership” of the database. This is perceived as important by many in order to “own” and
What is DHIS2? Deployment strategies - online vs offline
11
control the data. There is also a wish to build local capacity for server administration related
to sustainability of the project. This is often a donor-driven initiatives as it is perceived as a
concrete and helpful mission.
Regarding the second option, some places a government data centre is constructed with a
view to promoting and improving the use and accessibility of public data. Another reason is
that a proliferation of internal server environments is very resource demanding and it is more
effective to establish centralized infrastructure and capacity.
Regarding external hosting there is lately a move towards outsourcing the operation and
administration of computer resources to an external provider, where those resources are
accessed over the network, popularly referred to as “cloud computing” or “software as a
service”. Those resources are typically accessed over the Internet using a web browser.
The primary goal for an on-line server deployment is provide long-term stable and high-
performance accessibility to the intended services. When deciding which option to choose for
server environment there are many aspects to consider:
1. Human capacity for server administration and operation. There must be human resources
with general skills in server administration and in the specific technologies used for the
application providing the services. Examples of such technologies are web servers and
database management platforms.
2. Reliable solutions for automated backups, including local off-server and remote backup.
3. Stable connectivity and high network bandwidth for traffic to and from the server.
4. Stable power supply including a backup solution.
5. Secure environment for the physical server regarding issues such as access, theft and fire.
6. Presence of a disaster recovery plan. This plan must contain a realistic strategy for making
sure that the service will be only suffering short down-times in the events of hardware
failures, network downtime and more.
7. Feasible, powerful and robust hardware.
All of these aspects must be covered in order to create an appropriate hosting environment.
The hardware requirement is deliberately put last since there is a clear tendency to give it
too much attention.
Looking back at the three main hosting options, experience from implementation missions in
developing countries suggests that all of the hosting aspects are rarely present in option one
and two at a feasible level. Reaching an acceptable level in all these aspects is challenging in
terms of both human resources and money, especially when compared to the cost of option
three. It has the benefit that is accommodates the mentioned political aspects and building
local capacity for server administration, on the other hand can this be provided for in alternative
ways.
Option three - external hosting - has the benefit that it supports all of the mentioned hosting
aspects at a very affordable price. Several hosting providers - of virtual servers or software
as a service - offer reliable services for running most kinds of applications. Example of such
providers are Linode and Amazon Web Services. Administration of such servers happens over
a network connection, which most often anyway is the case with local server administration.
The physical location of the server in this case becomes irrelevant as that such providers
offer services in most parts of the world. This solution is increasingly becoming the standard
solution for hosting of application services. The aspect of building local capacity for server
administration is compatible with this option since a local ICT team can be tasked with
maintaining the externally hosted server, but with not being burdened with worrying about
power supply and bandwidth constraints which usually exist outside of major data centres.
An approach for combining the benefits of external hosting with the need for local hosting and
physical ownership is to use an external hosting provider for the primary transactional system,
What is DHIS2? Difference between Aggregated and
Patient data in a HIS
12
while mirroring this server to a locally hosted non-critical server which is used for read-only
purposes such as data analysis and accessed over the intranet.
2.5. Difference between Aggregated and Patient data in a HIS
Patient data is data relating to a single patient, such as his/her diagnosis, name, age, earlier
medical history etc. This data is typically based on a single patient-health care worker
interaction. For instance, when a patient visits a health care clinic, a variety of details may be
recorded, such as the patient's temperature, their weight, and various blood tests. Should this
patient be diagnosed as having "Vitamin B 12 deficiency anaemia, unspecified" corresponding
to ICD-10 code D51.9, this particular interaction might eventually get recorded as an instance
of "Anaemia" in an aggregate based system. Patient based data is important when you want
to track longitudinally the progress of a patient over time. For example, if we want to track
how a patient is adhering to and responding to the process of TB treatment (typically taking
place over 6-9 months), we would need patient based data.
Aggregated data is the consolidation of data relating to multiple patients, and therefore cannot
be traced back to a specific patient. They are merely counts, such as incidences of Malaria,
TB, or other diseases. Typically, the routine data that a health facility deals with is this kind
of aggregated statistics, and is used for the generation of routine reports and indicators, and
most importantly, strategic planning within the health system. Aggregate data cannot provide
the type of detailed information which patient level data can, but is crucial for planning and
guidance of the performance of health systems.
In between the two you have case-based data, or anonymous "patient" data. A lot of details
can be collected about a specific health event without necessarily having to identify the patient
it involved. Inpatient or outpatient visits, a new case of cholera, a maternal death etc. are
common use-cases where one would like to collect a lot more detail that just adding to the
total count of cases, or visits. This data is often collected in line-listing type of forms, or in more
detailed audit forms. It is different from aggregate data in the sense that it contains many
details about a specific event, whereas the aggregate data would count how many events of a
certain type, e.g. how many outpatient visits with principal diagnosis "Malaria", or how many
maternal deaths where the deceased did not attend ANC, or how many cholera outbreaks for
children under 5 years. In DHIS2 this data is collected through programs of the type single
event without registration.
Patient data is highly confidential and therefore must be protected so that no one other than
doctors can get it. When in paper, it must be properly stored in a secure place. For computers,
patient data needs secure systems with passwords, restrained access and audit logs.
Security concerns for aggregated data are not as crucial as for patient data, as it is usually
impossible to identify a particular person to a aggregate statistic . However, data can still be
misused and misinterpreted by others, and should not be distributed without adequate data
dissemination policies in place.
2.6. Free and Open Source Software (FOSS): benefits and challenges
Software carries the instructions that tell a computer how to operate. The human authored
and human readable form of those instructions is called source code. Before the computer can
actually execute the instructions, the source code must be translated into a machine readable
(binary) format, called the object code. All distributed software includes the object code, but
FOSS makes the source code available as well.
Proprietary software owners license their copyrighted object code to a user, which allows the
user to run the program. FOSS programs, on the other hand, license both the object and the
source code, permitting the user to run, modify and possibly redistribute the programs. With
What is DHIS2? Free and Open Source Software (FOSS):
benefits and challenges
13
access to the source code, the users have the freedom to run the program for any purpose,
redistribute, probe, adapt, learn from, customise the software to suit their needs, and release
improvements to the public for the good of the community. Hence, some FOSS is also known
as free software, where “free” refers, first and foremost, to the above freedoms rather than
in the monetary sense of the word.
Within the public health sector, FOSS can potentially have a range of benefits, including:
Lower costs as it does not involve paying for prohibitive license costs.
Given the information needs for the health sector are constantly changing and evolving, there
is a need for the user to have the freedom to make the changes as per the user requirements.
This is often limited in proprietary systems.
Access to source code to enable integration and interoperability. In the health sector
interoperability between different software applications is becoming increasingly important,
meaning enabling two or more systems to communicate metadata and data. This work is a
lot easier, and sometimes dependent on the source code being available to the developers
that create the integration. This availability is often not possible in the case of proprietary
software. And when it is, it comes at a high cost and contractual obligations.
FOSS applications like DHIS2 typically are supported by a global network of developers, and
thus have access to cutting edge research and development knowledge.
Managing dashboards About dashboards
15
Chapter 3. Managing dashboards
3.1. About dashboards
Dashboards are intended to provide quick access to different analytical objects (maps, charts,
reports, tables, etc) to an individual user. Dashboards can also be shared with user groups.
Example3.1.
A user or administrator could create a dashboard called "Antenatal care" which might contain
all relevant information on antenatal care. This dashboard could then be shared with the user
group called "ANC control", which might consist of all users of the ANC control program. All
users within this group would then be able to view the same dashboard.
3.2. Dashboard and control bar
Dashboards have a title, description, and any number of dashboard items. The dashboard
items can be of many different types, including charts, maps, reports, tables, resources,
messages, and text items. Above the dashboard is the control bar, which shows all your
available dashboards, including a dashboard search field, and a + button for creating a new
dashboard.
The dashboard has two modes: view and edit/create. When you first log in to DHIS2, your most
recently used dashboard will be displayed in view mode, if you are on the same computer as
you were previously. If you are using a different computer, then the first starred dashboard will
be displayed. if there are no starred dashboards, then the first dashboard will be displayed.
Starred dashboards always show first in the dashboard list.
The screenshot below shows a dashboard called "Antenatal Care", which has been populated
with charts and maps.
Managing dashboards Searching in the list of dashboards
16
3.2.1. Searching in the list of dashboards
You can search for a specific dashboard using the search field in the upper left of the control
bar entitled “Search for a dashboard”. The search is case insensitive, and as you type, the list
of dashboards will filter down to those that match your search text.
3.2.2. Customizing the height of the control bar
You can set a specific height for the dashboards control bar by down-clicking and dragging the
bottom edge of the control bar. When you finish dragging, the new height will be set. Clicking
on SHOW MORE will expand the control bar to its maximum height (10 "rows"). Clicking on
SHOW LESS will reset the height to your customized height.
3.3. Creating a dashboard
To create a new dashboard, click the green + button in the left corner of the control bar to go
into create mode. Add a title in the title field, and optionally a description in the description
field.
Create mode:
3.3.1. Adding items to the dashboard
Add items to the dashboard by searching from the item selector in the upper right part of the
dashboard area. Available items include:
Pivot tables
• Charts
• Maps
Event reports
Event charts
• Report
• Resources
• Apps
• Email
Text boxes
• Spacer
Managing dashboards Adding items to the dashboard
17
The list of items in the dropdown initially displays the first 5 available from each category,
based on the search text you enter. Email, text boxes and spacer items are also found in the
dropdown. To view more items, click on SEE MORE, and the list for that type will be extended
to 15 items. If you still do not find the item you want, try typing a more specific search text.
Once you select an item, it will be added to the top left position of the dashboard. The added
items can be moved using the mouse by down-clicking on the item and dragging it to the
desired position. It can also be resized with the mouse by down-clicking on the drag handle in
the lower right corner of the item and dragging to the desired size.
3.3.1.1. Spacer items
The dashboard is configured with the "anti-gravity" setting for positioning items. This means
that items will "rise" upwards until they run into another item. In order to force empty vertical
space between items (like an empty row), you can add spacer items to the dashboard. They
are only visible in edit/create mode. In view mode, they are not displayed, but take up the
defined space.
Spacer in edit/create mode:
Managing dashboards Removing items
18
Spaceer in view mode:
3.3.2. Removing items
Remove items by clicking on the red trash can at the upper right of the item. Be aware that
because of the "anti-gravity" setting in the dashboard, when you remove an item, the items
that are positioned below the removed item will "rise" upwards.
3.3.3. Saving the dashboard
When creating or editing a dashboard, changes are only saved when you click SAVE CHANGES
button in the dashboard edit bar at the top of the page. If you don't want to save your changes,
Managing dashboards Editing an existing dashboard
19
click the EXIT WITHOUT SAVING button to the upper right. You will then be returned to view
mode with the dashboard you were previously viewing.
3.4. Editing an existing dashboard
If you have access rights to edit the currently active dashboard, there will be an EDIT button
to the right of the dashboard title in view mode. Click on this button to enter edit mode.
Refer to the above section about creating dashboards for information on adding and removing
items to the dashboard.
3.4.1. Translating dashboard title and description
You can add translations for dashboard title and description while in edit mode. The dialog
provides a list of languages to translate to, and shows the original dashboard title underneath
the name input field.
1. Click on the TRANSLATE button located above the dashboard
2. Select the language you wish to add a translation for.
3. Add the title and/or description, and click SAVE
3.4.2. Deleting a dashboard
If you have access to delete the dashboard, then there will be a DELETE button located above
the dashboard, when in edit mode. A confirmation dialog will first be displayed to confirm that
you want to delete the dashboard.
Managing dashboards Viewing a dashboard
20
3.5. Viewing a dashboard
When in view mode, you can toggle showing the description, star a dashboard, apply a
dashboard filter, and share the dashboard with other users and groups
To view the description, click on the i button to the right of the title
3.5.1. Starred dashboards
Your starred dashboards are listed first in the list of dashboards. To star a dashboard, click on
the star button to the right of the title. When the star is “filled”, that means the dashboard is
starred. Starring a dashboard only applies to you, not other users.
3.5.2. Filtering a dashboard
To filter the dashboard by organisation unit, click on the FILTER button to the right of the
dashboard title. Select the organisation units you want to apply to the dashboard. This only
affects you, no other users. The only dashboard items that are impacted by the organisation
unit filter are visualization items (pivot table, chart, map) that have their organisation unit
configured to "User org unit". If you reload the dashboard, the filter will be cleared.
3.5.3. Dashboard items with charts, pivot tables and maps
3.5.3.1. Switching between visualizations
Dashboard items showing charts, pivot tables and maps can be toggled between these
visualizations. Click on the buttons in the upper right corner of the item to toggle between
visualizations.
Managing dashboards Interpretations
21
3.5.4. Interpretations
You can write interpretations for the chart, pivot table, map, event report, and event chart
items. Click on the interpretations button , and the item will be expanded vertically
underneath to show the interpretations and replies. You can like an interpretation, reply to an
interpretation, and add your own interpretation. You can delete your own interpretations and
replies, and if you have moderator access, you can delete others’ interpretations.
3.5.5. Sharing a dashboard
In order to share a dashboard with user groups, click on the SHARE button to the right of the
dashboard title to display the dashboard sharing settings options. To share the dashboard with
specific users or user groups, type in the name in the input field to add them to the dashboard
sharing settings
Managing dashboards Sharing a dashboard
22
All dashboards have two sharing groups set by default.
External access (without login)
This option, when selected, provides access to the dashboard as an external resource. This is
useful for when you are creating an external web portal but would like to call information from
a dashboard you have made internally within DHIS2. By default, this option is not selected.
Public access (with login)
This option allows the selected dashboard to be pushed to all users within your DHIS2
instance. This can also be hidden from public view by selecting the "None" option, which is
the default option for new dashboards.
User groups that have been added manually can be assigned two types of permissions within
the dashboard
Can view
Provides the user group with view only rights to the dashboard.
Can edit and view
Allows the user groups to edit the dashboard in addition to viewing it. Editing allows for
altering the layout, resizing and removing items, renaming/deleting the dashboard etc.
Messaging About messages and feedback
messages
23
Chapter 4. Messaging
4.1. About messages and feedback messages
Within DHIS2 you can send messages and feedback messages to users, user groups and
organisation units. When you send a feedback message, it is routed to a particular user group.
If you're a member of this user group, you've access to feedback handling tools. You can
for example set the status of an incoming feedback to "Pending" while you're waiting for
information.
In addition to the user-to-user and feedback messages, depending on your configuration the
system will also send you system-generated messages. These messages could be triggered by
different events, including system or background job failures and validation analysis results.
Feedback handling tools are also available for validation results and the priority will be set to
the importance of the validation rule violated.
Note
Messages and feedback messages are not sent to users' e-mail addresses, the messages
only appear within DHIS2.
Messaging Create a message
24
4.2. Create a message
1. From the Dashboard, click Messages.
2. Click Write message.
3. Define who you want to receive the message. You can send a message to organisation units,
users and user groups.
In the To org unit field, select the organisation units or group of organisation units you
want to send the message to.
In the To user field, select the users or user groups you want to send the message to.
4. Type a subject and a message.
5. Click Send.
4.3. Read a message
1. From the Dashboard, click Messages.
2. Click a message.
If the message is part of a conversation, you'll see all messages in this conversation.
4.4. Create a feedback message
1. From the Dashboard, click Write feedback.
2. Type a subject and a feedback message.
3. Click Send.
The feedback message will appear in all of the specified users' inboxes.
Messaging Manage feedback messages
25
4.5. Manage feedback messages
Note
You'll only see feedback messages and have access to the feedback handling tools if
you are a member of the user group that is set up to handle feedback messages.
You'll receive feedback messages to your Messages inbox. For feedback messages you've
the following options in addition to the messages options:
Table4.1.Feedback handling tools
Function Description
Priority You can mark a feedback
message with different
priorities: None, Low,
Medium or High.
Setting the priority makes
it easier to keep track of
which feedback message
you need resolved first,
and which feedback
messages that can wait.
Status All feedback messages
get the status Open when
created.
To keep track of existing
feedback messages, you
can change the status
to Pending, Invalid or
Solved.
You can filter feedback
messages in your inbox
based on their status.
This makes it easier to
switch between feedback
messages and normal
messages.
Messaging Configure feedback message function
26
Function Description
Assigned to You can assign a feedback
message to any member
of the user group that is
set up to handle feedback
messages.
None means that you
haven't assigned a user to
the feedback message.
Internal reply When you work in a
feedback handling team
you might want to discuss
the feedback before
sending an answer to the
sender. You can keep this
discussion in the same
message conversation as
the feedback itself.
To send a reply that within
the feedback handling
user group, click Internal
reply.
4.6. Configure feedback message function
To configure the feedback message function, you must:
1. Create a user group (for example "Feedback message recipients") that contains all the users
who should receive feedback messages.
2. Open the System Settings app and click General > Feedback recipients and select the
user group you created in the previous step.
Using the Data Entry app About the Data Entry app
27
Chapter 5. Using the Data Entry app
5.1. About the Data Entry app
The Data Entry app is where you manually enter aggregated data in DHIS2. You register data
for an organisation unit, a period, and a set of data elements (data set) at a time. A data set
often corresponds to a paper-based data collection tool. You configure the data sets in the
Maintenance app.
A data set can have both section and custom forms
If a data set has both a section form and a custom form, the system displays the custom
form during data entry. Users who enter data can't select which form they want to use.
In web-based data entry the order of display preference is:
1. Custom form (if it exists)
2. Section form (if it exists)
3. Default form
Mobile devices do not support custom forms. In mobile-based data entry the order of
display preference is:
1. Section form (if it exists)
2. Default form
When you close an organisation unit, you can't register or edit data to this organisation unit
in the Data Entry app.
5.2. Enter data in a data entry form
Using the Data Entry app Enter data in a data entry form
28
1. Open the Data Entry app.
2. In the organisation unit tree to the left, select an organisation unit.
3. Select a Data set.
4. Select a Period.
The available periods are controlled by the period type of the data set (reporting frequency).
You can jump a year back or forward by clicking Prev year or Next year.
Note
Depending on how you've configured the data entry form, you might have to enter
additional information before you can open the date entry form. This can for example
be a project derived from a category combination.
5. Enter data in the data entry form.
A green field means that the system has saved the value.
A grey field means that the field is disabled and you can't enter a value. The cursor will
automatically jump to the next open field.
To move to the next field, press the Tab key or the Down Arrow key.
To move back to the previous field, press Shift+Tab or the Up Arrow key.
If you type in an invalid value, for example a character in a field that only accepts numeric
values, you'll get a pop-up that explains the problem and the field will be coloured yellow
(not saved) until you have corrected the value.
If you have defined a minimum maximum value range for the field and you enter a value
that is outside this range, you'll get a pop-up message that says the value is out of range.
The value remains unsaved until you've changed the value or updated the value range
and then re-entered the value.
6. When you've filled in the form, click Run validation in the top right corner or below the
data entry form.
All validation rules which involves data elements in the current data entry form (data set) are
then run against the new data. If there are no violations of the validation rules, you'll see a
message saying The data entry screen successfully passed validation. If there are validation
violations, they will be presented in a list.
7. (Optional) Correct validation violations.
Note
Zero (0) will delete the value if the data element has been configured to not store
zeros.
8. When you've corrected errors and you're done with data entry, click Complete.
The system uses this information when generating completeness reports for district, county,
province or the national level.
Using the Data Entry app Mark a data value for follow-up
29
5.3. Mark a data value for follow-up
If you for example have a suspicious value that you need to investigate further, you can keep
it the system, but mark it for follow-up. In the Data Quality app you can then run a follow-up
analysis to view and correct all marked values.
1. Open the Data Entry app.
2. Open an existing data entry form.
3. Double-click the field with the value you want to mark for follow-up.
4. Click the star icon.
5.4. Edit data values in a completed data entry form
1. Open the Data Entry app.
2. Open an existing data entry form.
3. Click Incomplete.
4. Change the relevant data values.
Note
Zero (0) will delete the value if the data element has been configured to not store
zeros,
5. Click Complete.
Using the Data Entry app Display a data value's history
30
5.5. Display a data value's history
You can display the last 12 values registered for a field.
1. Open the Data Entry app.
2. Open an existing data entry form.
3. Double-click the field with the value you want to view the history for.
4. Click Data element history.
5.6. Display a data value's audit trail
The audit trail allows you to view other data values which have been entered prior to the
current value. The audit trail also shows when the data value was altered and which user who
made the changes.
1. Open the Data Entry app.
2. Open an existing data entry form.
3. Double-click the field with the value you want to view the audit trail for.
4. Click Audit trail.
Using the Data Entry app Create minimum maximum value range
manually
31
5.7. Create minimum maximum value range manually
1. In the Data Entry app, open a data entry form.
2. Double-click the field for which you want to set the minimum maximum value range.
3. Enter Min limit and Max limit.
4. Click Save.
If values don't fall within the new value range the next time you enter data, the data entry
cell will appear with an orange background.
5. (Optional) Type a comment to explain the reason for the discrepancy, for example an event
at a facility which may have generated a large number of clients.
6. (Optional) Click Save comment.
Tip
Click the star icon to mark the value for further follow-up.
5.8. Enter data offline
The Data Entry app works even if you don't have a stable Internet connection during data
entry. When you don't have an internet connection, the data you enter is saved to your local
computer. When the Internet connection is back, the app will push the data to the server.
The total bandwidth usage is reduced since data entry forms no longer are retrieved from the
server for each rendering.
Note
To use this functionality, you must login to the server while you've an Internet
connection.
When you're connected to the Internet, the app displays this message at the top of the data
entry form:
If your Internet connection breaks during data entry, the app detects it and displays this
message:
Using the Data Entry app Enable multi-organisation unit data
entry
32
Now your data will be stored locally. You can continue to enter data as normal.
Once you have entered all necessary data and the app detects that the Internet connection
is back, you'll see this message:
Click Upload to synchronize data with the server.
When the data has successfully synchronized with the server, you'll see this confirmation
message:
5.9. Enable multi-organisation unit data entry
It can be useful to enter data for multiple organisation units in the same data entry form, for
instance if there are few data elements in the form and a huge number of organisation units
in the hierarchy. In that case, you can enable multi-organisation unit data entry.
Note
Multi-organisation unit data entry only works for section forms.
1. Open the System Settings app.
2. Select Enable multi-organisation unit forms.
3. In the Data Entry app, select the organisation unit immediately above the organisation unit
you want to enter data for in the organisation unit hierarchy.
Data elements will appear as columns and organisation units as rows in the form.
Note
The data entry forms should still be assigned to the facilities that you actually enter
data for, that is the organisation units now appearing in the form.
Using the Data Entry app See also
33
5.10. See also
Control data quality
Manage data sets and data entry forms
Using the Maintenance app
Using the Event Capture app About the Event Capture app
35
Chapter 6. Using the Event Capture app
6.1. About the Event Capture app
In the Event Capture app you register events that occurred at a particular time and place. An
event can happen at any given point in time. This stands in contrast to routine data, which can
be captured for predefined, regular intervals. Events are sometimes called cases or records. In
DHIS2, events are linked to a program. The Event Capture app lets you select the organisation
unit and program and specify a date when a event happened, before entering information for
the event.
The Event Capture app works online and offline. If the Internet connectivity drops, you can
continue to capture events. The events will be stored locally in your web browser (client). When
connectivity has returned, the system will ask you to upload the locally stored data. The system
then sends the data to the server where the data is stored.
Note
If you close the web browser while in offline mode, it is not possible to reopen a new
web browser window and continue the working session. However the data will still be
saved locally and can be uploaded to the server the next time the machine is online and
the you have logged into the server.
You only see programs associated with the organisation unit you've selected and programs
you've access to view through your user role.
Both skip-logic and validation error/warning messages are supported during registration.
When you close an organisation unit, you can't register or edit events to this organisation
unit in the Event Capture app. You can still view and filter the event list and view the details
of an event.
On-the-fly indicator expression evaluation is supported. If a program has indicators defined
for it and the moment all values related to the indicator expression are filled, the system will
calculate indicator and display the result.
Using the Event Capture app Register an event
36
Sorting: this can be done by clicking the sorting icon of each column header. A red sorting
icon implies the current sorting column. However, the sorting functionality works only within
the page displayed. Currently, it is not possible to do sorting from serverside.
Filtering: this is done by clicking the small search icon shown to the right of each column
header. Clicking them provides an input field to type a filtering criteria. The system starts
applying the filter the moment a user starts to type. During filtering it is possible to define
start and end dates for date type data elements and lower and upper limits for number types.
Server side filtering is not-support at the moment.
6.2. Register an event
1. Open the Event Capture app.
2. Select an organisation unit.
3. Select a program.
You'll only see programs associated with the selected organisation unit and programs you've
access to through your user role.
4. Click Register event.
5. Select a date.
6. Fill in the required information.
If the program's program stage is configured to capture GPS coordinate, you can enter the
coordinates in two ways:
Enter values directly in corresponding fields.
Choose a location in a map. The map option also displays polygons and points that are
defined for organisation units.
7. Click Save and add new or Save and go back.
6.3. Edit an event
1. Open the Event Capture app.
2. Select an organisation unit.
3. Select a program.
All events registered to the selected program show up in a list.
4. Click the event you want to modify and select Edit.
Using the Event Capture app Edit events in grid
37
5. Modify the event details and click Update.
6.4. Edit events in grid
The Edit in grid function allows you to edit a selected event within the table but only
those columns (data elements) visible in the grid. If you need more columns, use Show/hide
columns to specify which columns should be displayed in the list.
1. Open the Event Capture app.
2. Select an organisation unit.
3. Select a program.
All events registered to the selected program show up in a list.
4. Click the event you want to modify and select Edit in grid.
5. Modify the event details.
6. Click on another event to close the edit mode.
6.5. Share events in edit mode
You can share an event in edit mode via its web address.
1. Open the Event Capture app.
2. Open the event you want to share in edit mode.
3. Copy the URL.
Make sure that the URL contains "event" and "ou" (organisation unit) parameters.
4. Paste the URL in the sharing method of your choice, for example an e-mail or a message
within DHIS2.
If you're not logged in to DHIS2 when you click the link, you'll be asked to do so and then
taken to the dashboard.
6.6. View an event audit history
1. Open the Event Capture app.
2. Select an organisation unit.
3. Select a program.
All events registered to the selected program show up in a list.
4. Click an event and select Audit history.
6.7. Delete an event
1. Open the Event Capture app.
2. Select an organisation unit.
3. Select a program.
All events registered to the selected program show up in a list.
4. Click an event and select Remove.
5. Click Remove to cocnfirm the deletion.
Using the Event Capture app Modify an event list's layout
38
6.8. Modify an event list's layout
You can select which columns to show or hide in an event list. This can be useful for example
when you have a long list of data elements assigned to a program stage. Once you've modified
the layout, it's saved on your user profile. You can have different layouts for different programs.
1. Open the Event Capture app.
2. Select an organisation unit.
3. Select a program.
All events registered to the selected program show up in a list.
4. Click the Show/hide columns icon.
5. Select the columns you want to display and click Close.
6.9. Print an event list
1. Open the Event Capture app.
2. Select an organisation unit.
3. Select a program.
All events registered to the selected program show up in a list.
4. Click Print list.
6.10. Download an event list
1. Open the Event Capture app.
2. Select an organisation unit.
3. Select a program.
All events registered to the selected program show up in a list.
4. Click the Downlad icon and select a format.
You can download an event list in XML, JSON or CSV formats.
Using the Tracker Capture app About the Tracker Capture app
39
Chapter 7. Using the Tracker Capture app
7.1. About the Tracker Capture app
The Tracker Capture app is an advanced version of the Event Capture app.
Event Capture: handles single events without registration
Tracker Capture: handles multiple events (including single event) with registration.
You capture event data for a registered tracked entity instance (TEI).
You only see programs associated with the organisation unit you've selected and programs
you've access to view through your user role.
The options you see in the search and register functions depend on the program you've
selected. The program attributes control these options. The attributes also decide the
columns names in the TEI list.
If you don't select a program, the system picks default attributes.
Both skip-logic and validation error/warning messages are supported during registration.
When you close an organisation unit, you can't register or edit events to this organisation
unit in the Tracker Capture app. You can still search for TEIs and filter the search results.
You can also view the dashboard of a particular TEI.
Using the Tracker Capture app About tracked entity instance (TEI)
dashboards
40
7.2. About tracked entity instance (TEI) dashboards
You manage a TEI from the TEI's dashboard in the Tracker Capture app.
The dashboard consist of widgets. Drag and drop the widgets to place them in the order and
in the position you want.
Click the pin icon to stick the right column of widgets to a fix position. This is useful especially
during data entry.
Example7.1.
If you have many data elements or big form to fill in, stick the right widget column. Then
all the widgets you've placed in the right column remain visible while you scroll in the data
entry part.
Any indicator defined for the program you've selected will have its value calculated and
displayed in the Indicators widget.
• Navigation:
Back: takes you back to the search and registration page
Previous and next buttons: takes you to the previous or next TEI dashboard in the TEI
search results list
Other programs field: if the TEI is enrolled in other programs, they're listed here. Click a
program to change the program for which you enter data for the selected TEI. When you
change programs, the content in the widgets change too.
7.3. Workflow
Example7.2.
Working process of Mother and child health program
Using the Tracker Capture app Create a TEI and enroll it in a program
41
1. Create new or find existing TEI.
You can search on defined attributes, for example name or address.
2. Enroll TEI in a program.
3. Based on the services of the program by the time, the app creates an activity plan for the TEI.
4. The TEI is provided with various services depending on the program. All services are
recorded.
5. Use information about the individual cases to create reports.
7.4. Create a TEI and enroll it in a program
You can create a TEI and enroll that TEI to a program in one operation:
1. Open the Tracker Capture app.
2. In the organisation unit tree in the left hand pane, select an organisation unit.
3. Select a program.
4. Click Register.
5. Fill in the required information.
6. If searching for program is configured, a background search will be performed on searchable
fields to help you prevent registering duplicates. If there is any matching TEIs, a blue box will
be displayed on the right side of the form with the possibility to view these matching TEIs.
Using the Tracker Capture app Open an existing TEI dashboard
42
If there is any matching TEIs, click Continue to review possible duplicates before registering
a new one.
If there is no matching TEIs, click Save and continue or Save and add new
Save and continue: completes the registration and opens the registered TEI's dashboard
Save and add new: completes the registration but stays on the same page. Use this option
when you want to register and enroll one TEI after another without enter data.
(img integrated search)
7.5. Open an existing TEI dashboard
There are multiple ways to find a TEI: Using the "Lists" which is predefined lists in the current
selection, or "Search" for global lookup.
7.5.1. Lists
Lists is used to find and display TEIs in the selected organisation unit and program.
1. Open Tracked Capture app
2. In the organisation unit tree in the left hand pane, select an organisation unit
3. Select a program
4. Click the "Lists" button if not already selected
Using the Tracker Capture app Lists
43
If not configured, a set of predefined lists will be available:
1. Any TEI with any enrollment status
2. TEIs with an active enrollment of the current program
3. TEIs with a completed enrollment of the current program
4. TEIs with a cancelled enrollment of the current program
You can select which columns to show or hide in the lists for each program. This will be saved
in your user settings.
1. Click the grid icon button
2. Check the columns you want to include
3. Click Save
There is also an option to create a custom working list with own filters. This can be used to
create custom lists on the fly.
Lists can also be downloaded or printed.
Using the Tracker Capture app Search
44
7.5.2. Search
Search is used to search for TEIs in the organisation units the user has search access to. This
can be used if you want to find a TEI, but you dont know which organisation unit or program
the TEI was enrolled in. There are two ways of doing this: With and without a program context.
Searchable fields needs to be configured. For configuring searching with program context,
this is done individually for each program in the program maintenance app. For configuring
searching without a program context, this is done individually for each tracked entity type in
the tracked entity type maintenance app.
Searching without a program context:
1. Open Tracker Capture app
2. Click the Search button
3. Searchable fields will be displayed in groups. Unique attributes is only individually
searchable. Non-unique attributes can be combined.
4. Fill in search criteria and click the search icon button.
Searching with a program context:
1. Open Tracker Capture app
2. Select an organisation unit which has the program you wish to search in
3. Select the program
4. Click the Search button
5. Searchable fields will be displayed in groups. Unique attributes is only individually
searchable. Non-unique attributes can be combined.
6. Fill in search criteria and click the search icon button
Using the Tracker Capture app Enroll an existing TEI in a program
45
After the search has been done, you will be presented with the search result. Whats displayed
depends on the outcome of the search.
For unique attribute search:
If no matching TEI found, you will get the possibility to open the registration form.
If the TEI was found in the selected organisation unit, the TEI dashboard will automatically
open.
If the TEI was found in outside the selected organisation unit, you will get the possibility to
open the TEI.
For non-unique attributes search:
If no matching TEI's found, you will get the possibility to open the registration form.
If matching TEI's found, you can either click on any TEI in the result list, or open the
registration form.
If a too large number of matches was found, you will be prompted to refine your search
criteria
When choosing to open the registration form, the search values will automatically be filled into
the registration form.
7.6. Enroll an existing TEI in a program
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. Select a program.
4. In the Enrollment widget, click Add new.
5. Fill in the required information and click Enroll.
7.7. Enter event data for a TEI
7.7.1. Widgets for data entry
In a TEI dashboard, you enter event data in the Timeline Data entry or Tabular data entry
widgets.
Table7.1.Data entry widgets in the Tracker Capture app
Widget name Description
Timeline Data entry For data entry using either default or custom forms.
Depending on program definition, in particular program
stages, events will be displayed in a timely fashion. Clicking
on any of them displays the corresponding data entry. If a
stage needs new event, a plus icon is displayed for new event
creation. To proceed with data entry, it is mandatory to have
event date. Once an event date is specified it is not possible
to change due date. The assumption is that by specifying
event date, the event has already taken place. If the event
hasn't occurred yet, it is possible to change due date - this is
Using the Tracker Capture app Creating an event
46
Widget name Description
effectively doing nothing but rescheduling. The buttons at the
bottom help to change the status of a selected event.
Another key feature from this widget is addition of multiple
notes for an event. Normally data recording is through data
elements, however there are cases where it is necessary to
record additional information or comments. This is where the
notes section comes handy. However it is not possible to
delete a note. The idea is notes are more like log books.
Both skip-logic and validation error/warning messages are
supported during data entry.
Also included in the Timeline Data entry is the option to
compare your data entry to previous entries. This can be
enabled by clicking the "Switch to compare form" button (Two
sheets of paper) in the top right corner of the Timeline Data
entry widget.
Tabular data entry For tabular-style data entry.
The widget displays the list of program stages as left-hand
side labels. Events will be listed in table for repeatable
program stage, and allows for in-line edits of event data
values.
7.7.2. Creating an event
You can create an event for a TEI by:
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Timeline Data entry or Tabular data entry widget, click the +-button.
4. Select a Programstage and set a Report date.
5. Click Save.
7.7.3. Schedule an event
You can shedule an event for a future date by:
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Timeline Data entry or Tabular data entry widget, click the Calendar icon.
4. Select a Programstage and set a Schedule date.
5. Click Save.
7.7.4. Refer an event
Sometimes it might be nessascary to refer a patient to a different Organisation unit. To refer
a TEI:
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Timeline Data entry or Tabular data entry widget, click the Arrow icon.
Using the Tracker Capture app Compare events
47
4. Select a Programstage, Organisation unit and set a Report date.
5. Click either One-time referral which will only refer TEI for one single event or Move
permanently which will move TEI and all its future events permantly to the selected
Organisation Unit.
7.7.5. Compare events
Sometimes it can be helpful to see data from previous events when entering data for a new
event. This can be achived by:
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Timeline Data entry widget, click the two pages icon (as seen in the image below).
Note
Note that this will only work for events that are repeatable.
7.8. Manage a TEI's enrollments
7.8.1. Deactivate a TEI's enrollment
If you deactivate a TEI dashboard, the TEI becomes 'read-only'. You can't enter data, enroll
the TEI or edit the TEI's profile.
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Enrollment widget, click Deactivate.
4. Click Yes to confirm.
7.8.2. Activate a TEI's enrollment
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Enrollment widget, click Activate.
4. Click Yes to confirm.
7.8.3. Mark TEI's enrollment as complete
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Enrollment widget, click Complete.
Using the Tracker Capture app Reopen completed enrollment
48
4. Click Yes to confirm.
7.8.4. Reopen completed enrollment
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Enrollment widget, click Reopen.
4. Click Yes to confirm.
7.8.5. Display TEI's enrollment history
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Profile widget, click the Audit history icon.
7.8.6. Create a TEI enrollment note
An enrollment note is useful to record information about for example why an enrollment was
cancelled.
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Notes widget, type your note and click Add.
7.9. Send a message to a TEI
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Messaging widget and select SMS or E-mail.
4. Enter the required contact information.
If the TEI's profile contains an e-mail address or a phone number, these fields are filled in
automatically.
5. Type a message.
6. Click Send.
7.10. Mark a TEI for follow-up
You can use mark a TEI's enrollment for follow-up and then use this status as a filter when you
create Upcoming events and Overdue events reports. This can be useful for example to
monitor high-risk cases during a pregnancy program.
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Enrollment widget, click the Mark for follow-up icon.
7.11. Edit a TEI's profile
You edit a TEI's profile or tracked entity attributes in the Profile widget.
Using the Tracker Capture app Add a relationship to a TEI
49
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Profile widget, click Edit.
4. Modify the profile and click Save.
7.12. Add a relationship to a TEI
You can create a relationship from one TEI to another, for example linking a mother and a child
together or a husband and a wife. Depending on how the relationship type is configured, the
relative can inherit attributes.
Example7.3.Mother-Child relationship
Assume there are two programs: Antenatal care for the mother and Immunization for the child.
If first name, last name and address attributes are required for both programs, it is possible
to configure last name and address attributes as inheritable. Then during child registration,
there is no need to enter these inheritable attributes. You can add them automatically based
on the mother's value. If you want to have a different value for the child, you can override the
automatically generated value.
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. In the Relationships widget, and click Add.
4. Select a relationship type.
5. Search for the relative and select it.
6. Click Save.
7.13. Share a TEI dashboard
You can share a TEI dashboard via its web address.
1. Open the Tracker Capture app.
2. Open the dashboard you want to share.
3. Copy the URL.
Make sure that the URL contains "tei", "program" and "ou" (organisation unit) parameters.
4. Paste the URL in the sharing method of your choice, for example an e-mail or a message
within DHIS2.
If you're not logged in to DHIS2 when you click the link, you'll be asked to do so and then
taken to the dashboard.
7.14. Deactivate a TEI
If you deactivate a TEI, the TEI becomes 'read-only'. Data associated with the TEI is not deleted.
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3.
In the top right corner, click the button > Deactivate.
Using the Tracker Capture app Activate a TEI
50
4. Click Yes to confirm.
7.15. Activate a TEI
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3.
In the upper top corner, click the button > Activate.
4. Click Yes to confirm.
7.16. Delete a TEI
Warning
When you delete a TEI, you delete all data associated with the TEI.
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3.
In the top right corner, click the button > Delete.
4. Click Yes to confirm.
7.17. Configure the TEI dashboard
7.17.1. Show or hide widgets
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. Click the Settings icon, and select Show/hide widgets.
4. Select the widgets you want to show or hide.
5. Click Close.
7.17.2. Save the dashboard's layout as default
You can save the dashboard's layout as default for a program.
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. Click the Settings icon, and select Save dashboard layout as default.
7.17.3. Lock dashboard's layout
If you are the administrator you have the option of locking the layout of the dashboard for
all users.
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. Organize the widgets to the desired layout and save it as default (see section above).
Using the Tracker Capture app Top bar
51
4. Click the Settings icon, and select Lock layout for all users.
Users will still be able to reorganize the widgets temporarily, but the layout will be reset to
the admin's saved layout after page refresh. The remove widget buttons will be hidden when
the dashboard layout is locked.
7.17.4. Top bar
The top bar can be a helpful tool to see important data in a quick and easy way. To start using
the top bar:
1. Open the Tracker Capture app.
2. Open an existing TEI dashboard.
3. Click the Settings icon, and select Top bar settings.
4. Click Activate top bar and click the data you would like to display in the top bar.
7.18. Create reports
1. Open the Tracker Capture app.
2. Click Reports.
3. Select a report type.
Table7.2.Report types in the Tracker Capture app
Report type Description
Program summary A summary report for a particular program,
organisation unit and time frame. The
report consist of a list of TEIs and
their records organised based on program
stages.
Program statistics A statistics report for a particular program.
The report provides for example an
overview of drop-outs or completion rates
in a given time frame at a particular
organisation unit.
Upcoming events A tabular report showing tracked entity
instances and their upcoming events for
a selected program and time. You can
sort the columns and search the values.
Show/hide operations are possible on the
columns. You can also export the table to
Microsoft Excel.
Overdue events A list of events for a selected program. The
report displays a list of TEIs and their events
that are not completed on time. You can
Using the Tracker Capture app Create reports
52
Report type Description
sort the columns and search the values You
can also export the table to Microsoft Excel.
Example7.4.Program summary report
The summary report displays a list of TEIs and their records for "MNCH/PNC (Adult Woman)"
program. The records are organized in the form of tabs where each tab is a program stage.
The columns in the table are data elements which are configured to be displayed in reports
under program stage definition.
Analyze data in pivot tables About the Pivot Table app
53
Chapter 8. Analyze data in pivot tables
8.1. About the Pivot Table app
With the Pivot Table app, you can create pivot tables based on all available data dimensions in
DHIS2. A pivot table is a dynamic tool for data analysis which lets you summarize and arrange
data according to its dimensions. Examples of data dimensions in DHIS2 are:
data dimension itself (for example data elements, indicators and events)
periods (representing the time period for the data)
organisation hierarchy (representing the geographical location of the data)
From these dimensions you can freely select dimension items to include in the pivot table.
You can create additional dimensions in DHIS2 with the group set functionality. This allows for
different aggregation pathways, such as aggregation by "Partner" or facility type.
A pivot table can arrange data dimensions on columns, rows, and as filters. When you place
a data dimension on columns, the pivot table will display one column per dimension item. If
you place multiple data dimensions on columns, the pivot table displays one column for all
combinations of the items in the selected dimensions. When you place a data dimension on
rows, the pivot table displays one row per dimension item in a similar fashion. The dimensions
you select as filters will not be included in the pivot table, but will aggregate and filter the table
data based on the selected filter items.
Constraints and tips
You must select at least one dimension on columns or rows.
You must include at least one period.
Data element group sets and reporting rates can't appear in the same pivot table.
A pivot table can't contain more than the maximum number of analytic records which
have been specified in the system settings. The maximum number of records could
also be constrained by the maximum RAM which is available to your browser. Consider
making smaller tables instead of one table which displays all of your data elements
and indicators together.
The Pivot Table app supports drill-down and up for periods and organisation unit. This
means that you can for example drill down from yearly periods to quarters, months
and weeks inside a pivot table. You can also drill down from the global organisation
unit to countries, provinces and facilities.
8.2. Create a pivot table
1. Open the Pivot Table app.
2. In the menu to the left, select the dimension items you want to analyse, for example data
elements or indicators.
3. Click Layout and arrange the data dimensions as columns, rows and filters.
You can keep the default selection if you want.
4. Click Update.
Example 8.1. Example pivot table with data elements as columns and periods as
rows.
In this example, indicators are listed as columns and periods as rows.
Analyze data in pivot tables Select dimension items
54
8.2.1. Select dimension items
The left menu lists sections for all available data dimensions. From each section you can select
any number of dimension items. As an example, you can open the section for data elements
and select any number of data elements from the available list. You can select an item by
marking it and clicking on the arrow in the section header or simply double-clicking on the item.
Before you can use a data dimension in your pivot table you must at least select one dimension
item. If you arrange a dimension as columns or rows but do not select any dimension items,
the dimension is ignored.
You must choose at least one data dimension type to create a pivot table. The available types
are described in this table:
Table8.1.Data dimension types
Data dimension type Definition Examples
Indicators An indicator is a calculated
formula based on data
elements.
Coverage of immunization
across a specific district.
Data elements Represents the phenomenon
for which data has been
captured.
Number of malaria cases;
number of BCG doses given.
Data sets A collection of data elements
grouped for data collection.
You can select :
Reporting rates: the
percentage of actual
reports compared to
the expected number of
reports
Reporting rates on
time: the reporting rates
based on timely form
submissions. A timely
submission must happen
within a number of days
after the reporting period.
Actual reports: the actual
number of reports
Actual reports on time:
the actual number of
reports based on timely
form submissions. A timely
submission must happen
Reporting rates for
immunization and morbidity
forms.
Analyze data in pivot tables Select dimension items
55
Data dimension type Definition Examples
within a number of days
after the reporting period.
Expected reports: the
number of expected
reports based on
organisation units where
the data set and the
reporting frequency has
been assigned.
Event data items A data element that is part
of a program representing
events that have been
captured.
Average weight and height
for children in a nutrition
program.
Program indicators A calculated formula based
on data elements in
a program representing
events.
Average BMI score for
children in a nutrition
program.
You can combine these dimensions to display for example aggregate data with reporting rates,
or event data items together with program indicators, all in the same pivot tables. For the "data
element" data dimension, you are also able to select "Totals" and "Details", which will allow
you to view different category combination options together on the same pivot table.
For the period dimension you can choose between using fixed periods or relative periods. An
example of a fixed period is "January 2012". To select fixed periods start by selecting a period
type from the period type list. You can then select periods from the list of available periods.
Relative periods are periods relative to the current date. Examples of relative periods are "Last
month", "Last 12 months", "Last 5 years". Relative periods can be selected by ticking the check-
boxes next to each period. The main advantage of using relative periods is that when you save
a pivot table favorite, it will stay updated with the latest data as time goes by without the need
for constantly updating it.
For the organisation unit dimension you can select any number of organisation units from the
hierarchy. To select all organisation units below a specific parent organisation unit, right click
and click "Select all children". To manually select multiple organisation units, click and hold
the Ctrl key while clicking on organisation units. You can tick "User org unit", "User sub-units"
or "User sub-x2-units" in order to dynamically insert the organisation unit or units associated
with your user account. This is useful when you save a pivot table favorite and want to share
it with other users, as the organisation units linked with the other user's account will be used
when viewing the favorite.
Analyze data in pivot tables Modify pivot table layout
56
Selection of fixed and relative periods.
Dynamic dimensions can consist of organisation unit group sets, data element group sets, or
category option group sets which have been configured with the type of "Disaggregation".
Once the group sets have been configured, they will be come available in the pivot tables,
and can be used as additional analysis dimensions, for instance to analyse aggregate data
by Type of organisation unit or Implementing partner. Dynamic dimensions work the same as
fixed dimensions.
Tip
Some dynamic dimensions may contain many items. This can cause issues with certain
browsers due to the length of the URL when many dimension members are selected. A
special "All" check box is available for dynamic dimensions, which allows you to include
all available dimensions implicitly in your pivot table, without specifying each and every
dimension member.
8.2.2. Modify pivot table layout
After selecting data dimensions it is time to arrange your pivot table. Click "Layout" in the top
menu to open the layout screen. In this screen you can position your data dimensions as table
columns, rows or filters by clicking and dragging the dimensions from the dimensions list to the
respective column, row and filter lists. You can set any number of dimensions in any of the lists.
For instance, you can click on "Organisation units" and drag it to the row list in order to position
the organisation unit dimension as table rows. Note that indicators, data elements and data
set reporting rates are part of the common "Data" dimension and will be displayed together
in the pivot table. For instance, after selecting indicators and data elements in the left menu,
you can drag "Organisation Unit" from the available dimensions list to the row dimension list
in order to arrange them as rows in the pivot table.
Analyze data in pivot tables Change the display of your pivot table
57
The table layout screen.
After you have set up your pivot table you can click "Update" to render your pivot table, or click
"Hide" to hide the layout screen without any changes taking effect. Since we in our example
have selected both the period and organisation unit dimension as rows, the pivot table will
generate all combinations of the items in these dimensions and produce a table like this:
Pivot table where organisation units and periods are repeated on rows.
8.3. Change the display of your pivot table
1. Open the Pivot Table app.
2. Create a new pivot table or open a favorite.
3. Click Options.
Analyze data in pivot tables Change the display of your pivot table
58
4. Set the options as required.
Table8.2.Pivot table options
Option Description
Data Show column totals
Show row totals
Displays total values in the table for
each row and column, as well as a
total for all values in the table.
Show column sub-totals
Show row sub-totals
Displays subtotals in the table for
each dimension.
If you only select one dimension,
subtotals will be hidden for those
columns or rows. This is because
the values will be equal to the
subtotals.
Show dimension labels Shows the dimension names as part
of the pivot tables.
Hide empty rows Hides empty rows from the table.
This is useful when you look at
large tables where a big part of the
dimension items don't have data
in order to keep the table more
readable.
Hide empty columns Hides empty columns from the
table. This is useful when you look
at large tables where a big part of
the dimension items don't have
data in order to keep the table more
readable.
Skip rounding Skips the rounding of data values,
offering the full precision of data
values. Can be useful for finance
data where the full dollar amount is
required.
Aggregation type The default aggregation operator
can be over-ridden here, by
selecting a different aggregation
operator. Some of the aggregation
types are Count, Min and Max.
Number type Sets the type of value you want
to display in the pivot table:
Value, Percentage of row or
Percentage of column.
The options Percentage of row
andPercentage of column
mean that you'll display values
as percentages of row total or
percentage of column total instead
of the aggregated value. This is
useful when you want to see the
contribution of data elements,
Analyze data in pivot tables Change the display of your pivot table
59
Option Description
categories or organisation units to
the total value.
Measure criteria Allows for the data to be filtered on
the server side.
You can instruct the system to
return only records where the
aggregated data value is equal,
greater than, greater or equal, less
than or less or equal to certain
values.
If both parts of the filter are used,
it's possible to filter out a range of
data records.
Events Include only completed
events
Includes only completed events
in the aggregation process.
This is useful for example to
exclude partial events in indicator
calculations.
Organisation
units
Show hierarchy Shows the name of all ancestors
for organisation units, for
example "Sierra Leone / Bombali /
Tamabaka / Sanya CHP" for Sanya
CHP.
The organisation units are then
sorted alphabetically which will
order the organisation units
according to the hierarchy.
When you download a pivot table
with organisation units as rows and
you've selected Show hierarchy,
each organisation unit level is
rendered as a separate column.
This is useful for example when you
create Excel pivot tables on a local
computer.
Legend Apply legend Applies a legend to the values. This
mean that you can apply a colour to
the values.
Select By data item to color the
table cells individually according to
each data element or indicator.
You configure legends in the
Maintenance app.
Style Colors the text or background of
cells in pivot tables based on the
selected legend.
Analyze data in pivot tables Manage favorites
60
Option Description
You can use this option for
scorecards to identify high and low
values at a glance.
Style Display density Controls the size of the cells
in the table. You can set it
to Comfortable, Normal or
Compact.
Compact is useful when you want
to fit large tables into the browser
screen.
Font size Controls the size of the table text
font. You can set it to Large,
Normal or Small.
Digit group separator Controls which character to
separate groups of digits or
"thousands". You can set it to
Comma, Space or None.
General Table title Type a title here to display it above
the table.
Parameters
(for standard
reports only)
Note
You create standard reports in the Reports app.
In the Pivot Table app you set which parameters the system
should prompt the user for.
Reporting period Controls whether to ask user to
enter a report period.
Organisation unit Controls whether to ask user to
enter an organisation unit.
Parent organisation unit Controls whether to ask user to
enter a parent organisation unit.
Include regression Includes a column with regression
values to the pivot table.
Include cumulative Includes a column with cumulative
values to the pivot table.
Sort order Controls the sort order of the
values.
Top limit Controls the maximum number of
rows to include in the pivot table.
5. Click Update.
8.4. Manage favorites
Saving your charts or pivot tables as favorites makes it easy to find them later. You can also
choose to share them with other users as an interpretation or display them on the dashboard.
You view the details and interpretations of your favorites in the Pivot Table, Data Visualizer,
Event Visualizer, Event Reports apps. Use the Favorites menu to manage your favorites.
Analyze data in pivot tables Open a favorite
61
8.4.1. Open a favorite
1. Click Favorites > Open.
2. Enter the name of a favorite in the search field, or click Prev and Next to display favorites.
3. Click the name of the favorite you want to open.
8.4.2. Save a favorite
1. Click Favorites > Save as.
2. Enter a Name and a Description for your favorite.
3. Click Save.
8.4.3. Rename a favorite
1. Click Favorites > Rename.
2. Enter the new name for your favorite.
3. Click Update.
8.4.4. Write an interpretation for a favorite
An interpretation is a link to a resource with a description of the data at a given period. This
information is visible in the Dashboard app. To create an interpretation, you first need to
create a favorite. If you've shared your favorite with other people, the interpretation you write
is visible to those people.
1. Click Favorites > Write interpretation.
2. In the text field, type a comment, question or interpretation. You can see this information
in the Dashboard app.
3. Search for a user group that you want to share your favorite with, then click the + icon.
4. Change sharing settings for the user groups you want to modify.
Can edit and view: Everyone can view and edit the object.
Can view only: Everyone can view the object.
None: The public won't have access to the object. This setting is only applicable to Public
access.
5. Click Share.
8.4.5. Create a link to a favorite
1. Click Favorites > Get link.
2. Select one of the following:
Open in this app: You get a URL for the favorite which you can share with other users
by email or chat.
Open in web api: You get a URL of the API resource. By default this is an HTML resource,
but you can change the file extension to ".json" or ".csv".
8.4.6. Delete a favorite
1. Click Favorites > Delete.
2. Click OK.
8.4.7. View interpretations based on relative periods
To view interpretations for relative periods, such as a year ago:
Analyze data in pivot tables Download data from a pivot table
62
1. Open a favorite with interpretations.
2. Click >>> in the top right of the workspace.
3. Click an interpretation. Your chart displays the data and the date based on when the
interpretation was created.To view other interpretations, click them.
8.5. Download data from a pivot table
8.5.1. Download table layout data format
To download the data in the current pivot table:
1. Click Download.
2. Under Table layout, click the format you want to download: Microsoft Excel, CSV or HTML.
The data table will have one column per dimension and contain names of the dimension
items.
Tip
When you download a pivot table with organisation units as rows and you've selected
Show hierarchy in Table options, each organisation unit level is rendered as a
separate column. This is useful for example when you create Excel pivot tables on a
local computer.
Tip
You can create a pivot table in Microsoft Excel from the downloaded Excel file.
8.5.2. Download plain data source format
You can download data in the current pivot table in JSON, XML, Excel, and CSV as plain data
formats with different identification schemes (ID, Code, and Name). The data document uses
identifiers of the dimension items and opens in a new browser window to display the URL of
the request to the Web API in the address bar. This is useful for developers of apps and other
client modules based on the DHIS2 Web API or for those who require a plan data source, for
instance for import into statistical packages.
To download plain data source formats:
1. Click Download.
2. Under Plain data source, click the format you want to download.
Table8.3.Available formats
Format Action Description
JSON Click JSON Downloads JSON format based on ID
property.
You can also download JSON format based
on Code or Name property.
XML Click XML Downloads XML format based on ID
property.
You can also download XML format based
on Code or Name property.
Analyze data in pivot tables Download a CSV format without
rendering data in the web browser
63
Format Action Description
Microsoft
Excel
Click Microsoft Excel Downloads XML format based on ID
property.
You can also download Microsoft Excel
format based on Code or Name property.
CSV Click CSV Downloads CSV format based on ID
property.
You can also download CSV format based
on Code or Name property.
JRXML Put the cursor on Advanced
and click JRXML
Produces a template of a Jasper Report
which can be further customized based on
your exact needs and used as the basis
for a standard report in DHIS2.
Raw data SQL Put the cursor on Advanced
and click Raw data SQL
Provides the actual SQL statement used
to generate the pivot table. You can use it
as a data source in a Jasper report, or as
the basis for an SQL view.
8.5.3. Download a CSV format without rendering data in the web browser
You can download data in CSV format directly without rendering the data in the web browser.
This helps to reduce any constraints in the system settings that has been set with regards to
the maximum number of analytic records. This lets you download much larger batches of data
that you can use for later offline analysis.
To download data in CSV format without first rendering data in the web browser:
1. Click the arrow beside Update.
2. Click CSV to download the format based on ID property.
The file downloads to your computer.
Tip
You can also download CSV format based on Code or Name property.
8.6. Embed a pivot table in an external web page
Certain analysis-related resources in DHIS2, like pivot tables, charts and maps, can be
embedded in any web page by using a plug-in. You will find more information about the plug-
ins in the Web API chapter in the DHIS2 Developer Manual.
To generate a HTML fragment that you can use to display the pivot table in an external web
page:
1. Click Embed.
2. Click Select to highlight the HTML fragment.
Analyze data in pivot tables Visualize pivot table data as a chart or a
map
64
8.7. Visualize pivot table data as a chart or a map
When you have made a pivot table you can switch between pivot table, chart and map
visualization of your data.
8.7.1. Open a pivot table as a chart
1. Click Chart > Open this table as chart.
Your current pivot table opens as a chart.
8.7.2. Open a pivot table selection as a chart
If you want to visualize a small part of your pivot table as a chart you can click directly on a
value in the table instead opening the whole table.
1. In the pivot table, click a value.
2. To verify the selection, hold the cursor over Open selection as chart. The highlighted
dimension headers in the table indicate what data will be visualized as a chart.
3. Click Open selection as chart.
8.7.3. Open a pivot table as a map
1. Click Chart > Open this table as map
Your current pivot table opens as a map.
8.7.4. Open a pivot table selection as a map
1. In the pivot table, click a value.
A menu displays.
2. Click Open selection as map.
Your selection opens as a map.
Using the Data Visualizer app About the Data Visualizer app
65
Chapter 9. Using the Data Visualizer app
9.1. About the Data Visualizer app
With the Data Visualizer app, you can select content, for example indicators, data elements,
periods and organisation units, for an analysis. The app works well over poor Internet
connections and generates charts in the web browser.
Constraints and tips
Hide and show individual data series in the chart by clicking directly on the series label
in the chart. They appear either at the top or to the right of the chart.
Click the triple left-arrow button on the top centre menu. This collapses the left side
menu and gives more space for the chart. You can get the menu back by clicking on
the same button again.
9.2. Create a chart
1. Open the Data Visualizer app and select a chart type.
2. In the menu to the left, select the metadata you want to analyse. You must select one or
more elements from all of the three dimensions - data (indicators, data elements, reporting
rates), periods (relative, fixed) and organisation units (units or groups).
Note
If you've access to the system settings, you can change the default period type under
General settings > Default relative period for analysis.
Last 12 Months from the period dimension and the root organisation unit are selected by
default.
3. Click Layout and arrange the dimensions.
You can keep the default selection if you want.
4. Click Update.
Using the Data Visualizer app Select a chart type
66
9.3. Select a chart type
The Data Visualizer app has nine different chart types, each with different characteristics.
To select a chart type:
1. In Chart type, click the chart type you need.
Table9.1.Chart types
Chart type Description
Column chart Displays information as vertical rectangular columns with
lengths proportional to the values they represent.
Useful when you want to, for example, compare
performance of different districts.
Stacked column chart Displays information as vertical rectangular columns,
where bars representing multiple categories are stacked
on top of each other.
Useful when you want to, for example, display trends or
sums of related data elements.
Bar chart Same as column chart, only with horizontal bars.
Stacked bar chart Same as stacked column chart, only with horizontal bars.
Line chart Displays information as a series of points connected by
straight lines. Also referred to as time series.
Useful when you want to, for example, visualize trends in
indicator data over multiple time periods.
Area chart Is based on line chart, with the space between the axis
and the line filled with colors and the lines stacked on top
of each other.
Useful when you want to compare the trends of related
indicators.
Pie chart Circular chart divided into sectors (or slices).
Useful when you want to, for example, visualize the
proportion of data for individual data elements compared
to the total sum of all data elements in the chart.
Radar chart Displays data on axes starting from the same point. Also
known as spider chart.
Speedometer chart Semi-circle chart which displays values out of 100 %. Also
referred to as a gauge chart.
2. Click Update.
9.4. Select dimension items
A dimension refers to the elements which describe the data values in the system. There are
three main dimensions in the system:
Data: Includes data elements, indicators and datasets (reporting rates), describing the
phenomena or event of the data.
Periods: Describes when the event took place.
Organisation units: Describes where the event took place.
Using the Data Visualizer app Select indicators
67
The Data Visualizer app lets you use these dimensions completely flexible in terms of appearing
as series, categories and filter.
Note
You can select dimension items in different ways:
Double-click a dimension item name.
Highlight one or several dimension items and click the single-arrow.
To select all dimension items in a list, click the double-arrow.
To clear dimension items, use the arrows or double-click the names in the Selected
list.
9.4.1. Select indicators
The Data Visualizer app can display any number of indicators and data elements in a chart.
You can select both indicators and data elements to appear together in the same chart, with
their order of appearance the same as the order in which they are selected.
1. Click Data and select Indicators.
2. Select an indicator group.
The indicators in the selected group appear in the Available list.
3. Select one or several indicators by double-clicking the name.
The indicator moves to the Selected list.
9.4.2. Select data elements
The Data Visualizer app can display any number of indicators and data elements in a chart.
You can select both indicators and data elements to appear together in the same chart, with
their order of appearance the same as the order in which they are selected.
1. Click Data and select Data elements.
2. Select a data element group.
The data elements in the selected group appear in the Available list.
3. Select one or several data elements by double-clicking the name.
The data element moves to the Selected list.
9.4.3. Select reporting rates
The Data Visualizer app can display reporting rates in a chart, by itself or together with
indicators and data elements. Reporting rates are defined by data sets.
1. Click Data and select Reporting rates.
The reporting rates appear in the Available list.
2. Select one or several reporting rates by double-clicking the name.
The reporting rate moves to the Selected list.
9.4.4. Select fixed and relative periods
1. Click Periods.
Using the Data Visualizer app Select organisation units
68
2. Select one or several periods.
You can combine fixed periods and relative periods in the same chart. Overlapping periods
are filtered so that they only appear once.
Fixed periods: In the Select period type box, select a period type. You can select any
number of fixed periods from any period type.
Relative periods: In the lower part of the Periods section, select as many relative periods
as you like. The names are relative to the current date. This means that if the current
month is March and you select Last month, the month of February is included in the chart.
9.4.5. Select organisation units
1. Click Organisation units.
2. Click the gearbox icon.
3. Select a Selection mode and an organisation unit.
There are three different selection modes:
Table9.2.Selection modes
Selection mode Description
Select organisation units Lets you select the organisation units you want to
appear in the chart from the organization tree.
Select User org unit to disable the organisation
unit tree and only select the organisation unit that is
related to your profile.
Select User sub-units to disable the organisation
unit tree and only select the sub-units of the
organisation unit that is related to your profile.
Select User sub-x2-units to disable the
organisation unit tree and only select organisation
units two levels down from the organisation unit that
is related to your profile.
This functionality is useful for administrators to
create a meaningful "system" favorite. With this
option checked all users find their respective
organisation unit when they open the favorite.
Select levels Lets you select all organisation units at one or more
levels, for example national or district level.
You can also select the parent organisation unit in
the tree, which makes it easy to select for example,
all facilities inside one or more districts.
Select groups Lets you select all organisation units inside one or
several groups and parent organisation units at the
same time, for example hospitals or chiefdoms.
4. Click Update.
9.4.6. Select additional dimension items
Depending on the settings for your organisation unit group sets and data element group sets,
you can select additional dimension items from the left menu.
Using the Data Visualizer app Select series, category and filter
69
Here you can add dimension items such as age, sex, etc. without having to add them as detailed
data element selections. This is useful when you want to separate these categories in your
analysis.
The additional dimension items you select are available in Chart layout as dimensions.
9.5. Select series, category and filter
You can define which dimension of the data you want to appear as series, category and filter.
1. Click Layout.
2. Drag and drop the dimensions to the appropriate space. Only one dimension can be in each
section.
3. Click Update.
Using the Data Visualizer app Change the display of your chart
70
Example9.1.Chart illustrating the concepts of series, categories and filter
Series: A series is a set of continuous, related elements (for example periods or data
elements) which you want to visualize in order to emphasize trends or relations in its data.
Categories: A category is a set of elements (for example indicators or organisation units) for
which you want to compare its data.
Filter: The filter selection will filter the data displayed in the chart. Note that if you use the
data dimension as filter, you can only specify a single indicator or data set as filter item,
whereas with other dimension types you can select any number of items.
9.6. Change the display of your chart
1. Click Options.
2. Set the options as required.
Table9.3.Chart options
Option Description
Data Show values Shows the values above the series
in the chart.
Use 100% stacked
values
Displays 100 % stacked values in
column charts.
Use cumulative values Displays cumulative values in line
charts.
Hide empty categories Hides the category items with no
data from the chart.
None: doesn't hide any of the
empty categories
Before first: hides missing values
only before the first value
Using the Data Visualizer app Change the display of your chart
71
Option Description
After last: hides missing values
only after the last value
Before first and after last: hides
missing values only before the first
value and after the last value
All: hides all missing values
This is useful for example when you
create column and bar charts.
Trend line Displays the trend line which
visualizes how your data evolves
over time. For example if
performance is improving or
deteriorating. Useful when periods
are selected as category.
Target line value/title Displays a horizontal line at the
given domain value. Useful for
example when you want to compare
your performance to the current
target.
Base line value/title Displays a horizontal line at the
given domain value. Useful for
example when you want to visualize
how your performance has evolved
since the beginning of a process.
Sort order Allows you to sort the values on
your chart from either low to high or
high to low.
Aggregation type Defines how the data elements or
indicators will be aggregated within
the chart. Some of the aggregation
types are By data element,
Count, Min and Max.
Events Include only completed
events
Includes only completed events in
the aggregation process. This is
useful when you want for example
to exclude partial events in indicator
calculations.
Axes Range axis min/max Defines the maximum and minimum
value which will be visible on the
range axis.
Range axis tick steps Defines the number of ticks which
will be visible on the range axis.
Range axis decimals Defines the number of decimals
which will be used for range axis
values.
Range axis title Type a title here to display a label
next to the range axis (also referred
to as the Y axis). Useful when you
Using the Data Visualizer app Manage favorites
72
Option Description
want to give context information
to the chart, for example about the
unit of measure.
Domain axis title Type a title here to display a
label below the domain axis (also
referred to as the X axis). Useful
when you want to give context
information to the chart, for
example about the period type.
Style No space between
columns/bars
Removes the space between the
columns or bars in the chart. Useful
for displaying the chart as an EPI
curve.
General Hide chart legend Hides the legend and leaves more
room for the chart itself.
Hide chart title Hides the title (default or custom) of
your chart.
Chart title Type a title here to display a custom
title above the chart. If you don't
enter a title, the default title is
displayed.
Hide chart subtitle Hides the subtitle of your chart.
Chart subtitle Type a subtitle here to display a
custom subtitle above the chart but
below the title. If you don't enter a
subtitle, no subtitle is displayed in
the chart.
3. Click Update.
9.7. Manage favorites
Saving your charts or pivot tables as favorites makes it easy to find them later. You can also
choose to share them with other users as an interpretation or display them on the dashboard.
You view the details and interpretations of your favorites in the Pivot Table, Data Visualizer,
Event Visualizer, Event Reports apps. Use the Favorites menu to manage your favorites.
9.7.1. Open a favorite
1. Click Favorites > Open.
2. Enter the name of a favorite in the search field, or click Prev and Next to display favorites.
3. Click the name of the favorite you want to open.
9.7.2. Save a favorite
1. Click Favorites > Save as.
2. Enter a Name and a Description for your favorite.
3. Click Save.
Using the Data Visualizer app Rename a favorite
73
9.7.3. Rename a favorite
1. Click Favorites > Rename.
2. Enter the new name for your favorite.
3. Click Update.
9.7.4. Write an interpretation for a favorite
An interpretation is a link to a resource with a description of the data at a given period. This
information is visible in the Dashboard app. To create an interpretation, you first need to
create a favorite. If you've shared your favorite with other people, the interpretation you write
is visible to those people.
1. Click Favorites > Write interpretation.
2. In the text field, type a comment, question or interpretation. You can see this information
in the Dashboard app.
3. Search for a user group that you want to share your favorite with, then click the + icon.
4. Change sharing settings for the user groups you want to modify.
Can edit and view: Everyone can view and edit the object.
Can view only: Everyone can view the object.
None: The public won't have access to the object. This setting is only applicable to Public
access.
5. Click Share.
9.7.5. Create a link to a favorite
1. Click Favorites > Get link.
2. Select one of the following:
Open in this app: You get a URL for the favorite which you can share with other users
by email or chat.
Open in web api: You get a URL of the API resource. By default this is an HTML resource,
but you can change the file extension to ".json" or ".csv".
9.7.6. Delete a favorite
1. Click Favorites > Delete.
2. Click OK.
9.7.7. View interpretations based on relative periods
To view interpretations for relative periods, such as a year ago:
1. Open a favorite with interpretations.
2. Click >>> in the top right of the workspace.
3. Click an interpretation. Your chart displays the data and the date based on when the
interpretation was created.To view other interpretations, click them.
9.8. Download a chart as an image or a PDF
After you have created a chart you can download it to your local computer as an image or
PDF file.
Using the Data Visualizer app Download chart data source
74
1. Click Download.
2. Under Graphics, click Image (.png) or PDF (.pdf).
The file is automatically downloaded to your computer. Now you can for example embed the
image file into a text document as part of a report.
9.9. Download chart data source
You can download the data source behind a chart in JSON, XML, Excel, CSV, JXRML or Raw data
SQL formats with different identification schemes (ID, Code, and Name). The data document
uses identifiers of the dimension items and opens in a new browser window to display the URL
of the request to the Web API in the address bar. This is useful for developers of apps and other
client modules based on the DHIS2 Web API or for those who require a plan data source, for
instance for import into statistical packages.
To download plain data source formats:
1. Click Download.
2. Under Plain data source, click the format you want to download.
Table9.4.Available formats
Format Action Description
JSON Click JSON Downloads JSON format based on ID
property.
You can also download JSON format
based on Code or Name property.
XML Click XML Downloads XML format based on ID
property.
You can also download XML format
based on Code or Name property.
Microsoft
Excel
Click Microsoft Excel Downloads Microsoft Excel format based
on ID property.
You can also download Microsoft
Excel format based on Code or Name
property.
CSV Click CSV Downloads CSV format based on ID
property.
You can also download CSV format
based on Code or Name property.
JRXML Put the cursor on
Advanced and click JRXML
Produces a template of a Jasper Report
which can be further customized based
on your exact needs and used as the
basis for a standard report in DHIS 2.
Raw data SQL Put the cursor on
Advanced and click Raw
data SQL
Provides the actual SQL statement used
to generate the data visualization. You
can use it as a data source in a Jasper
report, or as the basis for a SQL view.
Using the Data Visualizer app Embed charts in any web page
75
9.10. Embed charts in any web page
Certain analysis-related resources in DHIS2, like pivot tables, charts and maps, can be
embedded in any web page by using a plug-in. You will find more information about the plug-
ins in the Web API chapter in the DHIS2 Developer Manual.
To generate a HTML fragment that you can use to display the chart in an external web page:
1. Click Share > Embed in web page.
The Embed in web page window opens.
2. Click Select to highlight the HTML fragment.
9.11. Open a chart as a pivot table or as a map
Open a Chart and click Chart or click Map.
Using the GIS app About the GIS app
77
Chapter 10. Using the GIS app
10.1. About the GIS app
With the GIS app you can overlay multiple layers and choose among different base maps. You
can create thematic maps of areas and points, view facilities based on classifications, and
visualize catchment areas for each facility. You can add labels to areas and points, and search
and filter using various criteria. You can move points and set locations on the fly. Maps can be
saved as favorites and shared with other people.
Note
To use predefined legends in the GIS app, you need to create them first in the
Maintenance app.
Here's an overview of the GIS app workspace
The icons in the top left of the workspace represent the map layers. They are the starting
point of the GIS app.
The panel on the right side of the workspace shows an overview of the layers:
The default base map is OSM Light. It's selected by default. If you're online you'll also see
OpenStreetMap, Google Streets and Google Hybrid. You can use these maps as background
maps and layers. Switch between them by selecting or clearing the checkbox.
If you want to increase or reduce the opacity of a layer, use the up and down arrows for
the selected layer.
Use the map legends when you create a thematic map. A legend explains the link between
values and colors on your map.
Zoom to content automatically adjusts the zoom level and map center position to put the
data on your map in focus.
To view information for an event, simply click the event.
Right-click to display the longitude and latitude of the map.
10.2. Create a new thematic map
You use four vector layers to create a thematic map. The workflow for creating a new thematic
map is:
Using the GIS app Manage event layers
78
1. In the Apps menu, click GIS.
The DHIS2 GIS window opens.
2. In the top menu, click a layer you want to add to the map.
Event layer
Facility layer
Boundary layer
Thematic layer 1 - 4
3. Click Edit layer and select the parameters you need..
4. Click Update.
10.3. Manage event layers
The event layer displays the geographical location of events registered in the DHIS2 tracker.
Provided that events have associated GPS coordinates, you can use this layer to drill down
from the aggregated data displayed in the thematic layers to the underlying individual events
or cases.
You can also display aggregated events at the facility or at the boundary level. You do this
through a thematic layer using event data items. This is useful when you only have the
coordinates for the Org Unit under which the events are recorded.
Event layer
10.3.1. Create or modify event layer
1. In the top menu, click the event layer icon.
2. Click Edit layer.
3. Select a program and then select a program stage.
If there is only one stage available for the selected program, the stage is automatically
selected. A list of data elements and attributes will appear in the Available data items
panel.
4. Select any data element or attribute from this list as part of your query.
Using the GIS app Turn off cluster
79
To select you can either double-click a data element or (multi) select and use the single-
arrow downward button. The double-arrow button will select all data elements in the list.
All selected data elements will get their own row in the Selected data items.
For data elements of type text you will get two choices: Contains implies that the query
will match all values which contains your search value, and Is exact implies that only
values which is completely identical to your search query will be returned.
For data elements of type option set, you can select any of the options from the drop down
box by using the down-wards arrow or by start typing directly in the box to filter for options.
5. In the Periods section, select the time span for when the events took place. You can select
either a fixed period or a relative period.
Fixed period: In the Period field, select Start/end dates and fill in a start date and an
end date.
Relative period: In the Period field, select one of the relative periods, for example This
month or Last year.
6. In the Organisation units section, select the organisation units you want to include in the
query.
7. In the Options section, you can:
Select a value from the Coordinate field for the positions shown on the map. By default,
"Event location" is selected. Depending on the data elements or attributes that belong to
a program, other coordinates such as "Household position" are available.
Select or clear Clustering to group nearby events.
Go to Style to select a color for the cluster points or change the radius of clusters (between
1 and 20).
Clustering if you want to group nearby events and change the style of the cluster points.
8. Click Update.
10.3.2. Turn off cluster
By default events are clustered in a map. You can turn off this function to display all events
separately.
1. In the top menu, click the event layer icon.
2. Click Edit layer.
3. Click Options.
Using the GIS app Modify cluster style
80
4. Clear Group nearby events check box.
5. Click Update.
10.3.3. Modify cluster style
1. In the top menu, click the event layer icon.
2. Click Edit layer.
3. In the Options section, change the Point color and Point radius.
4. Click Update.
10.3.4. Modify information in event pop-up windows
For events in a cluster map, you can modify the information displayed in the event pop-up
window.
Pop-up window with event information
1. Open the Programs / Attributes app.
2. Click Program.
3. Click the program you want to modify and select View program stages.
4. Click the program stage name and select Edit.
5. Scroll down to the Selected data elements section.
6. For every data element you want to display in the pop-up window, select corresponding
Display in reports.
7. Click Update.
10.3.5. Clear event layer
To clear all data in a map:
1. In the top menu, click the event layer icon.
2. Click Clear.
10.4. Manage facility layers
The facility layer displays icons that represent types of facilities. Polygons do not show up on
the map, so make sure that you select an organisation unit level that has facilities.
A polygon is an enclosed area on a map representing a country, a district or a park. In GIS, a
polygon is a shape defined by one or more rings, where a ring is a path that starts and ends
at the same point.
Using the GIS app Create or modify a facility layer
81
Facility layer
10.4.1. Create or modify a facility layer
1. In the top menu, click the facility layer icon.
2. Click Edit layer.
3. In the Organisation unit group icons section, select a Group set.
4. In the Organisation units section, select one or several organisation units.
5. In the Options section, select if you want to show labels and if so, how they look.
6. In the Options section, select if you want to display a circle with a certain radius around
each facility.
7. Click Update.
10.4.2. Search for an organisation unit
To locate an organisation unit in the map:
1. In the top menu, click the facility layer icon.
2. Click Search.
The Organisation unit search dialog box opens.
3. In the text field, type the name of the organisation unit you are looking for or click a name
in the list.
The organisation unit is highlighted in the map.
10.4.3. Clear facility layer
To clear all data in a facility layer:
1. In the top menu, click the facility layer icon.
2. Click Clear.
10.5. Manage facilities in a layer
You can have facilities in Facility, Boundary and Thematic layers.
Using the GIS app Relocate a facility
82
10.5.1. Relocate a facility
1. Right-click a facility and click Relocate.
2. Put the cursor in the new location.
The new coordinate is stored permanently. This cannot be undone.
10.5.2. Swap longitude and latitude of a facility
1. Right-click a facility and click Swap long/lat.
This is useful if a user inverted latitude and longitude coordinates when creating the
organisation unit.
10.5.3. Display facility information
You can view organisation unit information set by the administrator as follows:
Table10.1.View organisation unit information
Function Action
View information for the current
period
1. Click a facility.
View information for a selected
period
1. Right-click a facility and click Show information.
2. In the Infrastructural data section, select a
period.
Note
You configure the displayed infrastructural data
in the System Settings app.
10.6. Manage thematic layers 1- 4
There are four thematic layers in the GIS app. With these layers panels you can use your data
for thematic mapping. Select your desired combination of indicator/data element, and period.
then the organisation unit level. If your database has coordinates and aggregated data values
for these organisation units, they will appear on the map.
Note
You must refresh the DHIS2 analytics tables to have aggregated data values available.
Using the GIS app Create or modify a thematic layer
83
Example of a thematic map
10.6.1. Create or modify a thematic layer
1. In the top menu, click the icon of the thematic layer you want to create or modify.
2. Click Edit layer.
3. In the Data and periods section, select the data and periods you want to display.
4. In the Organisation units section, select one or several organisation units.
5. In the Options section, go to Legend type and select Automatic or Predefined.
Automatic legend types means that the application will create a legend set for you based
on your what method, number of classes, low color and high color you select. Method
alludes to the size of the legend classes.
Set to Equal intervals they will be “highest map value lowest map value / number of
classes”.
Set to Equal counts the legend creator will try to distribute the organisation units evenly.
The legend appears as an even gradation from the start color to the end color.
If you have facilities in your thematic layer, you can set the radius for maximum and
minimum values by changing the values in the Low color / size and High color size
boxes.
6. In the Options section, select if you want to show labels and if so, how they look.
7. In the Options panel, select an aggregation type. See also Aggregation operators.
8. Click Update.
10.6.2. Filter values in a thematic layer
Thematic layer 1-4 menu have a Filter option in addition to the boundary layer menu options.
It lets you apply value filters to the organisation units on the map. The filter is removed when
you close the filter window.
To filter values in a thematic layer:
1. In the top menu, click the icon of thematic layer you want to create or modify.
2. Click Filter....
3. Modify the Greater than and And/or lower than values.
Using the GIS app Search for an organisation unit
84
4. Click Update.
10.6.3. Search for an organisation unit
To locate an organisation unit in a thematic layer:
1. In the top menu, click the relevant thematic layer icon.
2. Click Search.
The Organisation unit search dialog box opens.
3. In the text field, type the name of the organisation unit you are looking for or click a name
in the list.
The organisation unit is highlighted in the map.
10.6.4. Navigate between organisation hierarchies
When there are visible organisation units on the map, you can easily navigate up and down in
the hierarchy without using the level/parent user interface.
1. Right-click one of the organisation units.
2. Select Drill up or Drill down.
The drill down option is disabled if you are on the lowest level or if there are no coordinates
available on the level below. Vice versa goes for drilling up.
10.6.5. Clear thematic layer
To clear all data in a thematic layer:
1. In the top menu, click the relevant thematic layer icon.
2. Click Clear.
10.7. Manage boundary layers
The boundary layer displays the borders and locations of your organisation units. This layer is
useful if you are offline and don't have access to background maps.
Boundary layer
Using the GIS app Create or modify boundary layers
85
10.7.1. Create or modify boundary layers
1. In the top left menu, click the boundary layer icon.
2. Click Edit layer.
3. In the Organisation units section, select one or several organisation units.
You can select the organisation units you want to show on the map by selecting a level and a
parent. That means "show all organisations units at this level that are children of this parent".
4. In the Options section, select if you want to show labels and if so, how they look.
5. Click Update.
10.7.2. Search for organisation units
To locate an organisation unit on the map:
1. In the top menu, click the boundary layer icon.
2. Click Search.
The Organisation unit search dialog box opens.
3. In the text field, type the name of the organisation unit you are looking for or click a name
in the list.
The organisation unit is highlighted in the map.
10.7.3. Navigate between organisation hierarchies
When there are visible organisation units on the map, you can easily navigate up and down in
the hierarchy without using the level/parent user interface.
1. Right-click one of the organisation units.
2. Select Drill up or Drill down.
The drill down option is disabled if you are on the lowest level or if there are no coordinates
available on the level below. The same applies when you are drilling up.
10.7.4. Clear boundary layer
To clear data in a boundary layer:
1. In the top menu, click the boundary layer icon.
2. Click Clear.
Using the GIS app Manage Earth Engine layer
86
10.8. Manage Earth Engine layer
The Google Earth Engine layer lets you display satellite imagery and geospatial datasets from
Google's vast catalog. This layer is useful in combination with thematic and event layers to
enhance analysis. The following layers are supported:
Elevation: Metres above sea level
Nighttime lights: Lights from cities, towns, and other sites with persistent lighting, including
gas flares (from 2013)
Population density: Population in 100 x 100 m grid cells (from 2010)
Temperature, population and land cover at any location.
Right-click on the layers to view more information, for example temperature and elevation.
10.8.1. Create or modify an Earth Engine layer
1. In the top menu, click the Google Earth Engine layer icon.
2. Select a data set, for example "Elevation".
3. Select Min / max value.
The meaning of these values depend on which data set you've selected.
Using the GIS app Add external map layers
87
4. Select a Color scale.
5. Select the number of Steps.
The number of steps means the number of distinct colors in the color scale.
6. Click Update.
10.9. Add external map layers
1. In the top menu, click the External layer icon.
2. Click Edit to add a new layer.
3. Select a layer from the list.
4. Click Update.
To remove a layer, click Clear.
To hide a layer, go to the Layer stack/opacity menu pane and clear the External layer
checkbox.
Here are some examples of external layers:
Example 1: First-order administrative boundaries
Using the GIS app Add external map layers
88
Example 2: Aerial imagery of Dar-es-Salaam
Example 3: Dark basemap with nighttime lights from Google Earth Engine
Example 4: World time zones
Note
To define external map layers, see the Maintenance app documentation.
Using the GIS app Manage map favorites
89
10.10. Manage map favorites
Favorite maps
Saving your maps as favorites makes it easy to restore them later. It also gives you the
opportunity to share them with other users as an interpretation or put it on the dashboard. You
can save all types of layers as a favorite. A favorite always opens with the default background
map.
10.10.1. Save a map as a favorite
When you have created a map it is convenient to save it as a favorite:
1. Click Favorites.
The Manage favorites dialog box opens.
2. Click Add new.
The Create new favorite dialog box opens.
3. In the text field, type the name you want to give your pivot table.
4. Click Create.
Your favorite is added to the list.
10.10.2. Open a favorite
1. Click Favorites.
The Manage favorites dialog box opens.
2. Find the favorite you want to open. You can either use Prev and Next or the search field to
find a saved favorite. The list is filtered on every character that you enter.
3. Click the name.
10.10.3. Rename a favorite
1. Click Favorites.
The Manage favorites dialog box opens.
2. Find the favorite you want to rename.
You can either use Prev and Next or the search field to find a saved favorite.
3. Click the grey rename icon next to the favorite's name.
The Rename favorite dialog box favorite opens.
Using the GIS app Overwrite a favorite
90
4. Type the new name and click Update.
10.10.4. Overwrite a favorite
To save the current map to an existing favorite (overwrite):
1. Click Favorites.
The Manage favorites dialog box opens.
2. Find the favorite you want to overwrite.
You can either use Prev and Next or the search field to find a saved favorite.
3. Click the green overwrite icon next to the favorite's name.
4. Click OK to confirm that you want to overwrite the favorite.
10.10.5. Share a map interpretation
For certain analysis-related resources in DHIS2, you can share a data interpretation. An
interpretation is a link to the relevant resource together with a text expressing some insight
about the data.
To create an interpretation of a map and share it with all users of the system:
1. Open or create a favorite map.
2. Click Share > Write interpretation.
The Write interpretation dialog box opens.
3. In the text field, type a comment, question or interpretation.
4. Click Share.
The dialog box closes automatically. You can see the interpretation on the Dashboard.
10.10.6. Modify sharing settings for a favorite
After you have created a map and saved it as a favorite, you can share the favorite with
everyone or a user group. To modify the sharing settings:
1. Click Favorites.
2. Find the favorite you want to share.
You can either use Prev and Next or the search field to find a saved favorite.
3. Click the blue share icon next to the favorite's name.
4. In the text box, enter the name of the user group you want to share your favorite with and
click the + icon.
The chosen user group is added to the list of recipients.
Repeat the step to add more user groups.
5. If you want to allow external access, select the corresponding box.
6. For each user group, choose an access setting. The options are:
• None
Can view
Can edit and view
7. Click Save.
Using the GIS app Delete a favorite
91
10.10.7. Delete a favorite
1. Click Favorites.
The Manage favorites dialog box opens.
2. Find the favorite you want to delete.
You can either use Prev and Next or the search field to find a saved favorite.
3. Click the red delete icon next to the favorite's name.
4. Click OK to confirm that you want to delete the favorite.
10.11. Save a map as an image
1. Take a screenshot of the map with the tool of your choice.
2. Save the screenshot in desired format.
10.12. Embed a map in an external web page
Certain analysis-related resources in DHIS2, like pivot tables, charts and maps, can be
embedded in any web page by using a plug-in. You will find more information about the plug-
ins in the Web API chapter in the DHIS2 Developer Manual.
To generate a HTML fragment that you can use to display the map in an external web page:
1. Click Share > Embed in web page.
The Embed in web page window opens.
2. Click Select to highlight the HTML fragment.
10.13. Search for a location
The place search function allows you to search for almost any location or address. The place
search is powered by the Mapzen mapping platform. This function is useful in order to locate
for example sites, facilities, villages or towns on the map.
1. On the left side of the GIS window, click the magnifier icon.
Using the GIS app Measure distances and areas in a map
92
2. Type the location you're looking.
A list of matching locations appear as you type.
3. From the list, select a location. A pin indicates the location on the map.
10.14. Measure distances and areas in a map
1. In the upper left part of the map, put the cursor on the Measure distances and areas icon
and click Create new measurement.
2. Add points to the map.
3. Click Finish measurement.
10.15. Get the latitude and longitude at any location
Right-click a map and select Show longitude/latitude. The values display in a pop-up
window.
10.16. View a map as a pivot table or chart
When you have made a map you can switch between pivot table, chart and map visualization
of your data. The function is inactive if the data the map is based on cannot render as a chart
or table.
10.16.1. Open a map as a chart
1. Click Chart > Open this map as chart.
Your current map opens as a chart.
10.16.2. Open a map as a pivot table
1. Click Chart > Open this map as table.
Your current map opens as a pivot table.
10.17. See also
Manage legends
Using the Maps app About the Maps app
93
Chapter 11. Using the Maps app
11.1. About the Maps app
The Maps App is introduced in release 2.29 and serves as a replacement of the GIS App offering
a more intuitive and user-friendly interface.
With the Maps app you can overlay multiple layers and choose among different base maps.
You can create thematic maps of areas and points, view facilities based on classifications, and
visualize catchment areas for each facility. You can add labels to areas and points, and search
and filter using various criteria. You can move points and set locations on the fly. Maps can be
saved as favorites and shared with other users and groups.
Note
To use predefined legends in the Maps app, you need to create them first in the
Maintenance app.
Here's an overview of the Maps app workspace
The layer panel on the left side of the workspace shows an overview of the layers for the
current map:
As layers are added, using the (+) Add layer button, they are arranged and managed in
this panel.
The basemap is always shown in the panel. The default basemap is OSM Light and is
selected by default. OpenStreetMap Detailed, Google Streets and Google Hybrid are also
available. You can use these maps as background maps and layers. Switch between them
by selecting the desired image.
The small arrow button to the right of the layer panel, at the top, allows the panel to be
hidden or shown.
The Favorites button near the top left allows you to save and open maps:
New will clear any existing map layers to create a new thematic map.
Using the Maps app About the Maps app
94
Open will display a Favorites dialog to select an existing thematic map.
Favorites can also be renamed, shared and deleted through the
Favorites dialog. The title of the current favorite is displayed in the
header bar above the Favorites button.
Save will save any changes to the current favorite.
Save as will save the current thematic map as a new favorite.
Write interpretation will open a dialog where an interpretation for the current favorite
can be written.
Get link will provide a direct link and API link to the current favorite.
The + and - buttons on the map allow you to zoom in and out of the map respectively. The
mouse scroll wheel can also be used for altering the zoom.
Zoom to content (bounded magnifying glass symbol) automatically adjusts the zoom level
and map center position to put the data on your map in focus.
Search (magnifying glass symbol) allows searching for and jumping to a location on the map.
The ruler button allows you to find the distance between two locations on the map.
To view information for an event, simply click the event.
Right-click on the map to display the longitude and latitude of that location.
The home icon on the top right of the workspace will take you back to the DHIS2 dashboard.
The About button will display system version information.
Basemaps
Basemap layers are represented by layer cards in the layer panel such as:
Along the top of the basemap card from left to right are:
The title of the selected basemap
An eye symbol for toggling the visibility of the layer
An arrow symbol to collapse and expand the basemap card
In the middle of the basemap card is the list of available basemaps. The current basemap is
highlighted.
Along the bottom of the basemap card is:
Using the Maps app Create a new map
95
A slider for modifying the layer transparency
11.2. Create a new map
You can create a new thematic map by adding one or more different layers in the DHIS2 Maps
app.
1. In the Apps menu, click Maps. The DHIS2 Maps window opens.
2. Click the (+) Add layer button in the top left. You are presented with the layer selection
dialog:
3. Select a layer to add to the current map. Possible options are:
Events
Facilities
Thematic
Boundaries
In addition, there are several layers provided by Google Earth Engine and other services:
Population density
Elevation
Temperature
Precipitation
Landcover
Nighttime lights
Labels overlay is an external layer defined in the database used for the above example
11.3. Manage event layers
The event layer displays the geographical location of events registered in the DHIS2 tracker.
Provided that events have associated GPS coordinates, you can use this layer to drill down
from the aggregated data displayed in the thematic layers to the underlying individual events
or cases.
You can also display aggregated events at the facility or at the boundary level. You do this
through a thematic layer using event data items. This is useful when you only have the
coordinates for the Org Unit under which the events are recorded.
Using the Maps app Create an event layer
96
Example of an event layer
Event layers are represented by layer cards in the layer panel such as:
Along the top of the event card from left to right are:
A grab field to allow dragging and re-ordering layers with the mouse
The title and period associated with the layer
An eye symbol for toggling the visibility of the layer
An arrow symbol to collapse and expand the event card
In the middle of the event card is a legend indicating the styling of the layer.
Along the bottom of the event card from left to right are:
An edit (pencil) button to open the layer configuration dialog
A slider for modifying the layer transparency
A delete (trash can) icon to remove the layer from the current thematic map.
11.3.1. Create an event layer
To create an event layer, choose Events on the Add layer selection. This opens the Events
layer configuration dialog.
1. In the DATA tab:
Using the Maps app Create an event layer
97
Select a program and then select a program stage. The Stage field is only shown once
a program is selected.
If there is only one stage available for the selected program, the stage is automatically
selected.
Select a value from the Coordinate field for the positions shown on the map. By default,
"Event location" is selected. Depending on the data elements or attributes that belong to
a program, other coordinates such as "Household position" are available.
2. In the PERIOD tab
select the time span for when the events took place. You can select either a fixed period
or a relative period.
Fixed period In the Period field, select Start/end dates and fill in a start date and
an end date.
Relative period In the Period field, select one of the relative periods, for example This
month or Last year.
3. In the FILTER tab:
Using the Maps app Create an event layer
98
Click ADD FILTER and select an available data item to add a new filter to the data set.
For data item of type text you will get two choices: Contains implies that the query will
match all values which contains your search value, and Is exact implies that only values
which is completely identical to your search query will be returned.
For data item of type option set, you can select any of the options from the drop down
box by using the down-wards arrow or by start typing directly in the box to filter for
options.
Multiple filters may be added. Click the X on the far right of the filter to remove it.
4. In the ORG UNITS tab:
Select the organisation units you want to include in the layer. It is possible to select either
One or more specific organisation units, or
A relative level in the organisation unit hierarchy, with respect to the user. By selecting
a User organisation unit the map data will appear differently for users at different
levels in the organisation unit hierarchy.
5. In the STYLE tab:
Using the Maps app Modify an event layer
99
Select Group events to group nearby events, or View all events to display events
individually.
Select a color for the event or cluster points.
Select the radius (between 1 and 20) for grouped events; also known as clusters.
6. Click ADD LAYER.
11.3.2. Modify an event layer
1. In the layer panel, click the edit (pencil) icon on the event layer card.
2. Modify the setting on the DATA, PERIOD, FILTER, ORG UNIT and STYLE tabs as desired.
3. Click UPDATE LAYER.
11.3.3. Modify information in event pop-up windows
For events in a cluster map, you can modify the information displayed in the event pop-up
window.
Pop-up window with event information
1. Open the Programs / Attributes app.
2. Click Program.
3. Click the program you want to modify and select View program stages.
4. Click the program stage name and select Edit.
5. Scroll down to the Selected data elements section.
6. For every data element you want to display in the pop-up window, select corresponding
Display in reports.
7. Click Update.
Using the Maps app Clear event layer
100
11.3.4. Clear event layer
To clear all event layer data in a map:
1. In the layer panel, click the delete (trash can) icon on the event layer card.
The layer is removed from the current map.
11.4. Manage facility layers
The facility layer displays icons that represent types of facilities. Polygons do not show up on
the map, so make sure that you select an organisation unit level that has facilities.
A polygon is an enclosed area on a map representing a country, a district or a park.
Example of a facility layer
Facility layers are represented by layer cards in the layer panel such as:
Along the top of the facilities card from left to right are:
A grab field to allow dragging and re-ordering layers with the mouse
The Facilities title
Using the Maps app Create a facility layer
101
An eye symbol for toggling the visibility of the layer
An arrow symbol to collapse and expand the facilities card
In the middle of the facilities card is a legend indicating the group set representation.
Along the bottom of the facilities card from left to right are:
An edit (pencil) button to open the layer configuration dialog
A data table toggle button to show or hide the data table associated with the layer
A slider for modifying the layer transparency
A delete (trash can) icon to remove the layer from the current thematic map.
11.4.1. Create a facility layer
To create facility layer, choose Facilities on the Add layer selection. This opens the Facility
layer configuration dialog.
1. In the GROUP SET tab:
Select a Group set from the list of organisation unit group sets defined for your DHIS2
instance.
2. In the ORGANISATION UNITS tab
select the organisation unit level(s) and/or group(s) from the selection fields on the right
hand side.
Select the organisation units you want to include in the layer. It is possible to select either
One or more specific organisation units, or
Using the Maps app Create or modify a facility layer
102
A relative level in the organisation unit hierarchy, with respect to the user. By selecting
a User organisation unit the map data will appear differently for users at different
levels in the organisation unit hierarchy.
3. In the STYLE tab:
select any styling you wish to apply to the facilities.
Show labels Allows labels to be shown on the layer. Font size, weight and color can be
modified here.
Show buffer Allows a visual buffer to be displayed on the layer around each facility. The
radius of the buffer can be modified here.
4. Click ADD LAYER.
11.4.2. Create or modify a facility layer
1. In the layer panel, click the edit (pencil) icon on the facility layer card.
2. Modify the setting on the GROUP SET, ORGANISATION UNITS and STYLE tabs as desired.
3. Click UPDATE LAYER.
11.4.3. Filter values in a facility layer
Facility layers have a data table option that can be toggled on or off from the facility layer
card.
Using the Maps app Search for a facility
103
Example of a faciltiy layer showing the data table
The data table displays the data forming the facility layer.
clicking on a title will sort the table based on that column; toggling between ascending and
descending.
entering text or expressions into the filter fields below the titles will apply those filters to the
data, and the display will adjust according to the filter. The filters are applied as follows:
NAME filter by name containing the given text
ID filter by IDs containing the given text
TYPE filter by GIS display types containing the given text
Note
Data table filters are temporary and are not saved with the map layers as part of the
favourite.
11.4.4. Search for a facility
The NAME filter field in the data table provides an effective way of searching for individual
facilities.
11.4.5. Remove facility layer
To clear all data in a facility layer:
1. In the layer panel, click the delete (trash can) icon on the facility layer card.
The layer is removed from the current map.
11.4.6. Manage facilities in a layer
You can have facilities in Facility, Boundary and Thematic layers.
Using the Maps app Manage thematic layers
104
11.4.6.1. Relocate a facility
1. Right-click a facility and click Relocate.
2. Put the cursor in the new location.
The new coordinate is stored permanently. This cannot be undone.
11.4.6.2. Swap longitude and latitude of a facility
1. Right-click a facility and click Swap longitude/latitude.
This is useful if a user inverted latitude and longitude coordinates when creating the
organisation unit.
11.4.6.3. Display facility information
You can view organisation unit information set by the administrator as follows:
Table11.1.View organisation unit information
Function Action
View information for the current
period
1. Click a facility.
View information for a selected
period
1. Right-click a facility and click Show information.
2. In the Infrastructural data section, select a
period.
Note
You configure the displayed infrastructural data
in the System Settings app.
11.5. Manage thematic layers
Thematic maps represent spatial variation of geographic distributions. Select your desired
combination of indicator/data element, period and organisation unit level. If your database has
coordinates and aggregated data values for these organisation units, they will appear on the
map.
Note
You must refresh the DHIS2 analytics tables to have aggregated data values available.
Using the Maps app Manage thematic layers
105
Example of a thematic map
Thematic layers are represented by layer cards in the layer panel such as:
Along the top of the thematic card from left to right are:
A grab field to allow dragging and re-ordering layers with the mouse
The title and period associated with the layer
An eye symbol for toggling the visibility of the layer
An arrow symbol to collapse and expand the thematic card
In the middle of the thematic card is a legend indicating the value ranges displayed on the
layer.
Along the bottom of the thematic card from left to right are:
An edit (pencil) button to open the layer configuration dialog
A data table toggle button to show or hide the data table associated with the layer
A slider for modifying the layer transparency
A delete (trash can) icon to remove the layer from the current thematic map.
Using the Maps app Create a thematic layer
106
11.5.1. Create a thematic layer
To create an event layer, choose Thematic on the Add layer selection. This opens the Events
layer configuration dialog.
1. In the DATA tab:
Select a data type and then select respectively the group and the target element. The
available fields depend on the type of item selected.
Select a value from the Aggregation type field for the data values to be shown on the
map. By default, "By data element" is selected. Alternative values are: Count; Average;
Sum; Standard deviation; Variance; Min; Max. See also Aggregation operators.
2. In the PERIOD tab
select the time span over which the thematic data is aggregated. You can select either a
fixed period or a relative period.
Fixed period In the Period type field select period length, then select the target
in the Period field.
Relative period In the Period type field select Relative, then select one of the
relative periods, for example This month or Last year, in the Period
field.
3. In the ORG UNITS tab:
Using the Maps app Modify a thematic layer
107
Select the organisation units you want to include in the layer. It is possible to select either
One or more specific organisation units, or
A relative level in the organisation unit hierarchy, with respect to the user. By selecting
a User organisation unit the map data will appear differently for users at different
levels in the organisation unit hierarchy.
4. In the STYLE tab:
Select either Automatic or Predefined legend.
Automatic legend types means that the application will create a legend set for you based
on your what method, number of classes, low color and high color you select. Method
alludes to the size of the legend classes. Set to
Equal intervals the range of each interval will be highest data value - lowest
data value / number of classes
Equal counts the legend creator will try to distribute the organisation units evenly.
If you have facilities in your thematic layer, you can set the radius for minimum
and maximum values by changing the values in the Low size and High size boxes
respectively.
5. Click ADD LAYER.
11.5.2. Modify a thematic layer
1. In the layer panel, click the edit (pencil) icon on the thematic layer card.
2. Modify the setting on the DATA, PERIOD, ORG UNITS and STYLE tabs as desired.
Using the Maps app Filter values in a thematic layer
108
3. Click UPDATE LAYER.
11.5.3. Filter values in a thematic layer
Thematic layers have a data table option that can be toggled on or off from the thematic
layer card.
Example of a thematic map showing the data table
The data table displays the data forming the thematic layer.
clicking on a title will sort the table based on that column; toggling between ascending and
descending.
entering text or expressions into the filter fields below the titles will apply those filters to the
data, and the display will adjust according to the filter. The filters are applied as follows:
NAME filter by name containing the given text
VALUE filter values by given numbers and/or ranges, for example: 2,>3&<8
LEGEND filter by legend containing the given text
RANGE filter by ranges containing the given text
LEVEL filter level by numbers and/or ranges, for example: 2,>3&<8
PARENT filter by parent names containing the given text
ID filter by IDs containing the given text
TYPE filter by GIS display types containing the given text
COLOR filter by color names containing the given text
Using the Maps app Search for an organisation unit
109
Example of filtering by name in the data table
Note
Data table filters are temporary and are not saved with the map layers as part of the
favourite.
11.5.4. Search for an organisation unit
The NAME filter field in the data table provides an effective way of searching for individual
organisation units.
11.5.5. Navigate between organisation hierarchies
When there are visible organisation units on the map, you can easily navigate up and down in
the hierarchy without using the level/parent user interface.
1. Right-click one of the organisation units.
2. Select Drill up one level or Drill down one level.
The drill down option is disabled if you are on the lowest level or if there are no coordinates
available on the level below. Likewise the drill up option is disabled from the highest level.
11.5.6. Remove thematic layer
To clear all data in a thematic layer:
1. In the layer panel, click the delete (trash can) icon on the thematic layer card.
The layer is removed from the current map.
11.6. Manage boundary layers
The boundary layer displays the borders and locations of your organisation units. This layer is
particularly useful if you are offline and don't have access to background maps.
Using the Maps app Create a boundary layer
110
Boundary layer
Boundary layers are represented by layer cards in the layer panel such as:
Along the top of the boundary card from left to right are:
A grab field to allow dragging and re-ordering layers with the mouse
The Boundaries title
An eye symbol for toggling the visibility of the layer
An arrow symbol to collapse and expand the boundary card
Along the bottom of the boundary card from left to right are:
An edit (pencil) button to open the layer configuration dialog
A data table toggle button to show or hide the data table associated with the layer
A slider for modifying the layer transparency
A delete (trash can) icon to remove the layer from the current thematic map.
11.6.1. Create a boundary layer
To create boundary layer, choose Boundaries on the Add layer selection. This opens the
Boundary layer configuration dialog.
1. In the ORGANISATION UNITS tab
Using the Maps app Modify a boundary layer
111
select the organisation unit level(s) and/or group(s) from the selection fields on the right
hand side.
Select the organisation units you want to include in the layer. It is possible to select either
One or more specific organisation units, or
A relative level in the organisation unit hierarchy, with respect to the user. By selecting
a User organisation unit the map data will appear differently for users at different
levels in the organisation unit hierarchy.
2. In the STYLE tab:
select any styling you wish to apply to the boundaries.
Show labels Allows labels to be shown on the layer. Font size and weight can be
modified here.
Point radius Sets the base radius when point type elements, such as facilities, are
presented on the boundary layer.
3. Click ADD LAYER.
11.6.2. Modify a boundary layer
1. In the layer panel, click the edit (pencil) icon on the boundary layer card.
2. Modify the setting on the ORGANISATION UNITS and STYLE tabs as desired.
3. Click UPDATE LAYER.
Using the Maps app Filter values in a boundary layer
112
11.6.3. Filter values in a boundary layer
Boundary layers have a data table option that can be toggled on or off from the boundary
layer card.
Example of a boundary layer showing the data table
The data table displays the data forming the boundary layer.
clicking on a title will sort the table based on that column; toggling between ascending and
descending.
entering text or expressions into the filter fields below the titles will apply those filters to the
data, and the display will adjust according to the filter. The filters are applied as follows:
NAME filter by name containing the given text
LEVEL filter level by numbers and/or ranges, for example: 2,>3&<8
PARENT filter by parent names containing the given text
ID filter by IDs containing the given text
TYPE filter by GIS display types containing the given text
Note
Data table filters are temporary and are not saved with the map layers as part of the
favourite.
11.6.4. Search for an organisational unit
The NAME filter field in the data table provides an effective way of searching for individual
organisational units displayed in the boundary layer.
11.6.5. Navigate between organisation hierarchies
You can modify the target of the boundary layer in the hierarchy without using the level/parent
user interface.
Using the Maps app Remove boundary layer
113
1. Right-click one of the boundaries.
2. Select Drill up one level or Drill down one level.
The drill down option is disabled if you are on the lowest level. Likewise the drill up option
is disabled from the highest level.
11.6.6. Remove boundary layer
To clear all data in a boundary layer:
1. In the layer panel, click the delete (trash can) icon on the boundary layer card.
The layer is removed from the current map.
11.7. Manage Earth Engine layer
The Google Earth Engine layer lets you display satellite imagery and geospatial datasets from
Google's vast catalog. These layers is useful in combination with thematic and event layers to
enhance analysis. The following layers are supported:
Population density estimates with national totals adjusted to match UN population division
estimates. Population in 100 x 100 m grid cells (from 2010).
Elevation above sea-level. You can adjust the min and max values so it better representes
the terrain in your region.
Temperature: Land surface temperatures collected from satellite. Blank spots will appear in
areas with a persistent cloud cover.
Precipitation collected from satellite and weather stations on the ground. The values are in
millimeters within 5 days periods. Updated monthly, during the 3rd week of the following
month.
Land cover: 17 distinct landcover types collected from satellites.
Nighttime lights: Lights from cities, towns, and other sites with persistent lighting, including
gas flares (from 2013).
Using the Maps app Create an Earth Engine layer
114
11.7.1. Create an Earth Engine layer
To create an Earth Engine layer, choose the desired layer from the Add layer selection. This
opens the layer configuration dialog.
1. In the STYLE tab
Modify the parameters specific to the layer type.
Adjust the legend range, steps and colors, as desired.
2. Click ADD LAYER.
11.8. Add external map layers
External map layers are represented as either:
Basemaps These are available in the basemap card in the layers panel and are selected as
any other basemap.
Overlays These are available in the Add layer selection. Unlike basemaps, overlays can be
placed above or below any other overlay layers.
Overlay layers are represented by additional layer cards in the layer panel such as:
Along the top of the overlay card from left to right are:
A grab field to allow dragging and re-ordering layers with the mouse
The title of the external map layer
An eye symbol for toggling the visibility of the layer
An arrow symbol to collapse and expand the overlay card
Along the bottom of the overlay card from left to right are:
A slider for modifying the layer transparency
A delete (trash can) icon to remove the layer from the current thematic map.
Using the Maps app Manage map favorites
115
Here are some examples of external layers:
Example 1: Dark basemap with nighttime lights from Google Earth Engine
Example 2: Terrain basemap
Example 3: Aerial imagery of Dar-es-Salaam
Note
To define external map layers, see the Section20.14, “Manage external map layers”.
11.9. Manage map favorites
Saving your maps as favorites makes it easy to restore them later. It also gives you the
opportunity to share them with other users as an interpretation or put it on the dashboard. You
can save all types of layer configurations as a favorite.
11.9.1. Open a favorite
1. Select Open from the Favorites menu.
The Favorites dialog box opens.
Using the Maps app Save a map as a new favorite
116
2. Find the favorite you want to open. You can either use < and > or the search field to find a
saved favorite. The list is filtered on every character that you enter.
3. Click the name to open that favorite.
11.9.2. Save a map as a new favorite
When you have created a map it is convenient to save it as a favorite:
1. Select Save as from the Favorites menu.
The Save as new favorite dialog box opens.
2. In the text field, type the name you want to give your map favorite.
3. Click SAVE.
Your favorite is added to the list.
11.9.3. Overwrite the current favorite
Select Save from the Favorites menu.
11.9.4. Rename a favorite
1. Select Open from the Favorites menu.
The Favorites dialog box opens.
Using the Maps app Delete a favorite
117
2. Find the favorite you want to rename.
You can either use < and > or the search field to find a saved favorite.
3. Click the more options icon (three dots) at the right of the favorite row, and select Rename.
The Rename favorite dialog box opens.
4. Edit the name and/or description.
5. Click SAVE.
The favorite is updated.
11.9.5. Delete a favorite
1. Select Open from the Favorites menu.
The Favorites dialog box opens.
2. Find the favorite you want to delete.
You can either use < and > or the search field to find a saved favorite.
3. Click the more options icon (three dots) at the right of the favorite row, and select Delete.
A confirmation dialog is displayed.
4. Click DELETE to confirm that you want to delete the favorite.
11.9.6. Modify sharing settings for a favorite
After you have created a map and saved it as a favorite, you can share the favorite with
everyone or a user group. To modify the sharing settings:
1. Select Open from the Favorites menu.
The Favorites dialog box opens.
2. Find the favorite you want to share.
You can either use < and > or the search field to find a saved favorite.
3. Click the more options icon (three dots) at the right of the favorite row, and select Share.
The Sharing settings dialog box opens.
4. In the text box, search for the name of the user or group you want to share your favorite
with and select it.
The chosen user or group is added to the list of recipients.
Repeat the step to add more user groups.
5. If you want to allow external access, select the corresponding box.
6. For each user group, choose an access setting. The options are:
None (for default groups only, as they cannot be removed)
Can view
Can edit and view
7. Click CLOSE to close the dialog.
11.9.7. Share a map interpretation
For certain analysis-related resources in DHIS2, you can share a data interpretation. An
interpretation is a link to the relevant resource together with a text expressing some insight
about the data.
Using the Maps app Save a map as an image
118
To create an interpretation of a map and share it with all users of the system:
1. Select Write interpretation from the Favorites menu.
The Write interpretation dialog box opens.
2. In the text field, type a comment, question or interpretation.
3. Click SAVE.
The dialog box closes automatically. You can see the interpretation on the Dashboard.
11.10. Save a map as an image
1. Take a screenshot of the map with the tool of your choice.
2. Save the screenshot in desired format.
11.11. Search for a location
The place search function allows you to search for almost any location or address. This function
is useful in order to locate for example sites, facilities, villages or towns on the map.
1. On the right side of the Maps window, click the magnifier icon.
2. Type the location you're looking.
A list of matching locations appear as you type.
3. From the list, select a location. A pin indicates the location on the map.
11.12. Measure distances and areas in a map
1. In the upper left part of the map, put the cursor on the Measure distances and areas
(ruler) icon and click Create new measurement.
2. Add points to the map.
3. Click Finish measurement.
Using the Maps app Get the latitude and longitude at any
location
119
11.13. Get the latitude and longitude at any location
Right-click a point on the map and select Show longitude/latitude. The values display in a
pop-up window.
11.14. See also
Manage legends
Using the Event Reports app About the Event Reports app
121
Chapter 12. Using the Event Reports app
12.1. About the Event Reports app
With the Event Reports app you can analyse events in two types of reports:
Aggregated event reports: Pivot table-style analysis with aggregated numbers of events
By selecting Aggregated values from the top-left menu you can use the Event Reports
app to create pivot tables with aggregated numbers of events. An event report is always
based on a program. You can do analysis based on a range of dimensions. Each dimension
can have a corresponding filter. Dimensions can be selected from the left-side menu.
Individual event reports: Lists of events
By selecting Events from the top-left menu you can use the Event Reports app to make
searches or queries for events based on a flexible set of criteria. The report will be displayed
as a table with one row per event. Each dimension can be used as a column in the table or as
a filter. Each dimension can have a criteria (filter). Data elements of type option set allows
for "in" criteria, where multiple options can be selected. Numeric values can be compared
to filter values using greater than, equal or less than operators.
12.2. Create an event report
1. Open the Event Reports app.
2. Select Aggregated values or Events.
3. In the menu to the left, select the meta data you want to analyse.
4. Click Layout and arrange the dimensions.
You can keep the default selection if you want.
5. Click Update.
Using the Event Reports app Select dimension items
122
12.3. Select dimension items
An event report is always based on a program and you can do analysis based on a range of
dimensions. For programs with category combinations, you can use program categories and
category option group sets as dimensions for tables and charts. Each dimension item can have
a corresponding filter.
1. Select data elements:
a. Click Data.
b. Select a program and a program stage.
The data elements associated with the selected program are listed under Available. Each
data element acts as a dimension.
c. Select the data elements you need by double-clicking their names.
Data elements can be filtered by type (Data elements, Program attributes, Program
indicators) and are prefixed to make them easily recognizable.
After selecting a data element, it is visible under Selected data items.
d. (Optional) For each data element, specify a filter with operators such as "greater than",
"in" or "equal" together with a filter value.
2. Select periods.
a. Click Periods.
b. Select one or several periods.
You have three period options: relative periods, fixed periods and start/end dates. You can
combine fixed periods and relative periods in the same chart. You cannot combine fixed
periods and relative periods with start/end dates in the same chart. Overlapping periods
are filtered so that they only appear once.
Fixed periods: In the Select period type box, select a period type. You can select
any number of fixed periods from any period type. Fixed periods can for example be
"January 2014".
Relative periods: In the lower part of the Periods section, select as many relative
periods as you like. The names are relative to the current date. This means that if the
current month is March and you select Last month, the month of February is included
in the chart. Relative periods has the advantage that it keeps the data in the report up
to date as time goes.
Start/end dates: In the list under the Periods tab, select Start/end dates. This period
type lets you specify flexible dates for the time span in the report.
3. Select organisation units.
a. Click Organisation units.
b. Click the gearbox icon.
c. Select a Selection mode and an organisation unit.
There are three different selection modes:
Table12.1.Selection modes
Selection mode Description
Select organisation units Lets you select the organisation units you want to
appear in the chart from the organization tree.
Select User org unit to disable the organisation
unit tree and only select the organisation unit that is
related to your profile.
Using the Event Reports app Select series, category and filter
123
Selection mode Description
Select User sub-units to disable the organisation
unit tree and only select the sub-units of the
organisation unit that is related to your profile.
Select User sub-x2-units to disable the
organisation unit tree and only select organisation
units two levels down from the organisation unit that
is related to your profile.
This functionality is useful for administrators to
create a meaningful "system" favorite. With this
option checked all users find their respective
organisation unit when they open the favorite.
Select levels Lets you select all organisation units at one or more
levels, for example national or district level.
You can also select the parent organisation unit in
the tree, which makes it easy to select for example,
all facilities inside one or more districts.
Select groups Lets you select all organisation units inside one or
several groups and parent organisation units at the
same time, for example hospitals or chiefdoms.
4. Click Update.
12.4. Select series, category and filter
You can define which data dimension you want to appear as columns, rows and filters in the
pivot table. Each data element appears as individual dimensions and can be placed on any
of the axes.
Note
Data elements of continuous value types (real numbers/decimal numbers) can only be
used as filters, and will automatically be positioned as filters in the layout dialog. The
reason for this is that continuous number cannot be grouped into sensible ranges and
used on columns and rows.
1. Click Layout.
2. Drag and drop the dimensions to the appropriate space.
3. Click Update.
12.5. Change the display of your table
You can customize the display of an event report.
1. Click Options.
2. Set the options as required. Available options are different between aggregated event
reports and individual event reports.
Using the Event Reports app Change the display of your table
124
Table12.2.Event reports options
Option Description Available for
report type
Data Show column
totals
Displays totals at the end
of each column in the pivot
table.
Aggregated event
report
Show column
sub-totals
Displays sub-totals for each
column in the pivot table.
Aggregated event
report
Show row totals Displays totals at the end of
each row in the pivot table.
Aggregated event
report
Show row sub-
totals
Displays sub-totals for each
row in the pivot table.
Aggregated event
report
Show
dimension
labels
Displays labels for
dimensions.
Aggregated event
report
Hide empty
rows
Hides empty rows in the
pivot table.
Aggregated event
report
Hide n/a data Hides data tagged as N/A
from the chart.
Aggregated event
report
Include only
completed
events
Includes only completed
events in the aggregation
process. This is useful when
you want for example to
exclude partial events in
indicator calculations.
Aggregated event
report
Individual event
report
Limit Sets a limit of the maximum
number of rows that you
can display in the table,
combined with a setting
for showing top or bottom
values.
Aggregated event
report
Output type Defines the output type.
The output types are Event,
Enrollment andTracked
entity instance.
Aggregated event
report
Program status Filters data based on the
program status: All, Active,
Completed or Cancelled.
Aggregated event
report
Event status Filters data based on the
event status: All, Active,
Completed, Scheduled,
Overdue or Skipped.
Aggregated event
report
Organisation
units
Show hierarchy Includes the names of
all parents of each
organisation unit in labels.
Aggregated event
report
Style Display density Controls the size of the cells
in the table. You can set it
to Comfortable, Normal or
Compact.
Aggregated event
report
Individual event
report
Using the Event Reports app Download chart data source
125
Option Description Available for
report type
Compact is useful when
you want to fit large tables
into the browser screen.
Font size Controls the size of the table
text font. You can set it to
Large, Normal or Small.
Aggregated event
report
Individual event
report
Digit group
separator
Controls which character to
separate groups of digits or
"thousands". You can set it
to Comma, Space or None.
Aggregated event
report
Individual event
report
3. Click Update.
12.6. Download chart data source
You can download the data source behind an event report in HTML, JSON, XML, Microsoft Excel
or CSV formats.
1. Click Download.
2. Under Plain data source, click the format you want to download.
Table12.3.Available formats
Format Description
HTML Creates HTML table based on selected meta data
JSON Downloads data values in JSON format based on selected meta
data
XML Downloads data values in XML format based on selected meta
data
Microsoft Excel Downloads data values in Microsoft Excel format based on
selected meta data
CSV Downloads data values in CSV format based on selected meta
data
12.7. Manage favorites
Saving your charts or pivot tables as favorites makes it easy to find them later. You can also
choose to share them with other users as an interpretation or display them on the dashboard.
You view the details and interpretations of your favorites in the Pivot Table, Data Visualizer,
Event Visualizer, Event Reports apps. Use the Favorites menu to manage your favorites.
12.7.1. Open a favorite
1. Click Favorites > Open.
2. Enter the name of a favorite in the search field, or click Prev and Next to display favorites.
3. Click the name of the favorite you want to open.
Using the Event Reports app Save a favorite
126
12.7.2. Save a favorite
1. Click Favorites > Save as.
2. Enter a Name and a Description for your favorite.
3. Click Save.
12.7.3. Rename a favorite
1. Click Favorites > Rename.
2. Enter the new name for your favorite.
3. Click Update.
12.7.4. Write an interpretation for a favorite
An interpretation is a link to a resource with a description of the data at a given period. This
information is visible in the Dashboard app. To create an interpretation, you first need to
create a favorite. If you've shared your favorite with other people, the interpretation you write
is visible to those people.
1. Click Favorites > Write interpretation.
2. In the text field, type a comment, question or interpretation. You can see this information
in the Dashboard app.
3. Search for a user group that you want to share your favorite with, then click the + icon.
4. Change sharing settings for the user groups you want to modify.
Can edit and view: Everyone can view and edit the object.
Can view only: Everyone can view the object.
None: The public won't have access to the object. This setting is only applicable to Public
access.
5. Click Share.
12.7.5. Create a link to a favorite
1. Click Favorites > Get link.
2. Select one of the following:
Open in this app: You get a URL for the favorite which you can share with other users
by email or chat.
Open in web api: You get a URL of the API resource. By default this is an HTML resource,
but you can change the file extension to ".json" or ".csv".
12.7.6. Delete a favorite
1. Click Favorites > Delete.
2. Click OK.
12.7.7. View interpretations based on relative periods
To view interpretations for relative periods, such as a year ago:
1. Open a favorite with interpretations.
2. Click >>> in the top right of the workspace.
3. Click an interpretation. Your chart displays the data and the date based on when the
interpretation was created.To view other interpretations, click them.
Using the Event Reports app Visualize an event report as a chart
127
12.8. Visualize an event report as a chart
When you have made an event report you can open it as a chart:
Click Chart > Open this chart as table.
Using the Event Visualizer app About the Event Visualizer app
129
Chapter 13. Using the Event Visualizer
app
13.1. About the Event Visualizer app
With the Event Visualizer app, you can create charts based on event data.
13.2. Create a chart
1. <Open the Event Visualizer app and select a chart type.
2. In the menu to the left, select the meta data you want to analyse.
3. Click Layout and arrange the dimensions.
You can keep the default selection if you want.
4. Click Update.
13.3. Select a chart type
The Event Visualizer app has eight different chart types, each with different characteristics.
To select a chart type:
1. In Chart type, click the chart type you need.
Table13.1.Chart types
Chart type Description
Column chart Displays information as vertical rectangular columns with
lengths proportional to the values they represent.
Useful when you want to, for example, compare
performance of different districts.
Stacked column chart Displays information as vertical rectangular columns,
where bars representing multiple categories are stacked on
top of each other.
Using the Event Visualizer app Select dimension items
130
Chart type Description
Useful when you want to, for example, display trends or
sums of related data elements.
Bar chart Same as column chart, only with horizontal bars.
Stacked bar chart Same as stacked column chart, only with horizontal bars.
Line chart Displays information as a series of points connected by
straight lines. Also referred to as time series.
Useful when you want to, for example, visualize trends in
indicator data over multiple time periods.
Area chart Is based on line chart, with the space between the axis and
the line filled with colors and the lines stacked on top of
each other.
Useful when you want to compare the trends of related
indicators.
Pie chart Circular chart divided into sectors (or slices).
Useful when you want to, for example, visualize the
proportion of data for individual data elements compared
to the total sum of all data elements in the chart.
Radar chart Displays data on axes starting from the same point. Also
known as spider chart.
2. Click Update.
13.4. Select dimension items
An event chart is always based on a program and you can do analysis based on a range of
dimensions. For programs with category combinations, you can use program categories and
category option group sets as dimensions for tables and charts. Each dimension item can have
a corresponding filter. You select dimension items from the left-side menu.
1. Select data elements:
a. Click Data.
b. Select a program and a program stage.
The data elements associated with the selected program are listed under Available. Each
data element acts as a dimension.
c. Select the data elements you need by double-clicking their names.
Data elements can be filtered by type (Data elements, Program attributes, Program
indicators) and are prefixed to make them easily recognizable.
After selecting a data element, it is visible under Selected data items.
d. (Optional) For each data element, specify a filter with operators such as "greater than",
"in" or "equal" together with a filter value.
2. Select periods.
a. Click Periods.
b. Select one or several periods.
You have three period options: relative periods, fixed periods and start/end dates. You can
combine fixed periods and relative periods in the same chart. You cannot combine fixed
Using the Event Visualizer app Select dimension items
131
periods and relative periods with start/end dates in the same chart. Overlapping periods
are filtered so that they only appear once.
Fixed periods: In the Select period type box, select a period type. You can select
any number of fixed periods from any period type. Fixed periods can for example be
"January 2014".
Relative periods: In the lower part of the Periods section, select as many relative
periods as you like. The names are relative to the current date. This means that if the
current month is March and you select Last month, the month of February is included
in the chart. Relative periods has the advantage that it keeps the data in the report up
to date as time goes.
Start/end dates: In the list under the Periods tab, select Start/end dates. This period
type lets you specify flexible dates for the time span in the report.
3. Select organisation units.
a. Click Organisation units.
b. Click the gearbox icon.
c. Select a Selection mode and an organisation unit.
There are three different selection modes:
Table13.2.Selection modes
Selection mode Description
Select organisation units Lets you select the organisation units you want to
appear in the chart from the organization tree.
Select User org unit to disable the organisation
unit tree and only select the organisation unit that is
related to your profile.
Select User sub-units to disable the organisation
unit tree and only select the sub-units of the
organisation unit that is related to your profile.
Select User sub-x2-units to disable the
organisation unit tree and only select organisation
units two levels down from the organisation unit that
is related to your profile.
This functionality is useful for administrators to
create a meaningful "system" favorite. With this
option checked all users find their respective
organisation unit when they open the favorite.
Select levels Lets you select all organisation units at one or more
levels, for example national or district level.
You can also select the parent organisation unit in
the tree, which makes it easy to select for example,
all facilities inside one or more districts.
Select groups Lets you select all organisation units inside one or
several groups and parent organisation units at the
same time, for example hospitals or chiefdoms.
4. Click Update.
Using the Event Visualizer app Select series, category and filter
132
13.5. Select series, category and filter
You can define which data dimension you want to appear as series, category and filter. Each
data element appears as individual dimensions and can be placed on any of the axes. Series
and category panels can only have one dimension at the time.
Note
Data elements of continuous value types (real numbers/decimal numbers) can only be
used as filters, and will automatically be positioned as filters in the layout dialog. The
reason for this is that continuous number cannot be grouped into sensible ranges and
used on columns and rows.
1. Click Layout.
2. Drag and drop the dimensions to the appropriate space. Only one dimension can be in each
section.
3. Click Update.
13.6. Change the display of your chart
You can customize the display of an event report.
1. Click Options.
2. Set the options as required.
Table13.3.Chart options
Option Description
Data Show values Displays values as numbers on top of
each series.
Use 100% stacked
values
Displays 100 % stacked values in
column charts.
Use cumulative
values
Displays cumulative values in line
charts.
Hide n/a data Hides data tagged as N/A from the
chart.
Include only
completed events
Includes only completed events in
the aggregation process. This is
useful when you want for example
to exclude partial events in indicator
calculations.
Hide empty
categories
Hides the category items with no
data from the chart.
None: doesn't hide any of the empty
categories
Before first: hides missing values
only before the first value
After last: hides missing values only
after the last value
Using the Event Visualizer app Change the display of your chart
133
Option Description
Before first and after last: hides
missing values only before the first
value and after the last value
All: hides all missing values
This is useful for example when you
create column and bar charts.
Trend line Displays the trend line which
visualizes how your data evolves
over time. For example if
performance is improving or
deteriorating. Useful when periods
are selected as category.
Target line value/
title
Displays a horizontal line and title
(optional) at the given domain value.
Useful for example when you want
to compare your performance to the
current target.
Base line value/title Displays a horizontal line and title
(optional) at the given domain value.
Useful for example when you want
to visualize how your performance
has evolved since the beginning of a
process.
Sort order Allows you to sort the values on your
chart from either low to high or high
to low.
Output type Defines the output type. The
output types are Event, Enrollment
andTracked entity instance.
Program status Filters data based on the program
status: All, Active, Completed or
Cancelled.
Event status Filters data based on the event
status: All, Active, Completed,
Scheduled, Overdue or Skipped.
Axes Range axis min/max Defines the maximum and minimum
value which will be visible on the
range axis.
Range axis tick steps Defines the number of ticks which
will be visible on the range axis.
Range axis decimals Defines the number of decimals
which will be used for range axis
values.
Range axis title Type a title here to display a label
next to the range axis (also referred
to as the Y axis). Useful when you
want to give context information to
Using the Event Visualizer app Download a chart as an image or a PDF
134
Option Description
the chart, for example about the unit
of measure.
Domain axis title Type a title here to display a label
below the domain axis (also referred
to as the X axis). Useful when you
want to give context information to
the chart, for example about the
period type.
General Hide chart legend Hides the legend and leaves more
room for the chart itself.
Hide chart title Hides the title (default or custom) of
your chart.
Chart title Type a title here to display a custom
title above the chart. If you don't
enter a title, the default title is
displayed.
Hide chart subtitle Hides the subtitle of your chart.
Chart subtitle Type a subtitle here to display a
custom subtitle above the chart but
below the title. If you don't enter a
subtitle, no subtitle is displayed in
the chart.
3. Click Update.
13.7. Download a chart as an image or a PDF
After you have created a chart you can download it to your local computer as an image or
PDF file.
1. Click Download.
2. Under Graphics, click PNG (.png) or PDF (.pdf).
The file is automatically downloaded to your computer. Now you can for example embed the
image file into a text document as part of a report.
13.8. Download chart data source
You can download the data source behind a chart in HTML, JSON, XML, Microsoft Excel or CSV
formats. The data document uses identifiers of the dimension items and opens in a new browser
window to display the URL of the request to the Web API in the address bar. This is useful for
developers of apps and other client modules based on the DHIS2 Web API or for those who
require a plan data source, for instance for import into statistical packages.
To download plain data source formats:
1. Click Download.
2. Under Plain data source, click the format you want to download.
Table13.4.Available formats
Format Description
HTML Creates HTML table based on selected meta data
Using the Event Visualizer app Manage favorites
135
Format Description
JSON Downloads data values in JSON format based on selected meta
data
XML Downloads data values in XML format based on selected meta
data
Microsoft Excel Downloads data values in Microsoft Excel format based on
selected meta data
CSV Downloads data values in CSV format based on selected meta
data
13.9. Manage favorites
Saving your charts or pivot tables as favorites makes it easy to find them later. You can also
choose to share them with other users as an interpretation or display them on the dashboard.
You view the details and interpretations of your favorites in the Pivot Table, Data Visualizer,
Event Visualizer, Event Reports apps. Use the Favorites menu to manage your favorites.
13.9.1. Open a favorite
1. Click Favorites > Open.
2. Enter the name of a favorite in the search field, or click Prev and Next to display favorites.
3. Click the name of the favorite you want to open.
13.9.2. Save a favorite
1. Click Favorites > Save as.
2. Enter a Name and a Description for your favorite.
3. Click Save.
13.9.3. Rename a favorite
1. Click Favorites > Rename.
2. Enter the new name for your favorite.
3. Click Update.
13.9.4. Write an interpretation for a favorite
An interpretation is a link to a resource with a description of the data at a given period. This
information is visible in the Dashboard app. To create an interpretation, you first need to
create a favorite. If you've shared your favorite with other people, the interpretation you write
is visible to those people.
1. Click Favorites > Write interpretation.
2. In the text field, type a comment, question or interpretation. You can see this information
in the Dashboard app.
3. Search for a user group that you want to share your favorite with, then click the + icon.
4. Change sharing settings for the user groups you want to modify.
Can edit and view: Everyone can view and edit the object.
Can view only: Everyone can view the object.
Using the Event Visualizer app Create a link to a favorite
136
None: The public won't have access to the object. This setting is only applicable to Public
access.
5. Click Share.
13.9.5. Create a link to a favorite
1. Click Favorites > Get link.
2. Select one of the following:
Open in this app: You get a URL for the favorite which you can share with other users
by email or chat.
Open in web api: You get a URL of the API resource. By default this is an HTML resource,
but you can change the file extension to ".json" or ".csv".
13.9.6. Delete a favorite
1. Click Favorites > Delete.
2. Click OK.
13.9.7. View interpretations based on relative periods
To view interpretations for relative periods, such as a year ago:
1. Open a favorite with interpretations.
2. Click >>> in the top right of the workspace.
3. Click an interpretation. Your chart displays the data and the date based on when the
interpretation was created.To view other interpretations, click them.
13.10. Visualize a chart as a pivot table
When you have made a chart you can open it as a pivot table:
Click Chart > Open this chart as table.
Control data quality About data quality checks
137
Chapter 14. Control data quality
14.1. About data quality checks
The Data Quality app contains tools to validate the accuracy and reliability of the data in the
system. You can verify the data quality with the help of validation rules and various statistical
checks. Data quality has different dimensions including:
Dimension Description
Correctness Data should be within the normal range for
data collected at that facility. There should
be no gross discrepancies when compared
with data from related data elements.
Completeness Data for all data elements for all
reporting organisation units should have
been submitted.
Consistency Data should be consistent with data entered
during earlier months and years while
allowing for changes with reorganization,
increased work load, etc. and consistent with
other similar facilities.
Timeliness All data from all reporting organisation units
should be submitted at the appointed time.
You can verify data quality in different ways, for example:
At point of data entry, DHIS2 can check the data entered to see if it falls within the minimum
maximum value ranges of that data element (based on all previous data registered).
By defining validation rules, which can be run once the user has finished data entry. The user
can also check the entered data for a particular period and organization unit(s) against the
validation rules, and display the violations for these validation rules.
By analysing data sets, that is, examine gaps in the data.
By data triangulation, that is, comparing the same data or indicator from different sources.
14.2. Validation rule analysis
14.2.1. About validation rule analysis
A validation rule is based on an expression which defines a relationship between data element
values. The expression forms a condition which should assert that certain logical criteria are
met.
The expression consist of:
a left side
a right side
an operator
Example14.1.
A validation rule could assert that "Suspected malaria cases tested" >= "Confirmed malaria
cases".
Control data quality Workflow
138
The validation rule analysis tests validation rules against the data registered in the system.
Validation violations are reported when the condition defined in the validation rule expression
is not met, which means when the condition is false.
You can configure a validation rule analysis to automatically send out information about
validation violations to selected user groups. These messages are called validation notifications
and you create them in the Maintenance app. Validation notifications are sent via the internal
DHIS2 messaging system.
14.2.2. Workflow
1. In the Maintenance app, create validation rules and validation rule groups.
2. (Optional) In the Maintenance app, create validation notifications.
3. Run the validation rule analysis, either automatically or manually.
In the Data Administration app, you schedule the validation rule analysis to run
automatically for all validation rules included in one or several validation notifications.
After the system has run the analysis, you'll see the validation violations (if any) in the
validation notifications sent via the internal DHIS2 messaging system.
In the Data Quality app, you run the validation rule analysis manually for selected
validation rules. After the analysis process has finished, you'll see a list of validation
violations (if any).
14.2.3. Schedule a validation rule analysis to run automatically
Note
Only validation rules that are included in one or several validation notifications will be a
part of the validation rule analysis. If there's no corresponding validation notification for
a validation rule, the system has nowhere to send the validation violations.
Note
While running validation rule analysis automatically, any results not already persisted,
will be persisted during this run. Persisted results can currently only be accessed trough
the api.
1. Verify that you have created all the validation rules, validation rule groups and validation
notifications you need.
2. Open the Data Administration app and click Scheduling.
3. If scheduling is active, click Stop.
4. In the Data monitoring section, select All daily.
5. Click Start.
Control data quality Run a validation rule analysis manually
139
14.2.4. Run a validation rule analysis manually
1. Verify that you have created all the validation rules, validation rule groups and validation
notifications you need.
2. Open the Data Quality app and click Validation rule analysis.
3. Select Start date and End date.
4. Select which Validation rule group you want to include in the analysis.
You can select all validation rules or all validation rules from a single validation rule group.
5. (Optional) Select Send notifications to trigger validation notifications.
Note
If you want to send out validation notifications, you must first create them in the
Maintenance app.
6. (Optional) Select Persist new results to persist any non-persisted results found during the
analysis
7. Select a Parent organisation unit.
8. Click Validate.
The analysis process duration depends on the amount of data that is being analysed. If
there are no violations of the validation rules, you'll see a message saying Validation passed
successfully. If there are validation violations, they will be presented in a list.
9. (Optional) Click the show details icon to get more information about a validation violation. In
the pop-up window you'll find information about the data elements included in the validation
Control data quality See also
140
rules and their corresponding data values. You can use this information to identify the source
of the validation rule violation.
10.(Optional) Click Download as PDF, Download as Excel or Download as CSV to download
the validation violations list in PDF, Excel or CSV formats.
14.2.5. See also
Manage validation rules
Data Administration app
14.3. Standard deviation outlier analysis
14.3.1. About standard deviation outlier analysis
The standard deviation outlier analysis identifies values that are numerically distant from
the rest of the data. The analysis is based on the standard normal distribution. The system
calculates the average, based on values since the beginning of time, for one particular
combination of organisation unit, data element, category option combination and attribute
option combination. Outliers can occur by chance but often indicate a measurement error
or a heavy-tailed distribution which leads to very high numbers. You should investigate
measurement errors and try to correct them before you discard them from the analysis.
Warning
It's not recommended to use tools or interpretations that assume a normal distribution
for heavy-tailed distributions.
For example: the standard deviation outlier analysis is not an appropriate tool when you
expect huge seasonal variations in the data.
14.3.2. Run a standard deviation outlier analysis
1. Open the Data Quality app and click Std dev outlier analysis.
Control data quality Modify a standard deviation outlier
value
141
2. Select From date and To date.
3. Select data set(s).
4. Select Parent organisation unit.
All children of the organisation unit will be included. The analysis is made on raw data "under"
the parent organisation unit, not on aggregated data.
5. Select a number of standard deviations.
This refers to the number of standard deviations the data is allowed to deviate from the
mean before it is classified as an outlier.
6. Click Start.
The analysis process duration depends on the amount of data that is being analysed. If there
are standard deviations outliers, they will be presented in a list.
For each outlier, you'll see the data element, organisation unit, period, minimum value,
actual value and maximum value. The minimum and maximum values refer to the border
values derived from the number of standard deviations selected for the analysis.
Tip
Click the star icon to mark an outlier value for further follow-up.
14.3.3. Modify a standard deviation outlier value
You can modify an outlier value directly in the analysis result list:
1. In the value column, click inside the field that contains the value you want to change.
2. Enter a value and then navigate away from that field either by clicking tab or anywhere
outside the field.
The system provides an alert if the value is still outside the defined minimum and maximum
values, but the value will be saved in any case. The field will have a red background color
if the value is outside the range, and a green if inside.
Control data quality Minimum maximum outlier analysis
142
14.4. Minimum maximum outlier analysis
14.4.1. About minimum maximum value based outlier analysis
You can verify the data quality at the point of data entry by setting a minimum maximum
value range for each data element. You create the value ranges manually or generate them
automatically.
The auto-generated minimum maximum value range is suitable only for normally distributed
data. DHIS2 will determine the arithmetic mean and standard deviation of all values for a given
data element, category option, organisation unit and attribute combination. Then the system
will calculate the minimum maximum value range based on the Data analysis std dev factor
specified in the System Settings app.
For data which is highly-skewed or zero inflated (as is often the case with aggregate data), the
values which DHIS2 auto-generates may not provide an accurate minimum maximum value
range. This can lead to excessive false violations, for example if you analyse values related
to seasonal diseases.
Note
Minimum maximum value ranges are calculated across all attribute combination options
for a given data element, category option and organisation unit combination.
14.4.2. Workflow
1. Create a minimum maximum value range, either automatically or manually.
In the Data Administration app, you generate value ranges automatically.
In the Data Entry app, you set value ranges manually for each field.
2. In the Data Quality app, run the Min-max outlier analysis.
14.4.3. Configure a minimum maximum outlier analysis
14.4.3.1. Create minimum maximum value range automatically
Note
Auto-generated minimum maximum value ranges can be useful for many situations, but
it's recommended to verify that the data is actually normally distributed prior to using
this function.
You generate minimum maximum value ranges calculated by data set in the Data
Administration app. The new value ranges override any value ranges that the system has
calculated previously.
1. Set the Data analysis std dev factor:
a. Open the System Settings app, and click General.
Control data quality Configure a minimum maximum outlier
analysis
143
b. In the Data analysis std dev factor field, enter a value.
This sets the number of standard deviations to use in the outlier analysis. The default
value is 2. A high value will catch less outlier values than a low value.
2. Open the Data Administration app and click Min-max value generation.
3. Select data set(s).
4. Select an Organisation unit.
5. Click Generate.
New minimum maximum value ranges for all data elements in the selected data sets for all
organisation units (including descendants) of the selected organisation units are generated.
14.4.3.2. Create minimum maximum value range manually
1. In the Data Entry app, open a data entry form.
2. Double-click the field for which you want to set the minimum maximum value range.
3. Enter Min limit and Max limit.
4. Click Save.
If values don't fall within the new value range the next time you enter data, the data entry
cell will appear with an orange background.
5. (Optional) Type a comment to explain the reason for the discrepancy, for example an event
at a facility which may have generated a large number of clients.
6. (Optional) Click Save comment.
Tip
Click the star icon to mark the value for further follow-up.
14.4.3.3. Delete minimum maximum value range
You can permanently delete all minimum maximum value ranges for selected data sets and
organisation units in the Data Administration app.
1. Open the Data Administration app and click Min-max value generation.
Control data quality Run a minimum maximum outlier
analysis
144
2. Select data set(s).
3. Select an Organisation unit.
4. Click Remove.
14.4.4. Run a minimum maximum outlier analysis
1. Verify that you've created minimum maximum value ranges.
2. Open the Data Quality app and click Min-max outlier analysis.
3. Select From date and To date.
4. Select which data set(s) you want to include in the analysis.
5. Select Parent organisation unit.
All children of the organisation unit will be included. The analysis is made on raw data "under"
the parent organisation unit, not on aggregated data.
6. Click Start.
The analysis process duration depends on the amount of data that is being analysed. If there
are validation violations, they will be presented in a list.
7. (Optional) Click Download as PDF, Download as Excel or Download as CSV to download
the list in PDF, Excel or CSV formats.
Control data quality Follow-up analysis
145
Tip
Click the star icon to mark the value for further follow-up.
14.5. Follow-up analysis
14.5.1. About follow-up analysis
The follow-up analysis creates a list of all data values marked for follow-up. You can mark a
data value for follow-up in the Data Entry app and in the result list you get from a standard
deviation outlier or minimum maximum outlier analysis.
14.5.2. Create list of data values marked for follow-up
1. Open the Data Quality app and click Follow-up analysis.
2. Select an Organisation unit.
The analysis process duration depends on the amount of data that is being analysed. If there
are data values marked for follow-up, they will be presented in a list.
3. (Optional) Click Download as PDF, Download as Excel or Download as CSV to download
the validation violations list in PDF, Excel or CSV formats.
Tip
Click the star icon to remove the follow-up tag from the data value.
Data approval Approving and accepting
147
Chapter 15. Data approval
DHIS2 has an optional feature that allows authorized users to approve data that has been
entered. It allows data to be reviewed and approved at selected levels in the organisation unit
hierarchy, so the approval follows the structure of the hierarchy from lower levels to higher
levels.
Data is approved for a combination of (a) period, (b) organisation unit and (c) workflow. Data
may be approved for the organisation unit for which it is entered, as well as for higher-level
organisation units to which the data is aggregated. As part of system settings, you can choose
the organisation unit level(s) at which data is approved. It can be approved at higher levels
only after it has been approved for all that organisation unit's descendants at lower levels for
the same workflow and period. When you approve a workflow, it approves data for any data
sets that have been assigned to that workflow.
After a period, organisation unit and workflow combination has been approved, data sets
associated with that workflow will be locked for that period and organisation unit, and any
further data entry or modification will be prohibited unless it is first un-approved.
For example, the following diagram illustrates that data has already been approved for
organisation units C and D, for a given period and workflow. It may now be approved for
organisation unit B for the same period and workflow. But it is not ready to be approved for
organization unit A. Before it can be approved for organisation unit A, it must be approved for
B, and for any other children of organisation unit A, for that period and workflow.
Figure15.1.Approving at organisation units
15.1. Approving and accepting
DHIS2 supports two different types of approval processes: either a one-step process where the
data is approved at each level, or a two-step process where data is first approved and then
accepted at each level. This is illustrated in the following diagram:
Figure15.2.Approving and accepting
In the one-step process, data is approved at one level, and then approved at the next higher
level. Until it is approved at the next higher level, it may be unapproved at the first level. (For
Data approval Authorities for approving data
148
example, if the data was approved my mistake, this allows the approver to undo their mistake.)
Once the data is approved at the next higher level, it may not be unapproved at the lower level
unless it is first unapproved at the higher level.
In the two-step process, data is approved at one level, and then the approval is accepted at
the same level. This acceptance is done by a user who is authorized to approve data at the
next higher level. Once the data is accepted, it may not be changed or unapproved unless it
is first unaccepted.
The two-step process is not required by DHIS2. It is an optional step for a user reviewing data
at the next higher level. It has the benefit of locking the acceptance from the level below, so
reviewer does not have to worry that the data could be changing from below while it is being
reviewed. It can also be used by the higher-level user to keep track of which lower-level data
has already been reviewed.
Two-step process can be activated by checking Acceptance required before approval in
SystemSettings app under General section.
15.2. Authorities for approving data
To approve data, you must be assigned a role containing one of these authorities:
Approve data - You may approve data for the organisation unit(s) to which you are assigned.
Note that this authority does not allow you to approve data for lower-levels below the
organisation unit(s) to which you are assigned. This is useful to separate the users authorized
to approve at one level from the users authorized to approve at levels below.
Approve data at lower levels - Allows you to approve data for all lower levels below the
organisation units assigned to you. This is useful if, for example, you are a district-level user
whose role includes approving the data for all the facilities within that district, but not for
the district itself. If you are assigned this as well as the Approve data authority, you may
approve data at the level of the organisation unit(s) to which you have been assigned, and
for any level below.
Accept data at lower levels - Allows you to accept data for the level just below the
organisation unit(s) assigned to you. This authority can be given to the same users as approve
data. Or it may be given to different users, if you want to have some users who accept data
from the level below, and a different set of users who approve data to go up to the next
level above.
15.3. Configuring data approval
In the Maintenance app section under Data approval level you can specify the levels at which
you want to approve data in the system. Click the Add new button on this page and select
the organisation unit level at which you want approvals. It will be added to the list of approval
settings. You may configure the system for approving data at every organisation unit level, or
only at selected organisation unit levels.
Note that when you add a new approval level, you may optionally choose a Category option
group set. This feature is discussed later in this chapter.
Also in maintenance under Data approval workflow, you can define the workflows that will be
used for approving data. Each workflow can be associated with one or more approval levels.
Any two workflows may operate at all the same approval levels as each other, some of the
same and some different levels, or completely different levels.
If you want data for a data set to be approved according to a workflow, then assign the workflow
to the data set when you add or edit the data set. If you do not want data for a data set to be
Data approval Data visibility
149
subject to approval, then do not assign any workflow to that data set. For data sets that you
want to approve at the same time as each other, assign them to the same workflow. For data
sets that you want to approve independently, assign each data set to its own workflow.
On the System Approval Settings page, you may select the option Hide unapproved data in
analytics to hide unapproved data in reports, pivot table, data visualizer and GIS. If this option
is checked, unapproved data will be hidden from users assigned to higher-level organisation
units compared to where approval is required. Users who are assigned to organisation units
where data is ready for approval can still view the data, as can users assigned to higher-level
organisation units if they have the Approve data at lower levels authority. If this option is not
checked, then all data is shown whether approved or not.
15.4. Data visibility
If the option Hide unapproved data in analytics is enabled, data will be hidden from viewing by
users associated with higher levels. When determining whether a data record should be hidden
for a specific user, the system associates a user with a specific approval level and compares
it to the level to which the data record has been approved up to. A user is associated with
the approval level which matches the level of the organisation unit(s) she is linked to, or if
no approvel level exists at that level, the next approval level linked to an organisation unit
level below herself. A user will be allowed to see data which has been approved up to the level
immediately below her associated approval level. The rationale behind this is that a user must
be ablet to view the data that has been approved below so that she can eventually view and
approve it herself.
Note that if the user has been granted the View unapproved data or the ALL authority she will
be able to view data irrespective of the approval status.
Lets consider the following example: There are four organisation unit levels, with approval
levels associated with level 2 and 4. User A at country level (1) gets associated with approval
level 1 since the approval level exists at the same level as the organisation unit level. User
B gets associated with approval level 2 since there is no approval level directly linked to her
organisation unit level and approval level 2 is the immediate level below. User C gets associated
with approval level 2. User D is below all approval levels which implies that she can see all
data entered at or below her organisation unit level.
Figure15.3.Hiding of unapproved data
Data approval Approving data
150
Using this example, lets consider some scenarios:
Data is entered at facility level: Only User D can see the data, as the data has not yet been
approved at all.
Data is approved by User D at facility level: Data becomes visible to User C and User B, as
the data is now approved at their level.
Data is approved by User C at district level: Data becomes visible to User A, as data is now
approved at the level immediately below herself.
15.5. Approving data
To approve data, go to Reports and choose Data Approval. When this report shows data that
is configured for approval, it shows the approval status of the data in the report. The approval
status will be one of the following:
Waiting for lower level org units to approve - This data is not yet ready to be approved,
because it first needs to be approved for all the child organisation units to this organisation
unit, for the same workflow and period.
Ready for approval - This data may now be approved by an authorized user.
Approved - This data has already been approved.
Approved and accepted - This data has already been approved, and also accepted.
If the data you are viewing is in an approval state that can be acted upon, and if you have
sufficient authority, one or more of the following actions will be available to you on the Data
Approval form:
Approve - Approve data that has not yet been approved, or that was formerly approved
and has been unapproved.
Unapprove - Return to an unapproved state data that has been approved or accepted.
Accept - Accept data that has been approved.
Unaccept - Return to an unaccepted (but still approved) state data that has been accepted.
In order to unapprove data for a given organisation unit, you must have the authority to
approve data for that organisation unit or to approve data for a higher-level organisation unit
to which that data is aggregated. The reason for this is as follows: If you are reviewing data
for approval at a higher organisation unit level, you should consider whether the data at lower
organisation units are reasonable. If all lower-level data looks good, you can approve the data
at the higher level. If some lower-level data looks suspect, you can unapprove the data at the
lower level. This allows the data to be reviewed again at the lower level, corrected if necessary,
and re-approved up through the organisation unit levels according to the hierarchy.
15.6. Approving by category option group set
When defining an approval level, you specify the organisation unit level at which data will be
approved. You may also optionally specify a category option group set. This is useful if you
are using category option groups to define additional dimensions of your data, and you want
approvals to be based on these dimensions. The following examples illustrate how this can be
done within a single category option group set, and by using multiple category option group
sets.
15.6.1. Approving by one category option group set
For example, suppose you define a category option group set to represent NGOs who serve
as healthcare partners at one or more organisation units. Each category option group within
Data approval Approving by multiple category option
group sets
151
this set represents a different partner. The category option group for Partner 1 may group
together category options (such as funding account codes) that are used by that partner as a
dimension of the data. So data entered by Partner 1 is attributed to a category option in Partner
1's category option group. Whereas data entered by partner 2 is attributed to a category option
in Partner 2's category option group:
Table15.1.Example Category Option Groups
Category option group
set
Category option group Category options
Partner Partner 1 Account 1A, Account 1B
Partner Partner 2 Account 2A, Account 2B
Each partner could enter data for their accounts independently of the other, for the same or
different workflows, at the same or different facilities. So for example, data can be entered
and/or aggregated at the following levels for each partner, independently of each other:
Figure15.4.Example category option groups
Tip
You can use the sharing feature on category options and category option groups to insure
that a user can enter data (and/or see data) only for certain category options and groups.
If you don't want users to see data that is aggregated beyond of their assigned category
options and/or category option groups, you can assign Selected dimension restrictions
for data analysis, when adding or updating a user.
You can optionally define approval levels for partner data within any or all of these organisation
unit levels. For example, you could define any or all of the following approval levels:
Table15.2.Example Category Option Group Set approval levels
Approval level Organisation unit level Category option group
set
1 Country Partner
2 District Partner
3 Facility Partner
15.6.2. Approving by multiple category option group sets
You can also define approval levels for different category option group sets. To continue the
example, suppose that you have various agencies that manage the funding to the different
partners. For example, Agency A funds accounts 1A and 2A, while Agency B funds accounts 1B
and 2B. You could set up category option groups for Agency A, and Agency B, and make them
both part of a category option group set called Agency. So you would have:
Data approval Approving by multiple category option
group sets
152
Table15.3.Example Multiple Category Option Group Sets
Category option group
set
Category option group Category options
Partner Partner 1 Account 1A, Account 1B
Partner Partner 2 Account 2A, Account 2B
Agency Agency A Account 1A, Account 2A
Agency Agency B Account 1B, Account 2B
Now suppose that at the country level, you want each partner to approve the data entered by
that partner. Once this approval is done, you want each agency to then approve the data from
accounts that are managed by that agency. Finally, you want to approve data at the country
level across all agencies. You could do this by defining the following approval levels:
Table15.4.Example Multiple Category Option Group Set approval levels
Approval level Organisation unit level Category option group
set
1 Country
2 Country Agency
3 Country Partner
Note that multiple approval levels can be defined for the same organisation unit level. In our
example, Partner 1 would approve country-wide data at approval level 3 from category options
Account 1A and Account 1B. Next, Agency A would approve country-wide data at approval
level 2 from category options Account 1A (after approval by Partner 1) and Account 2A (after
approval by Partner 2.) Finally, after approval from all agencies, country-wide data can be
approved at approval level 1 across all category options. Note that approval level 1 does not
specify a category option group set, meaning that it is for approving data across all category
options.
This example is meant to be illustrative only. You may define as many category option groups
as you need, and as many approval levels as you need at the same organisation unit level for
different category option group sets.
If you have multiple approval levels for different category option group sets at the same
organisation unit level, you may change the approval ordering in the Settings section, under
System Approval Settings. Just click on the approval level you wish to move, and select Move
up or Move down. If you have an approval level with no category option groups set, it must be
the highest approval level for that organisation unit level.
Using reporting functionality Reporting functionality in DHIS2
153
Chapter 16. Using reporting functionality
16.1. Reporting functionality in DHIS2
The reporting module in DHIS2 provides a range of reporting alternatives, and this section will
explain how to use them to view and analyse data. Another section explains how to configure
and set up the various reporting tools.
Standard reports: Standard reports are built on pivot tables, but are more advanced in its
design allowing for more cosmetics and styles. These reports can also combine multiple tables
and charts in the same report and be made available as one-click reports that are very easy
to use. These reports can be downloaded as PDF files which makes them ideal for printing as
well as sharing offline.
Dataset reports: Dataset reports are simply a printer friendly way to look at the data entry
forms with either raw or aggregated data (over time or place). The design used in data entry
will be used also in the data set reports. This will work only for data sets that has a custom
data entry form set up.
Dashboard: The fastest way to view your data. The dashboard can display up to four updated
charts as well as shortcuts to your favourite reports, report tables, and map views. Each user
can configure a personal dashboard.
Data Visualizer: Do flexible visualizations of your data as charts and data tables. Any number
of indicators and data elements can be included. Several chart types are available, such as
column, stacked column, line, area and pie charts. The charts can be saved in order to be easily
retrieved later and can also be put on your personal dashboard. Charts can be downloaded as
image and PDF files to your local computer.
Orgunit distribution reports: These reports are generated off the orgunit group set
information and can show what types (and how many of each type) of health facilities that are
located in a given area (any level in the hierarchy). These reports are automatically generated
and display the information in both tables and charts, and downloads in PDF, excel, and CSV
are available.
Reporting rate summary: These reports provide a nice overview of how many facilities that
have submitted their data for a given dataset and period. Here you can get both the counts
and the percentages showing the reporting rate for all or single data sets.
Web-based pivot tables: The built in pivot table tool is a web-based tool to display indicator
data by orgunit and period in a typical pivot table view and allows for pivoting manipulations
of the tables. It allows for large amounts of data to be downloaded offline for analysis as well.
GIS: Present and analyse your data using thematic maps. You can view both data elements
and indicators and given that you have coordinates for all your orgunits you can drill down
the hierarchy and view maps for all levels from country polygons to facility points. See the
separate chapter on GIS for more details. All the map information is built into DHIS2 and all you
need to do is to register coordinates for your organisation units and the maps will be available.
16.2. Using standard reports
You access the available reports by navigating to Apps->Reports. In the report menu in the
left bar, click Standard Report. A list of all pre-defined reports will appear in the main window.
Using reporting functionality Using dataset reports
154
Standard reports
You run/view a report by clicking on the name of the report and then selecting "Create" from
the contextual menu. If there are any pre-defined paramaters, you will see a report parameter
window where you must fill in the values needed for orgunit and/or reporting month, depending
on what has been defined in the underlying report table(s). Click on "Get Report" when you
are ready. The report will either appear directly in your browser or be available as a PDF file
for download, depending on your browser settings for handling PDF files. You can save the file
and keep it locally on your computer for later use.
16.3. Using dataset reports
Dataset reports are printer friendly views of the data entry screen filled with either raw or
aggregated data. These are only available for data sets that have custom data entry forms
and not for default or section forms.
You can access data set reports from Apps->Reports.
A Criteria window will appear where you fill in the details for your report:
Dataset: The data set you want to display.
Reporting period: The actual period you want data for. This can be aggregated as well as
raw periods. This means that you can ask for a quarterly or annual report even though the data
set is collected monthly. A data set's period type (collection frequency) is defined in data set
maintenance. First select the period type (Monthly, Quarterly, Yearly etc.) in the drop down
next to Prev and Next buttons, and then select one of the available periods from the dropdown
list below. Use Prev and Next to jump one year back or forward.
Use data for selected unit only: Use this option if you want a report for an orgunit that
has children, but only want the data collected directly for this unit and not the data collected
by its children. If you want a typical aggregated report for an orgunit you do not want to tick
this option.
Reporting Organisation unit: Here you select the orgunit you want the report for. This can
be at any level in the hierarchy as the data will be aggregated up to this level automatically
(if you do not tick the option above).
When you are done filling in the report criteria you click on "Generate". The report will appear
as HTML in a printer-friendly format. Use the print and save as functions in the browser to print
or save (as HTML) the report.You can also export the data set report in Excel and PDF formats.
Using reporting functionality Using resources
155
16.4. Using resources
The resource tool allows you to upload both files from your local computer to the DHIS server
and to add links to other resources on the Internet through URLs. If cloud storage is configured
for your system, resources will be saved there.
To create a new resource:
1. Open the Reports app and click Resource.
2. Click Add new.
3. Enter a Name.
4. Select a Type: Upload file or External URL.
5. Click Save.
16.5. Using reporting rate summary
Access the reporting rate summary from the Apps->Reports menu. Reporting rate summaries
will show how many datasets (forms) that have been submitted by organisation unit and period.
There are two methods available to calculate reporting rates (completeness):
Based on complete data set registrations. A complete data set registration refers to a user
marking a data entry form as complete, typically by clicking the complete button in the data
entry screen, hereby indicating to the system that she considers the form to be complete.
This is i.e. a subjective approach to calculating completeness.
Based on compulsory data element: You can define any number of data elements in a data
set to be compulsory. This implies that data values must be captured for all data elements
which have been marked as compulsory in order for the data set to be considered complete.
This is i.e. an objective approach to calculating completeness.
The reporting rate summary will for each row show a range of measures:
Actual reports: Indicates the number of data entry complete registrations for the relevant
data set.
Expected reports: Indicates how many data entry complete registrations are expected. This
number is based on the number of organisation units the relevant data set has been assigned
to (enabled for data entry).
Percent: The percentage of reports registered as complete based on the number expected.
Reports on time: Same as actual reports, only reports registered as complete within the
maximum number of days after the end of the reporting period. This number of days after
reporting period can be defined per data set in the data set management.
Percent on time: Same as percentage, only reports registered as complete on time used as
numerator.
To run the report you can follow these steps:
Select an orgunit from the tree.
Select one of the completeness methods to use to calculate the reporting rates.
Select all or one data set. All will give you a report with all data sets for the selected
organisation unit. A single data set will give you a report with completeness for all children
of the selected organisation unit.
Select a period type and a period from the list of available periods for that period type. Move
back/forward one year by using the prev/next buttons.
The report will then be rendered. Change any of the parameters above and the report will
be updated automatically.
Using reporting functionality Using organisation unit distribution
reports
156
Reporting rate summary
16.6. Using organisation unit distribution reports
You can access the Orgunit Distribution reports from the left side menu in the Apps->Reports.
Orgunit distribution reports are reports that show how the orgunits are distributed on various
properties like type and ownership, and by geographical areas.
The result can be presented in a table-based report or in a chart.
Running a report:
To run a report first select an orgunit in the upper left side orgunit tree. The report will be
based on orgunits located under the selected orgunit. The select the orgunit group set that you
want to use, typically these are Type, Ownership, Rural/Urban, but can be any user-defined
orgunit group set. The you can click on either Get Report to get the table-based presentation
or Get chart to get the same result in a chart. You can also download other format such as
PDF, Excel and CSV.
Orgunit distribution report
Using reporting functionality Generate analytics tables
157
16.7. Generate analytics tables
DHIS2 generates database tables which the system then uses as basis for various analytics
functions. These tables are also valuable if you write advanced SQL reports. In the Reports
app, you can execute the tables immediately or schedule them to be executed at regular
intervals. This means that you can refresh recent analytics on demand and see updated pivot
tables without waiting for all of the past years data to re-process.
Note
You can also generate the tables through the web API. This task is typically performed
by a system administrator.
1. Open the Reports app and click Analytics.
2. Select the parts of the analytics process you want to skip:
Skip generation of resource tables
Skip generation of aggregate data and completeness data
Skip generation of event data
Skip generation of enrollment data
3. Select Number of last years of data to include.
4. Click Start export.
Set user account preferences
159
Chapter 17. Set user account preferences
In User settings, you can change the display language of DHIS2 and the language of the
database. The database language is the translated content of the metadata, such as data
elements and indicators. You can also choose a display style, and enable or disable SMS and
email notifications. If you wish to, you can choose to display a short name, such as "Joe" in the
analysis modules, rather than your full name.
In User profile, you can add personal information to your profile such as your email address,
mobile phone number, date of birth and more. When you send messages, the person receiving
the message can see these profile details.
In Account settings, you can reset your password.
Manage users, user roles and user
groups
About user management
161
Chapter 18. Manage users, user roles and
user groups
18.1. About user management
Multiple users can access DHIS2 simultaneously and each user can have different authorities.
You can fine-tune these authorities so that certain users can only enter data, while others can
only generate reports.
You can create as many users, user roles and user groups as you need.
You can assign specific authorities to each user.
You can create multiple user roles each with their own authorities.
You can assign user roles to users to grant the users the corresponding authorities.
You can assign each user to organisation units. Then the user can enter data for the assigned
organisation units.
Table18.1.User management terms and definitions
Term Definition Example
Authority A permission to perform one or
several specific tasks
Create a new data element
Update an organisation unit
View a report
User A person's DHIS2 user account admin
traore
guest
User role A group of authorities Data entry clerk
System administrator
Antenatal care program access
User group A group of users Kenya staff
Feedback message recipients
HIV program coordinators
You manager users, user roles and user groups in the Users app.
Table18.2.Objects in the Users app
Object type Available functions
User Create, edit, clone, disable, assign search organisation units, display by
organisation unit, delete and show details
User role Create, edit, share, delete and show details
User group Create, edit, join, leave, share, delete and show details
Manage users, user roles and user
groups
About users
162
18.1.1. About users
Each user in DHIS2 must have a user account which is identified by a user name. You should
register a first and last name for each user as well as contact information, for example an email
address and a phone number.
It is important that you register the correct contact information. DHIS2 uses this information
to contact users directly, for example sending emails to notify users about important events.
You can also use the contact information to share for example dashboards and pivot tables.
A user in DHIS2 is associated with an organisation unit. You should assign the organisation
unit where the user works.
Example18.1.
When you create a user account for a district record officer, you should assign the district
where he/she works as the organisation unit.
The assigned organisation unit affects how the user can use DHIS2:
In the Data Entry app, a user can only enter data for the organisation unit she is associated
with and the organisation units below that in the hierarchy. For instance, a district records
officer will be able to register data for her district and the facilities below that district only.
In the Users app, a user can only create new users for the organisation unit she is associated
with in addition to the organisation units below that in the hierarchy.
In the Reports app, a user can only view reports for her organisation unit and those below.
(This is something we consider to open up to allow for comparison reports.)
An important part of user management is to control which users are allowed to create new
users with which authorities. In DHIS2, you can control which users are allowed to perform
this task. The key principle is that a user can only grant authorities and access to data sets
that the user itself has access to. The number of users at national, province and district level
are often relatively few and can be created and managed by the system administrators. If
a large proportion of the facilities are entering data directly into the system, the number of
users might become unwieldy. It is recommended to delegate and decentralize this task to the
district officers, it will make the process more efficient and support the facility users better.
18.1.2. About user roles
A user role in DHIS2 is a group of authorities. An authority means the permission to perform
one or more specific tasks.
Example18.2.
A user role can contain authorities to create a new data element, update an organisation unit
or view a report.
A user can have multiple user roles. If so, the user's authorities will be the sum of all authorities
and data sets in the user roles. This means that you can mix and match user roles for special
purposes instead of only creating new ones.
A user role is associated with a collection of data sets. This affects the Data Entry app: a
user can only enter data for the data sets registered for his/her user role. This can be useful
when, for example, you want to allow officers from health programs to enter data only for their
relevant data entry forms.
Recommendations:
Create one user role for each position within the organisation.
Create the user roles in parallel with defining which user is doing which tasks in the system.
Manage users, user roles and user
groups
About user groups
163
Only give the user roles the exact authorities they need to perform their job, not more. Only
those who are supposed to perform a task should have the authorities to perform it.
18.1.3. About user groups
A user group is a group of users. You use user groups when you set up sharing of objects or
notifications, for example push reports or program notifications.
See also:
Sharing
Manage program notifications
Mange push reports
18.2. Workflow
1. Define the positions you need for your project and identify which tasks the different positions
will perform.
2. Create roughly one user role for each position.
3. Create users.
4. Assign user roles to the users.
5. Assign the users to organisation units.
6. Assign data sets to the user role.
7. (Optional) Group users in user groups.
Tip
For users to be able to enter data, you must add them to both a data set and an
organisational unit level.
18.3. Manage users
18.3.1. Create a user
1. Open the Users app and click User.
Manage users, user roles and user
groups
Create a user
164
2. Click Add new.
3. Select whether you want to fill in all the personal user information, or invite the user by email
to complete the rest of the user information:
Create account with user details
Choose this option if you would like to enter all the details of the new user such as name,
password, etc.
Enter the following information: user name, password, surname, first name, email, OpenID
account (if any) and mobile phone number (if any).
After you've created the user, the account is ready for the user to use with the user name
and password that you provide.
Email invitation to create account
Choose this option if you want to send an invitation by email to the user. Then she/he must
return to DHIS2 and finish setting up their user account. The account that the user finishes
setting up will be limited according to how you configure the account.
Note
You may not select this option to create an account with "critical" system authorities
such as All, Scheduling Administration, Perform maintenance tasks, Merge
organisation units, Eliminate duplicate data elements, SQL View Management,
Change system settings, and List, Add or Delete user roles.
In order to use this feature "Enable email message notifications" in SystemSettings ->
Messaging should be checked.
Enter the email address to which the invitation should be sent. If you want to, you may
also enter the user name that the account will have. If you leave the user name empty,
then the user may choose their own user name when they respond to the invitation (as
long as it is not taken already for another user.)
After you've created the user, the system sends two emails to the address you provided.
One contains a unique web link by which the user can return to the system and activate
Manage users, user roles and user
groups
Create a user
165
their account by entering the rest of their user information. The other email contains a
unique code that they must enter into the system in order to complete the registration,
after following the link in the first email. The user must finish setting up the account within
three months, after that the invitation becomes invalid.
4. Select an Interface language.
You can select a language into which fixed elements of the DHIS2 user interface have been
translated.
5. Select a Database language.
You can select a language into which implementation-supplied items have been translated
in the database, for example data element names or organisation unit level names.
6. In the Available roles section, double-click the user roles you want to assign to the user.
7. Select Data capture and maintenance organisation units.
The data capture and maintenance organisation units control for which organisation units
the user can do data entry. You must assign at least one data capture and maintenance
organisation unit to each user.
Users will have access to all sub-organisation units of the assigned organisation units. For
example, if you've assigned a user to a district which has several facilities contained in
the district, the user would have access to the district's data, as well as all of the facilities
contained within the district.
8. (Optional) Select Data output and analysis organisation units.
The data output and analysis organisation units controls for which organisation units the
user can view aggregated data in the analytics apps, for example the Pivot Table and GIS
apps. You can assign any number of data output and analysis organisation units to a user.
Users will have access to all sub-organisation units of the assigned organisation units. You
shouldn't select the descendants of an organisation unit which you have already selected.
For example, if you've assigned the user to a district, you shouldn't select the facilities within
that district.
Manage users, user roles and user
groups
Edit user objects
166
Note
Assigning data output and analysis organisation units organisation units is optional.
If you don't specify any organisation unit, the user will have access to the full
organisation unit hierarchy for viewing aggregated data. As with the data capture
organisation units, you should not select descendant organisation units of a unit which
you have already selected.
In several places in the analytics apps, you can select "user organisation unit" for the
organisation unit dimension. This mechanism will first attempt to use the data view
organisation units linked to the current user. If not found, it will use the data capture and
maintenance organisation units. If the user has been assigned to multiple organisation units,
the use of "user organisation unit" may result in unpredictable behavior.
9. Click Show more options.
10.(Optional) In the Available user groups section, double-click the user groups you want to
assign to the user.
11.(Optional) In the Available dimension restrictions for data analytics section, double-
click the dimensions you want to assign to the user.
You can restrict the values the user sees in data analytics apps by selecting dimensions that
will restrict the user's view.
Example18.3.
Let's say you have defined Implementing Partner as a category option group set, and you
have shared with this user only one or more specific implementing partners (category option
groups). If you want to make sure that the user does not see totals in analytics that include
values from other groups, assign Implementing Partner to the user. This insures that any data
visible to the user through the analytics apps will be filtered to select only the Implementing
Partner category option group(s) which are visible to the user.
12.Click Add.
18.3.2. Edit user objects
1. Open the Users app and find the type of user object you want to edit.
Manage users, user roles and user
groups
Disable users
167
2. In the object list, click the relevant object and select Edit.
3. Modify the options you want.
4. Click Save.
18.3.3. Disable users
You can disable a user. This means that the user's account is not deleted, but the user can't
log in or use DHIS2.
1. Open the Users app and click User.
2. In the list, click the relevant user and select Disable.
3. Click OK to confirm.
18.3.4. Display a user's profile
1. Open the Users app and click User.
2. In the list, click the relevant user and select Profile.
18.3.5. View users by organisation unit
You can view all users that have been assigned to a particular organisation unit.
1. Open the Users app and click User by organisation unit.
2. In the left-hand organisation unit tree, click an organisation unit.
A list of users which have been assigned to this organisation unit is displayed.
18.3.6. Assign search organisation units to users
1. Open the Users app and click User.
2. In the object list, click the relevant user and select Assign search org units.
3. Click the organisation units you want the user to be able to search in.
4. Click Save.
18.3.7. Delete current user
You can delete the user that is currently logged into the system.
1. Open the Users app and click Delete current user.
2. Enter your password and click Delete.
18.3.8. Clone users
1. Open the Users app and click User.
2. In the object list, click the relevant user and select Replicate.
3. Enter a new user name and password for the cloned user account.
4. Click Replicate.
5. In the object list, click the user you just created and click Edit.
Manage users, user roles and user
groups
Change user password
168
6. Modify the options you want.
7. Click Save.
18.3.9. Change user password
The following rules apply when you create a new password:
Password must contain at least one special character, that is any character other then
alphabets and digit numbers.
Password must contain at least one upper case character.
Password must contain at least one digit number.
Password can not contain user's user name or email address.
Password can not contain generic words for example system, admin, user, login, manager
etc.
Password can not be one of the previous 24 passwords the user has used.
This doesn't apply in case a super user resets the password for another user.
Password must contain more than minimum number of characters.
Note
You can configure the minimum number of characters: Open the System Settings
app and click Access > Minimum characters in password.
Password can not contain more than 40 characters
To change a user's password:
1. Open the Users app and click User.
2. In the object list, click the relevant user and select Edit.
3. Enter a new password and retype it.
4. Click Save.
18.3.10. Delete user objects
1. Open the Users app and find the type of user object you want to delete.
2. In the object list, click the relevant object and select Remove.
3. Click OK to confirm.
18.3.11. Display details of user objects
1. Open the Users app and find the type of user object you want to view.
2. In the object list, click the relevant object and select Show details.
Manage users, user roles and user
groups
Manage user roles
169
18.4. Manage user roles
18.4.1. Create a user role
1. Open the Users app and click User role.
2. Click Add new.
3. Enter a Name, for example "Super user" or "Admin user".
4. Enter a Description.
5. In the Data sets section, double-click the data sets you want the user role to have access to.
6. In the Programs section, double-click the programs you want the user role to have access
to.
7. Authorities section, double-click the authorities you want to give to the user role.
8. Click Add.
Tip
You can select multiple data sets, programs or authorities:
One by one: press the Ctrl key and click the items one by one, then click the right
arrow.
In a series: press the Shift key and select the first and last item in the series, then
click the right arrow.
18.4.2. Edit user objects
1. Open the Users app and find the type of user object you want to edit.
2. In the object list, click the relevant object and select Edit.
3. Modify the options you want.
4. Click Save.
Manage users, user roles and user
groups
Delete user objects
170
18.4.3. Delete user objects
1. Open the Users app and find the type of user object you want to delete.
2. In the object list, click the relevant object and select Remove.
3. Click OK to confirm.
18.4.4. Display details of user objects
1. Open the Users app and find the type of user object you want to view.
2. In the object list, click the relevant object and select Show details.
18.4.5. Change sharing settings for user objects
1. Open the Users app and find the type of user object you want to modify.
2. In the object list, click the relevant object and select Sharing settings.
3. (Optional) Search for a user group and select it, then click the plus icon. The user group is
added to the list.
4. (Optional) Select External access (without login).
5. Change the settings for the user groups you want to modify.
None
Can view: Everyone in the user group can view the object
Can edit and view: Everyone in the user group can view and edit the object
6. Click Save.
18.5. Manage user groups
18.5.1. Create a user group
1. Open the Users app and click User group.
2. Click Add new.
3. In the Name field, type the name of the user group.
4. In the Available users section, double-click the users you want to add to the user group.
5. In the Available user groups section, double-click the user groups you want to add to the
user group.
6. Click Add.
18.5.2. Join user groups
1. Open the Users app and click User group.
2. In the list, click the relevant user group and select Join group.
18.5.3. Leave user groups
1. Open the Users app and click User group.
2. In the list, click the relevant user group and select Leave group.
18.5.4. Edit user objects
1. Open the Users app and find the type of user object you want to edit.
2. In the object list, click the relevant object and select Edit.
Manage users, user roles and user
groups
Delete user objects
171
3. Modify the options you want.
4. Click Save.
18.5.5. Delete user objects
1. Open the Users app and find the type of user object you want to delete.
2. In the object list, click the relevant object and select Remove.
3. Click OK to confirm.
18.5.6. Display details of user objects
1. Open the Users app and find the type of user object you want to view.
2. In the object list, click the relevant object and select Show details.
18.5.7. Change sharing settings for user objects
1. Open the Users app and find the type of user object you want to modify.
2. In the object list, click the relevant object and select Sharing settings.
3. (Optional) Search for a user group and select it, then click the plus icon. The user group is
added to the list.
4. (Optional) Select External access (without login).
5. Change the settings for the user groups you want to modify.
None
Can view: Everyone in the user group can view the object
Can edit and view: Everyone in the user group can view and edit the object
6. Click Save.
18.6. Enable support for OpenID
DHIS2 supports the OpenID standard, which allows third party login using a OpenID provider,
for more information see http://openid.net. To create a custom OpenID URL for a user name you
can visit this URL and log in with your OpenID provider: http://openid-provider.appspot.com.
To enable support for OpenID in DHIS2, you must:
1. Set your OpenID provider: This can be done inside system settings, under "Access". Here
you can set both the OpenID provider, and also the label to display on the login page to login
with this provider (defaults to Login with OpenID).
2. Set the OpenID identifier on the user: For every user that should be able to login with
his OpenID identifier, you will need to set this on the user itself. This can be done in user
management, under the email field, there is not a field called OpenID which can be used
to fill in the OpenID identifier.
18.7. Decentralize user management
DHIS2 supports a concept for user management referred to as managed users which allows to
explicitly define which users should be allowed to manage or modify which users. To "manage
a user" implies that you can see and modify that user. The basic concept for user management
is that you can see and modify users which you have been granted all of the authorities; in
other words you can modify users which have a subset of your own authorities. The managed
users concept gives you greater control over this.
Manage users, user roles and user
groups
Example: user management in a health
system
172
The managed users concept allows you to define which users should be able to manage which
users. This is configured through user groups and memberships within such groups. A user
group can be configured to be allowed to manage other user groups from the standard add
and update user interface. The effect is that a specific user can manage all users which are
members of user groups which can be managed by a user group that the user is member of. In
other words, users can be managed by all members of user groups which are managing user
groups they are member of.
To enable this concept you should grant users the authority to "Add/update users within
managed groups", and not grant access to the standard "Add/update users" authority. An
implication of the managed users concept is that when creating a user with the "Add/update
users within managed groups" only, the user must be made a member of at least one user
group that the current user can manage. If not, the current user would lose access to the user
being created immediately. This is validated by the system.
When granted the "Add/update users within managed groups" authority, the system lets a user
add members to user groups for which she has read-only access to. The purpose of this is to
allow for decentralized user management. You may define a range of user groups where other
users may add or remove members, but not remove or change the name of the group.
18.8. Example: user management in a health system
In a health system, users are logically grouped with respect to the task they perform and the
position they occupy.
1. Define which users should have the role as system administrators. They are often part of
the national HIS division and should have full authority in the system.
2. Create roughly one user role for each position.
Examples of common positions are:
Position Typical tasks Recommended
authorities
Comment
System administrators Set up the
basic structure
(metadata) of the
system.
Add, update and
delete the core
elements of the
system, for example
data elements,
indicators and data
sets.
Only system
administrators
should modify
metadata.
If you allow users
outside the system
administrators
team to modify the
metadata, it might
lead to problems
with coordination.
Updates to the
system should only
be performed by the
administrators of the
system.
National health
managers
Province health
managers
Monitor and
analyse data
Access to the
reports module,
the GIS, Data
Quality apps and
the dashboard.
Don't need access to
enter data, modify
data elements or
data sets.
Manage users, user roles and user
groups
Example: user management in a health
system
173
Position Typical tasks Recommended
authorities
Comment
National health
information system
division officers (HISO)
District health records
and information
officers (DHRIO)
Facility health records
and information
officers (HRIO)
Enter data that
comes from
facilities which
are not able to do
so directly
Monitor, evaluate
and analyse data
Access to all
the analysis and
validation apps
Access to the Data
Entry app.
-
Data entry clerks - - -
Visualize usage statistics About the Usage Analytics app
175
Chapter 19. Visualize usage statistics
19.1. About the Usage Analytics app
The Usage Analytics app lets you visualize statistics on how users are working with the
Dashboard, Pivot Table, GIS, Event Visualizer, Data Visualizer and Event Reports apps
within DHIS2. With this statistics you can answers questions such as:
How many times people have loaded charts, pivots tables and dashboards?
How many favorites have users created?
How many users that are logging in versus total number of users?
What are the most viewed favorites?
19.2. Create a usage analytics graph
1. Open the Usage Analytics app.
2. Select a Start date and End date.
3. Select an Interval: day, week month or year.
4. Select a Category.
There are five analytics categories:
Favorite views: Provides the number of times various types of favorites have been
viewed, such as charts, pivot tables and dashboards, over time. This analysis lets you
switch between all types of favorites, the total across all types and the average number
of views.
Favorites: Provides the number of favorites which have been created and stored in the
system over time.
Users: Provides the number of active as well as total number of users over time.
Top favorites: Shows the most viewed favorites in the system by type.
Data values: Provides the number of data values stored in the system over time.
5. Click Update.
Configure metadata About the Maintenance app
177
Chapter 20. Configure metadata
20.1. About the Maintenance app
In the Maintenance app you configure all the metadata objects you need to collect and
analyze data:
• Categories
Data elements
Data sets and data entry forms
• Indicators
Organisation units
Program metadata: tracked entity, tracked entity attribute and relationship type
Validation rules
• Attributes
• Constants
Options sets
• Legends
• Predictors
Push reports
External map layers
Note
The functions you have access to depend on your user role's access permissions.
20.2. Manage categories
20.2.1. About categories
Categories are typically a concept, for example "Gender", "Age" or "Disease Status". Data
elements such as "Number of cases of confirmed malaria" are often broken into smaller
component parts to determine, for example, the number of confirmed malaria cases of
particular age groups.
Use categories to disaggregate data elements into individual components. You can also use
categories to assign metadata attributes to all data recorded in a specific dataset, such as
"Implementing partner" or "Funding agency."
Example20.1.Three age categories
Create three categories: "Under 1", "1-5" and "Over 5". Assign them as categories to the data
element. This creates three separate fields for this data in the data entry forms:
Number of confirmed malaria cases (Under 1)
Number of confirmed malaria cases (1-5)
Configure metadata Workflow
178
Number of confirmed malaria cases (Over 5)
Without categories, you would have had to create each of the data elements listed above
separately.
In the Maintenance app, you manage the following and category objects:
Table20.1.Category objects in the Maintenance app
Object type Available functions
Category option Create, edit, clone, share, delete, show
details and translate
Category Create, edit, clone, share, delete, show
details and translate
Category combination Create, edit, clone, share, delete, show
details and translate
Category option combination Edit and show details
Category option group Create, edit, clone, share, delete, show
details and translate
Category option group set Create, edit, clone, share, delete, show
details and translate
20.2.2. Workflow
1. Create all category options.
2. Create categories composed by the multiple category options you've created.
3. Create category combinations composed by either one or multiple categories.
4. Create data elements and assign them to a category combination.
20.2.3. Create or edit a category option
When possible, recycle category options. For instance, there might be two categories which
might share a particular category option (for example <1 year of age). When creating the
categories, this category option could be reused. This is important if particular category options
(or category option combinations) that need to be analyzed together.
1. Open the Maintenance app and click Category > Category option.
2. Click the add button.
3. Fill in the form:
a. Name
b. Short name
c. Start date
d. End date
4. Select organisation units and assign them.
Tip
You can automatically select all organisation units that belong to an organisation unit
level or organisation unit group, for example "Chiefdom" or "Urban. To do this:
Select an Organisation unit level or Organisation unit group and click Select.
5. Click Save.
Configure metadata Create or edit a category
179
20.2.4. Create or edit a category
When you have created all category options for a particular category, you can create that
category.
1. Open the Maintenance app and click Category > Category.
2. Click the add button.
3. Fill in the form:
a. Name
b. Code
c. Data dimension type
A category either be of type "Disaggregation" or "Attribute". For disaggregation of data
elements, you select Disaggregation. The data dimension type "Attribute" allows the
category to be used to assign a combination of categories to data recorded through a
data set.
d. Data dimension
If you select Data dimension, the category will be available to the analytics as another
dimension, in addition to the standard dimensions of "Period" and "Organisation unit".
4. Select category options and assign them.
5. Click Save.
20.2.5. Create or edit a category combination
Category combinations lets you combine multiple categories into a related set.
Example20.2.Category combination
You can disaggregate the data element "Number of new HIV infections" into the following
categories:
HIV Service: "Other", "PMTCT", "TB"
Gender: "Male", "Female"
In this example, there are two levels of disaggregation that consist of two separate data
element categories. Each data element category consist of several data element category
options.
In DHIS2, different data elements are disaggregated according to a common set of categories.
By combining these different categories into a category combination and assigning these
combinations to data elements, you can apply the appropriate disaggregation levels quickly
to a large number of data elements.
1. Open the Maintenance app and click Category > Category combination.
2. Click the add button.
3. Fill in the form:
a. Name
b. Code
c. Data dimension type
d. Skip category total in reports
4. Select categories and assign them.
5. Click Save.
Configure metadata Create or edit a category option group
180
20.2.6. Create or edit a category option group
You can group and classify category options by using category option groups. The main purpose
of the category option group set is to add more dimensionality to your captured data for
analysis in for example the Pivot table or Data Visualizer apps.
Example20.3.Category options groups and group sets
In a system, data is collected by "projects", where projects is modeled as category options.
The system must be able to analyse data based on which donor that supports the project. In
this case, create a category option group set called "Donor". Each donor can be created as a
category option group, where each category option / project is put in the appropriate group.
In the data analysis applications, the "Donor" group set will appear as a data dimension, while
each donor appear as dimension items, ready to be included in reports.
To create a category option group:
1. Open the Maintenance app and click Category > Category option group.
2. Click the add button.
3. Fill in the form:
a. Name
b. Short name: Define a short name for the data element.
c. Code
d. Data dimension type
4. Select Category options and assign them.
5. Click Save.
20.2.7. Create or edit a category option group set
You can group category option groups in category option group sets. The main purpose of the
category option group set is to add more dimensionality to your captured data for analysis in
for example the Pivot table or Data Visualizer apps.
1. Open the Maintenance app and click Category > Category option group set.
2. Click the add button.
3. Fill in the form:
a. Name
b. Description
c. Data dimension
d. Data dimension type
4. Select Category option groups and assign them.
5. Click Save.
20.2.8. Use category combinations for data sets
When categories and category combinations have the data dimension type "Attribute", they
can apply a common set of attributes to a related set of data values contained in a data set.
When category combinations are used as a attribute, they serve as another dimension (similar
to "Period" and "Organisation unit") which you can use in your analysis.
Example20.4.Use category combination for a data set
Suppose that a NGO is providing ART services in a given facility. They would need to report
each month on the "ART monthly summary", which would contain a number of data elements.
Configure metadata Assign a code to a category option
combination
181
The NGO and project could potentially change over time. In order to attribute data to a given
NGO and project at any point in time, you need to record this information with each data value
at the time of data entry.
1. Create two categories with the data dimension type "Attribute": "Implementing partner" and
"Projects".
2. Create a category combination with the data dimension type "Attribute": "Implementing
partners and projects".
3. Assign the categories you've created to the category combination.
4. Create a data set called "ART monthly summary" and select the "Implementing partners and
projects" category combination.
When you enter data in the Data entry app, you can select an "Implementing partner" and
a "Project". Each recorded data value, is assigned a specific combination of these categories
as an attribute. These attributes (when specified as a dimension) can be used in the analysis
applications similar to other dimensions, for example the period and organisation unit.
20.2.9. Assign a code to a category option combination
You can assign a code to category option combinations. This makes data exchange between
DHIS2 and external systems easier. The system creates the category option combinations
automatically.
1. Open the Maintenance app and click Category > Category option combination.
2. In the list, find the object you want to modify.
3. Click the options menu and select Edit.
4. Enter a code.
5. Click Save.
20.2.10. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
Configure metadata Change sharing settings for metadata
objects
182
20.2.11. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
20.2.12. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.2.13. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
Configure metadata Translate metadata objects
183
20.2.14. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.3. Manage data elements
20.3.1. About data elements
Data elements are the base of DHIS2. Data elements define what is actually recorded in the
system, for example number of immunisations or number of cases of malaria.
Data elements such as "Number of cases of confirmed malaria" are often broken into smaller
component parts to determine, for example, the number of confirmed malaria cases of
particular age groups.
In the Maintenance app, you manage the following data elements objects:
Table20.2.Data element objects in the Maintenance app
Object type Available functions
Data element Create, edit, clone, share, delete, show
details and translate
Data element group Create, edit, clone, share, delete, show
details and translate
Data element group set Create, edit, clone, share, delete, show
details and translate
20.3.2. Workflow
1. Create all category options.
2. Create categories composed by the multiple category options you've created.
3. Create category combinations composed by either one or multiple categories.
4. Create data elements and assign them to a category combination.
Configure metadata Create or edit a data element
184
20.3.3. Create or edit a data element
1. Open the Maintenance app and click Data elements > Data element.
2. Click the add button.
3. In the Name field, define the precise name of the data element.
Each data element must have a unique name.
4. In the Short name field, define a short name for the data element.
Typically, the short name is an abbreviation of the full data element name. This attribute is
often used in reports to display the name of the data element, where space is limited.
5. (Optional) In the Code field, assign a code.
In many countries data elements are assigned a code.
6. In the Description field, type a description of the data element. Be as precise as possible
and include complete information about how the data element is measured and what its
purpose is.
7. In the Form name field, type an alternative name of the data element. This name can be
used in either section or automatic data entry forms. The form name is applied automatically.
8. In the Domain type field, select whether the data element is an aggregate or tracker type
of data element.
9. In the Value type field, select the type of data that the data element will record.
Table20.3.Value types
Value type Description
Age -
Coordinate A point coordinate specified as
longitude and latitude in decimal
degrees. All coordinate should be
specified in the format "-19.23 , 56.42"
with a comma separating the longitude
and latitude.
Date Dates rendered as calendar widget in
data entry.
Configure metadata Create or edit a data element
185
Value type Description
Date & time Is a combination of the DATE and TIME
data elements.
Email Email.
File A file resource where you can store
external files, for example documents
and photos.
Image A file resource where you can store
photos.
Unlike the FILE data element, the
IMAGE data element can display the
uploaded image directly in forms.
Integer Any whole number (positive and
negative), including zero.
Letter A single letter.
Long text Textual value. Renders as text area with
no length constraint in forms.
Negative integer Any whole number less than (but not
including) zero.
Number Any real numeric value with a single
decimal point. Thousands separators
and scientific notation is not supported.
Percentage Whole numbers inclusive between 0 and
100.
Phone number Phone number.
Positive integer Any whole number greater than (but not
including) zero.
Positive of zero integer Any positive whole number, including
zero.
Organisation unit Organisation units rendered as a
hierarchy tree widget.
If the user has assigned "search
organisation units", these will be
displayed instead of the assigned
organisation units.
Unit interval Any real number greater than or equal
to 0 and less than or equal to 1.
Text Textual value. The maximum number of
allowed characters per value is 50,000.
Time Time is stored in HH:mm format.
HH is a number between 0 and 23
mm is a number between 00 and 59
Tracker associate Tracked entity instance. Rendered as
dialog with a list of tracked entity
instances and a search field.
Configure metadata Create or edit a data element
186
Value type Description
Username DHIS 2 user. Rendered as a dialog with
a list of users and a search field.
Yes/No Boolean values, renders as drop-down
lists in data entry.
Yes only True values, renders as check-boxes in
data entry.
10.In the Aggregation type field, select the default aggregation operation that will be used
on the data element.
Most data elements should have the Sum operator. This includes all data elements which
should be added together. Other data elements, such as staffing levels, should be set to use
the Average operator, when values along the time dimension should not be added together,
but rather averaged.
Table20.4.Aggregation operators
Aggregation operator Description
Average Average the values in both the period as
and the organisation unit dimensions.
Average (sum in organisation unit
hierarchy)
Average of data values in the period
dimension, sum in the organisation unit
dimensions.
Count Count of data values.
Min Minimum of data values.
Max Maximum of data values.
None No aggregation is performed in any
dimension.
Sum Sum of data values in the period and
organisation unit dimension.
Standard deviation Standard deviation (population-based) of
data values.
Variance Variance (population-based) of data values.
11.If you want to save zeros for a particular reason, select Store zero data values. By default,
DHIS2 does not store zeros entered in the data entry module.
12.In the URL field, enter a link to an in-depth description of the data element.
For example a link to a metadata repository or registry that contains detailed technical
information about the definition and measurement of the data element.
13.In the Category combination field, define which category combination the data element
should have. This is also known as the "disaggregation".
14.Select an Option set.
Option sets are predefined lists of options which can be used in data entry.
15.Select an Option set for comments.
Option sets for comments are predefined lists of options which can be used to specify
standardized comments for data values in data entry.
16.Assign one or multiple Legends.
Legends are used in for example the GIS app to display certain data elements with certain
icons.
Configure metadata Create or edit a data element group
187
17.Set the Aggregation levels to allow the data element to be aggregated at one or more
levels:
a. In the left pane, select the levels you want to assign to the data element.
b. Click the right arrow to assign the aggregation levels.
By default, the aggregation will start at the lowest assigned organisation unit. If you for
example select "Chiefdom", it means that "Chiefdom", "District", and "National" aggregates
use "Chiefdom" (the highest aggregation level available) as the data source, and PHU data
will not be included. PHU data will still be available for the PHU level, but not included in
aggregations to the levels above.
If you select both "District" and "Chiefdom", it means that the "District" and "National" level
aggregates use District data as their source, "Chiefdom" will use Chiefdom, and "PHU" will
use PHU.
18.If applicable, enter custom attributes values, for example Classification or Collection
method.
Note
You create custom attributes in the Maintenance app: Other > Attributes.
19.If applicable, select compulsory data element group sets, for example Main data element
group or Tracker-based data.
Note
You'll only see data element group sets in this form if you've created them and set
them to Compulsory.
You create data element group sets in the Maintenance app: Data element > Date
element group set.
20.Click Save.
20.3.4. Create or edit a data element group
Data element groups lets you classify related data elements into a common theme. For
example, two data elements "Measles immunisation" and "BCG Immunisation" might be
grouped together into a data element group "Childhood immunisation".
To create a data element group:
1. Open the Maintenance app and click Data elements > Data element group.
2. Click the add button.
3. Fill in the form:
a. Name
b. Short name
c. Code
4. Select data elements and assign them.
5. Click Save.
20.3.5. Create or edit a data element group set
Data element group sets allows you to categorise multiple data element groups into a set.
The system uses data element group sets during analysis and reporting to combine similar
data element groups into a common theme. A data element group can be part of multiple data
element group sets.
Configure metadata Clone metadata objects
188
1. Open the Maintenance app and click Data elements > Data element group set.
2. Click the add button.
3. Fill in the form:
a. Name
b. Code
c. Description
d. Compulsory
e. Data dimension
4. Select data element groups and assign them.
Available data element groups are displayed in the left panel. Data element groups that are
currently members of the data element group set are displayed in the right hand panel.
5. Click Save.
20.3.6. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
20.3.7. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
Configure metadata Delete metadata objects
189
20.3.8. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.3.9. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.3.10. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.4. Manage data sets and data entry forms
20.4.1. About data sets and data entry forms
All data entry in DHIS2 is organised in data sets. A data set is a collection of data elements
grouped together for data entry and data export between instances of DHIS2. To use a data
set to collect data for a specific organisation unit, you must assign the organisation unit to the
Configure metadata About data sets and data entry forms
190
data set. Once you have assigned the data set to an organisation unit, that data set is available
in the Data entry app. Only the organisation units that you have assigned the data set to can
use the data set for data entry.
A category combination can link to both data elements and data sets. If you use a category
combination for a data set, the category combinations is applicable for the whole form. This
means that you can use categories to capture information which is common to an entire form,
for example the name of the a project or grant. When a data set is linked to a category
combination, those categories will be displayed as drop-down boxes in the Data entry app.
Data captured in the form will then be linked to the selected category options from those drop-
down boxes. For information about how to create categories and category combinations, see
section "Manage data elements and categories". Make sure that you set the type of categories
and category combinations to "Attribute".
Example20.5.Categories for data sets
An scenario for when categories are useful is when you need to capture a data entry form for
a implementing partner organisation and a project. In that case:
1. Create category options and categories for all partner organisations and projects and link
them in a new category combination.
2. Assign the category combination to the data set (form) for which you need to capture this
information.
When opening this data set in data entry module, the partner organisation and project
categories will automatically be rendered as drop-down boxes, allowing you to select a
specific implementing partner organisation and project before continuing to do data entry.
You create and edit data sets in the Maintenance app. Here you define, for example, which
data elements you want to include in the data set and the data collection frequency.
You enter data in the Data entry app. The Data entry app uses data entry forms to display
the data sets. There are three types of data entry forms:
Table20.5.Data entry form types
Data entry form type Description
Default form Once you have assigned a data set to an organisation
unit, a default form is created automatically. The default
form is then available in the Data entry app for the
organisation units you have assigned it to.
A default form consist of a list of the data elements
belonging to the data set together with a column for
inputting the values. If your data set contains data
elements with a non-default category combination, for
example age groups or gender, additional columns are
automatically created in the default form based on the
different categories.
If you use more than one category combination you
get multiple columns in the default form with different
column headings for the options.
Section form If the default form doesn't meet your needs, you can
modify it to create a section form. Section forms give you
more flexibility when it comes to using tabular forms.
In a section form you can, for example, create multiple
tables with subheadings and disable (grey out) cells in
a table.
Configure metadata Workflow
191
Data entry form type Description
When you have added a section form to a data set, the
section form is available in the Data entry app.
Custom form If the form you want to design is too complicated for
default or section forms, you can create a custom form.
A custom form takes more time to create than a section
form, but you have full control over the design.
You can, for example, mimic an existing paper
aggregation form with a custom form. This makes data
entry easier, and should reduce the number incorrectly
entered data elements.
When you have added a custom form to a data set, the
custom form is available in the Data entry app.
A data set can have both section and custom forms
If a data set has both a section form and a custom form, the system displays the custom
form during data entry. Users who enter data can't select which form they want to use.
In web-based data entry the order of display preference is:
1. Custom form (if it exists)
2. Section form (if it exists)
3. Default form
Mobile devices do not support custom forms. In mobile-based data entry the order of
display preference is:
1. Section form (if it exists)
2. Default form
In the Maintenance app, you manage the following data set objects:
Table20.6.Data set objects in the Maintenance app
Object type Available functions
Data set Create, assign to organisation units, edit,
share, delete, show details and translate
Edit compulsory data elements
Add and remove multiple data sets to
organisation units at once
Section form Create, edit and manage grey fields
Section Change display order, delete and translate
Custom form Create, edit and script
20.4.2. Workflow
You need to have data elements and categories to create data sets and data entry forms.
1. Create a data set.
2. Assign the data set to organisation units.
A default form is created automatically.
Configure metadata Create or edit a data set
192
3. Create a section form or a custom form.
Now you can register data in the Data entry app.
20.4.3. Create or edit a data set
1. Open the Maintenance app and click Data set > Data set.
2. Click the add button.
3. In the Name field, type the precise name of the data set.
4. In the Short name field, define a short name for the data set.
Typically, the short name is an abbreviation of the full data set name. This attribute is often
used to display the name of the data set where space is limited.
5. (Optional) In the Code field, assign a code.
6. In the Description field, type a description of the data set.
7. Enter the number of Expiry days.
The number of expiry days controls for how long it should be possible to enter data in the
Data entry app for this data set. Expiry days refer to the number of days after the end date
of the selected data entry period where the data entry form should be open for entry. After
the number of days has expired, the data set will be locked for further entry.
You can set manual exceptions to this using the lock exception functionality in the Data
Administration app.
Note
To allow data entry into all possible historical time periods, set the number of expiry
days to zero.
8. If you want it to be possible to enter data for future periods, type the number of periods in
the Open future periods for data entry field.
The value is the number of future periods which are available for data entry.
Configure metadata Create or edit a data set
193
Example20.6.Open future periods for data entry
For a monthly data set a value of 2 allows you to enter data for 2 months in advance. This
is useful for, by example, population, target and planning data.
9. In the Days after period to qualify for timely submission field, type the number of days
in which data can be entered to be considered reported on time.
To verify the number of timely reports submitted, go to Reports > Reporting rate
summary.
10.Select a Period type.
The period type defines the frequency of reporting for the particular data set. The frequency
can for example be daily, quarterly or yearly.
11.Select a Category combination to assign it to the data set.
Tip
Click Add new to create category combinations that you're missing. In the form that
opens, create the category combinations you need. When you're done, click Refresh
values.
12.In the Complete notification recipients list, select a user group that should receive a
message when the data set is marked as complete in the Data Entry app.
The message is delivered through the DHIS2 messaging system.
13.If you want the user who entered the data to receive a message when the data set is marked
as complete in the Data entry app, select Send notification to completing user.
The message is delivered through the DHIS2 messaging system.
14.If applicable, select, a Data approval workflow.
15.If you want it to be possible to use the data set within the Java mobile DHIS 2 application,
select Enable for Java mobile client.
16.If you want it to be mandatory to fill all values for a data element in data entry if one or more
values have been filled, select All fields for data elements required.
This means that if you enter one data value for a data element in an entry field (that is for a
category option combination), then you must enter data for all fields belonging to that data
element (that is all category option combinations).
17.If you want it to be possible to mark a data entry form as complete only if the validation of
that form is successful, select Complete allowed only if validation passes.
If you select this option, you can't mark the form as complete if validation fails.
18.If you want it to be mandatory that any missing values require a comment to justify their
absence, select Missing values requires comment on complete.
19.(Optional) Assign one or multiple Legends.
20.If applicable, select Skip offline.
This option controls whether this data entry form should be downloaded and saved in the
user's web browser. Normally you shouldn't select Skip offline. This is the default setting.
If you have big forms which are rarely used you can consider selecting this option to speed
up initial loading in the data entry module.
21.If applicable, select Data element decoration
Configure metadata Create or edit Data set Notification
194
If you select this option, descriptions of data elements render in call-outs in downloaded
data sets in offline mode in the Data entry app.
22.If applicable, select Render sections as tabs.
This option is only applicable for section forms. The option allows you to render each section
as a tab horizontally above the data set. This is useful for long data sets as it allows
appropriate sections to be selected quickly without going through the entire form.
23.If applicable, select Render vertically.
This option is only applicable for section forms.
24.Select data elements and assign them.
You can override the category combination for each selected data set by clicking on the
gear icon above the list of selected data elements. This allows you to utilize a specific
category combination (disaggregation) within the current data set instead of the category
combination associated directly with the data element itself.
25.Select indicators and assign them.
26.In the organisation unit tree, select the organisation units you want to assign the data set to.
Tip
Click Organisation unit level to select all organisation units that belong to a
certain organisation level.
Click Organisation unit group to select all organisation units that belong to a
certain organisation unit group.
27.Click Save.
You can now use the data set in the Data Entry app for the organisation units that you have
assigned to and for periods according to the selected frequency (period type).
20.4.4. Create or edit Data set Notification
1. Open the Maintenance app and click Data set > Data set notification.
2. Click the add button.
20.4.4.1. What to send?
1. In the Name field, type the precise name of the data set notification.
2. (Optional) In the Code field, assign a code.
Configure metadata Create or edit Data set Notification
195
3. Enter Data sets.
These data sets will be associated to this notification. Incase any of them is completed for a
certain period and organisation unit, notification will be generated by the system.
Note
Nothing will happen if no data set is selected
4. In Message template section there are two parameters.
Subject template subject of the notification sent in notification. It can have values from
the list of variables avaiable on the right side.
Message template actual message sent in notification. It can have values from the list
of variables avaiable on the right side.
Note
Subject is only relevant in case of Email and internal DHIS-2 messages. It is ignored
in case of SMS.
20.4.4.2. When to send?
1. Data set notification trigger field determine when to send notification.
Data Set Completion will trigger notification as soon as data set is completed.
Schedule Days will schedule notificaton based on number days relative to scheduled
date. Schedule date will be decided by Period associated with Data set.
Send notification as provides two different types of notifications
Collective summary send notification in summary mood
Single notification sends notification in sinlge mood
Note
Send notification as option is only available in case of scheduled notification. This
option is set to default which is Single notification in case of completion notification
20.4.4.3. Who to send?
1. Notification recipient field determine recipients of the notification.
Organisation Unit contact will send notification to contact assigned to organisation unit
which the data has been collected from.
UserGroup will send notification to all the member of the selected UserGroup.
Configure metadata Override data elements' category
combinations in a data set
196
Note
An internal DHIS-2 message will be sent in case if recipient is UserGroup. Moreover
user will also receive SMS/EMAIL if phone number and email address exist for that
user and SMS/EMAIL notifications are enabled in SystemSettings
20.4.5. Override data elements' category combinations in a data set
You can override which category combination to use for a data element within the context of
a data set. This means that a data element can use different category combinations within
different data sets. This is useful when you want to reuse a data element since you don't have
to replicate the data element to allow multiple category combinations.
Example20.7.
If different regions within your organisation unit hierarchy use different disaggregations, or if
the disaggregations change over time, you can represent this by creating different data sets
with the appropriate category combinations.
1. Open the Maintenance app and click Data set > Data set.
2. In the list, find the data set you want to modify.
3. Click the options menu and select Edit.
4. Go to the data elements section and click the spanner icon.
5. Select new category combinations and click Close.
6. Click Save.
20.4.6. Edit compulsory data elements in a data set
You can add or remove data elements which will be marked as compulsory during data entry.
1. Open the Maintenance app and click Data set > Data set.
2. In the list, find the data set you want to edit.
3. Click the options menu and select Edit compulsory data elements.
4. Assign the compulsory data elements.
5. Click Save.
20.4.7. Download default data forms in PDF format
You can download a default data from in PDF format for offline data entry.
1. Open the Maintenance app and click Data set > Data set.
2. In the list, find the object you want to download.
3. Click the options menu and select Get PDF for data entry.
20.4.8. Manage section forms
20.4.8.1. Create a section form
Section forms are separated automatically by data element category combinations, which
produce a spreadsheet like data entry form for each section.
Configure metadata Manage section forms
197
1. Open the Maintenance app and click Data set > Data set.
2. In the list, find the data set you want to create a section form for.
3. Click the options menu and select Manage sections.
4. Click the add button.
5. (Optional) In the Name field, type the name of the section.
6. (Optional) In the Description field, type a description of the section.
7. (Optional) To display totals for rows in the section form during data entry, select Show row
totals.
8. (Optional) To display totals for columns in the section form during data entry, select Show
column totals.
9. Assign data elements to the section:
a. (Optional) Select a Category combination filter.
Note
You can only use one category combination per section.
Option Description
None Displays all data elements that don't have
a category combination.
<No filter> Displays all data elements.
b. Select data elements and assign them.
10.(Optional) Sort the data elements within the section by using the up and down arrows to the
left of the assigned data elements field.
11.Click Save.
12.Repeat add section steps for each section you want to have in your section form.
In the Data Entry app you can now use the section form. The section form appears
automatically when sections are available for the selected data set. Data sets which have
section forms will automatically display the section form.
Example20.8.Section form example
Note how each data element category has been separated into a separate section, and a
data entry table has been automatically generated by the system. Use of section forms in
combination with data element categories can drastically reduce the amount of time which is
required to create data entry forms for data sets.
Configure metadata Manage section forms
198
20.4.8.2. Edit a section form
1. Open the Maintenance app and click Data set > Data set.
2. In the list, find the data set you want to edit the section form for.
3. Click the options menu and select Manage sections.
4. In the list, find the section you want to edit.
5. Click the options menu and select Edit.
6. Edit the section and click Save.
7. Repeat edit section steps for each section you want to edit.
20.4.8.3. Manage grey fields in a section form
You can disable data elements and category options for data entry. That means it won’t be
possible to enter data into these fields during data entry.
Configure metadata Manage section forms
199
1. Open the Maintenance app and click Data set > Data set.
2. In the list, find the data set you want to edit the section form for.
3. Click the options menu and select Manage sections.
4. In the list, find the section you want to edit.
5. Click the options menu and select Manage grey fields.
6. Select which fields you want to disable.
Note
If you've sections that contain data elements assigned to multiple category
combinations, switch between the category combinations to view all fields.
7. Click Save.
20.4.8.4. Change section display order in a section form
You can control in which order sections are displayed in a section form.
1. Open the Maintenance app and click Data set > Data set.
2. In the list, find the data set you want to edit the section form for.
3. Click the options menu and select Manage sections.
4. In the list, find the section you want to move.
5. Click the options menu and select Move up or Move down.
If the section you want to move is the first or last section in the list, you'll only see one of
the move options.
20.4.8.5. Delete a section in a section form
1. Open the Maintenance app and click Data set > Data set.
2. In the list, find the data set you want to edit the section form for.
Configure metadata Manage custom forms
200
3. Click the options menu and select Manage sections.
4. In the list, find the section you want to delete.
5. Click the options menu and select Delete.
20.4.8.6. Translate a section in a section form
1. Open the Maintenance app and click Data set > Data set.
2. In the list, find the data set you want to edit the section form for.
3. Click the options menu and select Translate.
4. Select a locale.
5. Enter the required information.
6. Click Close.
20.4.9. Manage custom forms
20.4.9.1. Create a custom form
You design custom forms in a built-in WYSIWYG HTML editor. If you select Source, you can
paste HTML code directly in the editing area. For a complete guide on how to use the editor,
refer to http://docs.ckeditor.com/.
To create a custom form:
1. Open the Maintenance app and click Data set.
2. In the list, find the data set you want to add a custom form to.
3. Click the options menu and select Design data entry form.
4. In the editing area, create the custom form.
Double-clik on a object in the left-hand list to insert it in the form.
If you already have the HTML code for your form, click Source and paste the code.
5. Select a Form display style.
6. Click Save.
Configure metadata Manage custom forms
201
20.4.9.2. Scripting in custom forms
In custom data entry form you can use JavaScript to create dynamic behavior and
customizations. As an example, you can hide form sections based on specific user input for
data elements, or show specific information when a form loads.
20.4.9.2.1. Events
The DHIS2 data entry module provides a range of events which you can register for and use
to perform actions at certain times. The events are registered on the document element. The
jQuery event object and the data set identifier are always the first two arguments provided
to the callback functions. The table below provides an overview of the events and when they
are triggered.
Table20.7.Data entry events
Key Description Arguments
dhis2.de.event.formLoaded Triggered after the data entry form
is rendered, but before data values
are set in entry fields.
Event | Data set ID
dhis2.de.event.dataValuesLoadedTriggered after data values are set
in entry fields.
Event | Data set ID
dhis2.de.event.formReady Triggered when the data entry
form is completely rendered and
loaded with all elements.
Event | Data set ID
dhis2.de.event.dataValueSavedTriggered when a data value is
saved successfully.
Event | Data set ID |
Data value object
dhis2.de.event.completed Triggered when a data set is
successfully marked as complete.
Event | Data set ID
| Complete registration
object
dhis2.de.event.uncompleted Triggered when a data set
is successfully marked as
incomplete.
Event | Data set ID
dhis2.de.event.validationSuccessTriggered when validation is done
and there were no violations.
Event | Data set ID
dhis2.de.event.validationError Triggered when validation is done
and there were one or more
violations.
Event | Data set ID
dhis2.ou.event.orgUnitSelectedTriggered when one or more
organisation units are selected in
the org unit web tree.
Event | Org unit IDs |
Org unit names | Sub
org unit IDs
To register for an event:
<script type="text/javascript">
dhis2.util.on( 'dhis2.de.event.formReady', function( event, ds ) {
console.log( 'The form with id: ' + ds + ' is loaded!' );
} );
dhis2.util.on( 'dhis2.de.event.dataValueSaved', function( event, ds, dv ) {
console.log( 'Data value: ' + dv.value + ' was saved with data element: ' + dv.de );
} );
dhis2.util.on( 'dhis2.de.event.completed', function( event, ds, cr ) {
console.log( 'Form was completed for org unit: ' + cr.ou );
Configure metadata Change sharing settings for metadata
objects
202
} );
</script>
Note
Be careful to only use "namespaced" events like the ones in the example above and not
general ones like "click" as the dhis2.util.on method will unregister the event first.
If your function only applies to certain data sets you can use the supplied data set identifier
and shortcut your function for unwanted data sets like this:
dhis2.de.on( 'dhis2.de.event.validationSuccess', function( event, ds ) {
if ( $.inArray( ds, ['utXOiGbEj14', 'Re7qzHEThSC'] ) == -1 ) {
return false;
}
console.log( 'Form with id: ' + ds + ' validated successfully!' );
} );
The identifiers of the input fields in the data entry form is on the format described below. This
format can be used to select the input fields in your script and perform actions on them:
<dataelementid>-<optioncomboid>-val
Since the data set identifier is provided for all events a feasible alternative is to utilize the
"files" Web API resource and keep your callback functions in a single file, where you let the
JavaScript code take action based on which data set is currently loaded.
20.4.9.2.2. Functions
The DHIS2 data entry module contains JavaScript API functions which can be accessed from
custom data entry forms.
dhis2.de.api.getSelections: This function returns a JavaScript object which contains
properties for all dimensions with corresponding values for the identifiers of the selected
options. It contains properties for "ds" (data set), "pe" (period), "ou" (organisation unit) and
identifiers for all data set categories.
An example response looks like this:
{
+ ds: "lyLU2wR22tC",
+ pe: "201605",
+ ou: "g8upMTyEZGZ",
+ LFsZ8v5v7rq: "CW81uF03hvV",
+ yY2bQYqNt0o: "yMj2MnmNI8L"
+}
Example JavaScript usage of this function:
var sel = dhis2.de.api.getSelections();
+var orgUnit = sel["ou"];
+var partner = sel["LFsZ8v5v7rq"];
20.4.10. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Configure metadata Delete metadata objects
203
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
20.4.11. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.4.12. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.4.13. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
Configure metadata Manage indicators
204
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.5. Manage indicators
20.5.1. About indicators
An indicator is a formula that can consist of multiple data elements, constants, organisation
unit group counts and mathematical operators. The indicator consist typically of a numerator
and denominator. You use indicators to calculate coverage rates, incidence and other values
that are a result of data element values that have been entered into the system. Calculated
totals do not have a denominator.
Note
You never enter indicators directly in DHIS2, you calculate them.
An indicator formula can consist of mathematical operators, for example plus and minus, and
of the following elements:
Table20.8.Indicator formula
Formula element Type Description
Constant Component Constants are numerical
values which remain the
same for all indicator
calculations. This is useful in
order to have a single place
to change values that might
change over time.
Constants are applied AFTER
data element values have
been aggregated.
Data elements Component Data elements are
substituted by the data
value captured for the data
element.
Days Operator "Days" is special operator
that always provides the
number of days for a given
indicator calculation.
For example: if you want to
calculate the "Percentage of
time vaccine refrigerator was
Configure metadata About indicators
205
Formula element Type Description
non-functional", you could
define the numerator as:
("Days-"Number of days
vaccine refrigerator was
available"")/"Days"
If the fridge was available 25
days in June, the indicator
would be calculated as:
(30-25/25)*100 = 17 %
If you want to calculate
the total for Quarter 1, the
number of days ("Days")
would be:
31+28+31 = 90
The "Days" parameter will
always be the number of
days in the period of interest.
Organisation unit counts Component You can use organisation unit
groups in formulas. They will
be replaced by the number
of organisation units in the
group. During aggregation,
the organisation units in the
group will be intersected
with the part of the
organisation unit hierarchy
being requested.
This lets you use the number
of public facilities in a
specific district in indicators.
This is useful for example
when you create facility
infrastructure surveys and
reports.
Programs Component Click Programs and select
a program to view all
data elements, attributes
and indicators related to a
specific program.
The program components
you include in your formula
will have a program tag
assigned to them.
In the Maintenance app, you manage the following indicator objects:
Configure metadata Workflow
206
Table20.9.Indicator objects in the Maintenance app
Object type Available functions
Indicator Create, edit, clone, share, delete, show
details and translate
Indicator type Create, edit, clone, delete, show details and
translate
Indicator group Create, edit, clone, share, delete, show
details and translate
Indicator group set Create, edit, clone, share, delete, show
details and translate
20.5.2. Workflow
1. Create indicator types.
2. Create indicators.
3. Create indicator groups.
4. Create indicator group sets.
20.5.3. Create or edit an indicator type
Indicator types define a factor that is applied during aggregation. Indicator values that are
calculated during a data mart export or report table generation process will appear properly
formatted, and will therefore not require an additional multiplier (for example 100 in the case
of percents) for the values to appear correctly formatted.
Note
As of version 2.4 of DHIS2, the "Calculated data element" object has been deprecated.
Instead, you can create a calculated data element by creating an indicator type with
a factor of "1" and by setting the "Number" option to "Yes". The effect of setting
the "Number" option to "Yes" will be that the indicator will effectively not have a
denominator. You will therefore only be able to define a numerator, which will serve as
the formula of the calculated data element.
1. Open the Maintenance app and click Indicator > Indicator type.
2. Click the add button.
3. In the Name field, type the name of the indicator type, for example "Per cent", "Per
thousand", "Per ten thousand".
Configure metadata Create or edit an indicator
207
4. Type a Factor.
The factor is the numeric factor that will be multiplied by the indicator formula during the
calculation of the indicator.
5. Click Save.
20.5.4. Create or edit an indicator
1. Open the Maintenance app and click Indicator > Indicator.
2. Click the add button.
3. In the Name field, type the full name of the indicator, for example "Incidence of confirmed
malaria cases per 1000 population".
4. In the Short name field, type an abbreviated name of the indicator, for example "Inc conf.
malaria per 1000 pop".
The short name must be less than or equal to 25 characters, including spaces.
5. (Optional) In the Code field, assign a code.
In many countries indicators are assigned a code.
6. In the Description field, type a brief, informative description of the indicator and how it
is calculated.
7. If you want to apply an annualization factor during the calculation of the indicator, select
Annualized.
Configure metadata Create or edit an indicator
208
Typically, an annualized indicator's numerator is multiplied by a factor of 12, and the
denominator is for instance a yearly population figure. This allows for monthly coverage
values to be calculated with yearly population figures.
8. Select the number of Decimals in data output.
9. Select an Indicator type.
This field determines a factor that will automatically be applied during the calculation of the
indicator. Possible choices are determined by the indicator types. For example, a "Percent"
indicator will automatically be multiplied by a factor of 100 when exported to the data mart,
so that it will display as a percentage.
10.(Optional) Assign one or multiple Legends.
11.In the URL field, enter a link, for example a link to an indicator registry, where a full metadata
description of the indicator can be made available.
12.(Optional) Enter a Category option combination for aggregate data export..
You use this setting to map aggregated data exported as raw data to another server.
Typically you do this type of data exchange mapping when you want to create anonymous
aggregated data from patient data recorded in programs (event data).
13.(Optional) Enter an Attribute option combination for aggregate data export..
You use this setting to map aggregated data exported as raw data to another server.
Typically you do this type of data exchange mapping when you want to create anonymous
aggregated data from patient data recorded in programs (event data).
14.If applicable, enter custom attributes values, for example Classification or Collection
method.
Note
You create custom attributes in the Maintenance app: Other > Attributes.
15.Click Edit numerator.
a. Type a clear description of the numerator.
b. Define the numerator by double-clicking components in the right-hand field. The
components then appears as part of the formula in the left-hand field. Add mathematical
operators by double-clicking the icons below the left-hand field.
You formula must be mathematically valid. This includes correct use of parentheses when
necessary.
c. Click Done to save all changes to the numerator.
16.Click Edit denominator.
a. Type a clear description of the denominator.
b. Define the denominator by double-clicking components in the right-hand field. The
components then appears as part of the formula in the left-hand field. Add mathematical
operators by double-clicking the icons below the left-hand field.
You formula must be mathematically valid. This includes correct use of parentheses when
necessary.
c. Click Done to save all changes to the denominator.
17.If applicable, select compulsory indicator group sets, for example Human resources.
Note
You'll only see indicator group sets in this form if you've created them and set them
to Compulsory.
Configure metadata Create or edit an indicator group
209
You create indicator group sets in the Maintenance app: Indicator > Indicator
group set.
18.Click Save.
20.5.5. Create or edit an indicator group
1. Open the Maintenance app and click Indicator > Indicator group.
2. Click the add button.
3. Type a name.
4. Select indicators and assign them.
5. Click Save.
Configure metadata Create or edit an indicator group set
210
20.5.6. Create or edit an indicator group set
Indicator group sets create combined groups of similar indicators. For example, you might
have a group of indicators called "Malaria" and "Leishmaniasis". Both of these groups could
be combined into a group set called "Vector-borne diseases". Indicator groups sets are used
during analysis of data to combine similar themes of indicators.
1. Open the Maintenance app and click Indicators > Indicator group.
2. Click the add button.
3. Fill in the form:
a. Name
b. Description
c. Compulsory
4. Select indicator groups and assign them.
Available indicator groups are displayed in the left panel. Indicator groups that are currently
members of the indicator group set are displayed in the right hand panel.
5. Click Save.
20.5.7. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
Configure metadata Change sharing settings for metadata
objects
211
20.5.8. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
20.5.9. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.5.10. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
Configure metadata Translate metadata objects
212
2. In the object list, click the options menu and select Show details.
20.5.11. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.6. Manage organisation units
In this section you will learn how to:
Create a new organisation unit and build up the organisation unit hierarchy
Create organisation unit groups, group sets, and assign organisation units to them
Modify the organisation unit hierarchy
20.6.1. About organisation units
The organisation unit hierarchy defines the organisation structure of DHIS2, for example how
health facilities, administrative areas and other geographical areas are arranged with respect
to each other. It is the "where" dimension of DHIS2, similar to how periods represent the "when"
dimension.
The organisation unit hierarchy is built up by parent-child relations. In DHIS2, each of these
nodes is an organisation unit. A country might for example have eight provinces, and each
province might have a number of districts as children. Normally, the lowest levels consist of
facilities where data is collected. Data collecting facilities can also be located at higher levels,
for example national or provincial hospitals. Therefore, you can create skewed organisation
trees in DHIS2.
You can only have one organisation hierarchy at the same time.
You can have any number of levels in a hierarchy.
Typically national organisation hierarchies in public health have four to six levels.
Configure metadata Workflow
213
You can create additional classifications by using organisation groups and organisation group
sets.
For example to create parallel administrative boundaries to the health care sector.
It is recommended to use organisation unit groups to create a non-geographical hierarchy.
An organisation unit can only be a member of a single organisation unit group within an
organisation unit group set.
An organisation unit group can be part of multiple organisation unit group sets.
The organisation unit hierarchy is the main vehicle for data aggregation on the geographical
dimension.
When you close an organisation unit, you can't register or edit events to this organisation
unit in the Event Capture and Tracker Capture apps.
Changing the organisation unit hierarchy
You can change the organisation unit hierarchy after you've created it, even organisation
units that collect data. However, DHIS2 always uses the latest hierarchy for data
aggregation. So if you change the hierarchy, you loose the temporal representation of
the hierarchy across time.
Example20.9.
District A is sub-divided into District B and District C. Facilities which belonged to District
A are reassigned to District B and C. Any historical data, which you entered before the
split occurred, is still registered as belonging to District B and C, not to the obsolete
District A.
In the Maintenance app, you manage the following organisation unit objects:
Table20.10.Organisation unit objects in the Maintenance app
Object type Available functions
Organisation unit Create, edit, clone, delete, show details and
translate
Organisation unit group Create, edit, clone, share, delete, show
details and translate
Organisation unit group set Create, edit, clone, share, delete, show
details and translate
Organisation unit level Edit and translate
Hierarchy operations Move organisation units
20.6.2. Workflow
The recommended workflow is:
1. Create organisation units.
2. Create organisation unit groups.
3. Create organisation unit group sets.
Configure metadata Create or edit an organisation unit
214
20.6.3. Create or edit an organisation unit
You add organisation units to the hierarchy one by one, either as a root unit or as a child of a
selected organisation unit. You can only have one root unit.
1. Open the Maintenance app and click Organisation unit > Organisation unit.
2. Click the add button.
3. Select which organisation unit your new organisation unit will belong to:
a. Click Parent organisation unit.
b. In the organisation unit tree, locate the parent organisation unit and select it. Your
selection is marked in yellow.
Tip
Click the arrows to expand the organisation unit tree.
c. Click Select.
4. Enter a Name of the organisation unit.
Each organisation unit must have an unique name.
5. Enter a Short name for the organisation unit.
Typically, the short name is an abbreviation of the full organisation unit name. This attribute
is often used in reports to display the name of the organisation unit, where space is limited.
6. (Optional) Assign a Code.
In many countries organisation units are assigned a code.
7. (Optional) Type a Description of the organisation unit.
8. Select an Opening date.
The opening dates control which organisation units that existed at a point in time, for
example when analysing historical data.
9. If applicable, select a Closed date.
10.In the Comment field, enter any additional information that you would like to add.
11.(Optional) In the URL field, enter a link to an external web site that has additional information
about the organisation unit.
Configure metadata Create or edit an organisation unit group
215
12.Enter contact information:
Contact person
• Address
• E-mail
Phone number
13.(Optional) Enter Latitude and Longitude.
You must have latitude and longitude values to create maps in the GIS app. Then your
organisation units can be represented as points on a map, for example a health facility.
Without this information, the GIS app will not work.
It might be more efficient to import coordinates later as a batch job for all organisation units
using the Import-Export app. You also use the Import-Export app to create polygons. A
polygon is an organisation unit that represent an administrative boundary.
14.If applicable, select Data sets and assign them.
Note
You control whether a user should be able to assign data sets to an organisation unit
in the System Settings app:
Open the System Settings app, click Access and select Allow assigning object
to related objects during add or update.
15.If applicable, enter custom attributes values, for example HR identifier.
Note
You configure the custom attributes in the Maintenance app:
Open the Maintenance app and click Other > Attribute.
16.Click Save.
20.6.4. Create or edit an organisation unit group
Organisation unit groups allow you to classify related organisation units into a common theme.
You can for example group all organisation units that are hospitals in an Hospital group.
1. Open the Maintenance app and click Organisation unit > Organisation unit group.
2. Click the add button.
3. Fill in the form:
a. Name: Provide a precise, unique and descriptive name for the organisation unit group.
b. Short name: The short name should be less than 25 characters. Typically, the short name
is an abbreviation of the full organisation unit name. This attribute is used in certain places
in DHIS2 where space is limited.
c. Code
d. Symbol: Select a symbol which will be used to display the organisation unit (points only)
when the layer is displayed in the GIS app.
4. In the organisation tree, click the organisation units you want to add to the organisation
unit group.
You can locate an organisation unit in the tree by expanding the branches (click on the arrow
symbol), or by searching for it by name.
The selected organisation units display in orange.
Configure metadata Create or edit an organisation unit group
set
216
5. Click Save.
20.6.5. Create or edit an organisation unit group set
Organisation unit group sets allows you to create additional classifications of organisation units.
The group sets create new dimensions so that you can make a more detailed data analysis.
You an easily filter, organise or aggregate data by groups within a group set.
You can have any number of organisation unit group sets.
The default organisation unit group sets are Type and Ownership.
An organisation unit can only be a member of a single organisation unit group within an
organisation unit group set.
An organisation unit group can be part of multiple organisation unit group sets.
You can define whether an organisation unit group set is compulsory or not, which will affect
the completeness of the data. Compulsory means that all organisation units must be member
of a group in that group set.
Data completeness
In the Data integrity part of the Data administration app you can verify if you've
accidentally assigned the same organisation unit to multiple groups within the same
group set. In this app you also find information about organisation units that are not
members of a compulsory organisation unit group set.
1. Open the Maintenance app and click Organisation unit > Organisation unit group set.
2. Click the add button.
3. Fill in:
a. Name: Provide a precise name for the organisation unit group set.
b. Code
c. Description: Describe what the organisation unit group set measures or captures.
4. If you want all organisation units to be members of a group within the group set, select
Compulsory.
5. (Optional) Select Data dimension.
6. (Optional) Select Include subhierarchy in analytics.
If you select this, a sub-organisation unit will inherit the organisation unit group property
from its closest "parent" organisation unit. Any property on the sub-organisation unit will
override the inherit value.
If an organisation unit have no associated organisation unit group, the organisation unit can
inherit its closest parent's organisation unit group. If none of the parent organisation unit
groups have an organisation unit group for a given org unit group set, the result will still
be "blank", but if at least one parent has an organisation unit group, sub-organisation unit
will inherit it.
include subhierarchy in analytics" is enabled, which means the org units inherit their closest
parents org unit group IF the org unit is white (no org unit group associated with it).
7. Select organisation unit groups and assign them.
In the left-hand list, you find the available organisation unit groups. Use the arrows to move
selected groups between the two lists.
Configure metadata Create or edit an organisation unit group
set
217
If there are no organisation unit groups in the left-hand list, click Add new. In the form
that opens, create the organisation units group you need. When you're done, click Refresh
values.
Note
An organisation unit can only be a member of a single organisation unit group within
an organisation unit group set.
8. Click Save.
Example20.10.Classify facilities based on ownership
You want to analyse data based on the ownership of the facilities. All facilities have an owner
so you need to make sure that all organisation units get this classification. To do that you can
use the Compulsory option:
1. Create a group for each ownership type, for example "MoH", "Private" and "Faith-based".
2. Assign all facilities in the database to one of these groups.
3. Create an organisation unit group set called "Ownership" and select Compulsory.
4. Assign the organisation unit groups "MoH", "Private" and "Faith-based" to the "Ownership"
organisation group set.
Example20.11.Create parallel dynamic administrative organisation unit structure
Configure metadata Assign names to organisation unit levels
218
Group you organisation unit in two ways and aggregate data on these two parallel hierarchies
Use to aggregate data (only in analytics apps)
An additional setting to the organisation unit group set, creates a dynamic "membership" to
a organisation unit group set.
You don't change the organisation unit hierarchy
Scalable and dynamic
Dynamic inclusion of hierarchy
Dynamic additional classification
20.6.6. Assign names to organisation unit levels
When you add children to an organisation unit, DHIS2 automatically creates a new organisation
unit level if necessary. The system also assigns a generic name to this level, for example
"Level 5". You can replace the generic name with a contextual name, for example "Country",
"Province", "District" or "Health Facility". DHIS2 uses the contextual names anywhere levels
are referred to, for example in the GIS app.
1. Open the Maintenance app and click Organisation unit > Organisation unit level.
The loading time of the list depends on the depth of the organisation unit hierarchy tree.
2. For the organisation unit levels you want to modify, type a name.
3. Select the number of offline levels.
Configure metadata Move organisation units within a
hierarchy
219
Note
You configure the default value in the System Settings app:
Open the System Settings app, click General and select a level in the Max offline
organisation unit levels list.
4. Click Save.
20.6.7. Move organisation units within a hierarchy
You can move organisation units within in the hierarchy by changing the parent of a selected
organisation unit.
1. Open the Maintenance app and click Organisation unit > Hierarchy operations.
2. In the left-hand hierarchy tree, select the organisation unit(s) you want to move.
Note
If the selected organisation unit is has sub-organisation units, all of them move to the
new parent organisation unit.
3. In the right-hand hierarchy tree, select which organisation unit you want to move the
selected organisation unit(s) to.
4. Click Move x organisation units, where x stands for the number of organisation units you
have selected.
Your changes are immediately reflected in the left-hand side hierarchy tree.
20.6.8. Close an organisation unit
When you close an organisation unit, you can't register or edit events to this organisation unit
in the Event Capture and Tracker Capture apps.
1. Open the Maintenance app and click Organisation unit > Organisation unit.
2. In the object list, click the options menu and select Edit.
3. Select a Closed date.
4. Click Save.
20.6.9. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
20.6.10. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Configure metadata Delete metadata objects
220
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
20.6.11. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.6.12. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.6.13. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
Configure metadata [Work in progress] Manage validation
rules
221
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.7. [Work in progress] Manage validation rules
20.7.1. About validation rules
A validation rule is based on an expression. The expression defines a relationship between
data element values. The expression forms a condition with certain logical criteria.
The expression consists of:
A left side
A right side
An operator
Example20.12.
A validation rule asserting that the total number of vaccines given to infants is less than or
equal to the total number of infants.
In the Maintenance app, you manage the following validation rule objects:
Table20.11.
Object type What you can do
Validation rule Create, edit, clone, delete, show details, and
translate
Validation rule group Create, edit, clone, delete, share, show
details, and translate
Validation notification Create, edit, clone, delete, show details, and
translate
20.7.1.1. About sliding windows
You can use sliding windows to group data across multiple periods as opposed to selecting
data for a single period. Sliding windows have a size, that is to say, the number of days to
cover, a starting point and an end point. The example below shows disease surveillance data:.
Configure metadata Create or edit a validation rule
222
The data in the orange section, selects data based on the current period. There is a threshold,
which is calculated once for each week or period, and this is shown in the "Result" section.
The data in the blue section is the sliding window. It selects data from the past 7 days. The
"Result" shows the total number of confirmed cases of a disease.
The validation rule makes sure users are notified when the total number of cases breaks the
threshold for the period.
Table20.12.Different behavior of validation rules
With sliding windows Without sliding windows
Used only for event data. Used for event data and aggregate data.
Data selection is based on a fixed number of
days (periodType).
Data selection is always based on a period.
The position of the sliding window is always
relative to the period being compared.
Data is always selected for the same period
as the period being compared.
See also: How to use sliding windows when you're Creating or editing a validation rule.
20.7.1.2. About validation rule groups
A validation rule group allows you to group related validation rules. When you run a validation
rule analysis, you can choose to run all of the validation rules in your system, or just the
validation rules in one group.
20.7.1.3. About validation notifications
You can configure a validation rule analysis to automatically send notifications about validation
errors to selected user groups. These messages are called validation notifications. They are
sent via the internal DHIS2 messaging system.
You can send validation rule notifications as individual messages or as message summaries.
This is useful, for example, if you want to send individual messages for high-priority disease
outbreaks, and summaries for low-priority routine data validation errors.
20.7.2. Create or edit a validation rule
1. Open the Maintenance app and click Validation > Validation rule.
2. Click the add button.
3. Type a Name.
The name must be unique among the validation rules.
4. (Optional) In the Code field, assign a code.
5. (Optional) Type a Description.
6. Select an Importance: High, Medium or Low.
Configure metadata Create or edit a validation rule
223
7. Select a Period type.
8. Select an Operator: Compulsory pair, Equal to, Exclusive pair, Greater than, Greater
than or equal to or Not equal to.
The Compulsory pair operator allows to require that data values must be entered for a
form for both left and right sides of the expression, or for neither side. This means that you
can require that if one field in a form is filled, then one or more other fields must also be filled.
The Exclusive pair allows to assert that if any value exist on the left side then there should
be no values on the right side (or vice versa). This means that data elements which compose
the rule on either side should be mutually exclusive from each other, for a given time period /
organisation unit /attribute option combo.
9. Create the left side of the expression:
a. Click Left side.
b. Select Sliding window if you want to view data relative to the period you are comparing.
See also About validation rules.
c. Select a Missing value strategy. This selection sets how the system evaluates a
validation rule if data is missing.
Option Description
Skip if any value is missing The validation rule will be skipped if any of
the values which compose the expression
are missing. This is the default option.
Always select this option you use the
Exclusive pair or Compulsory pair
operator.
Skip if all values are missing The validation rule will be skipped only if
all of the operands which compose it are
missing.
Never skip The validation rule will never be skipped
in case of missing data, and all missing
operands will be treated effectively as a
zero.
d. Type a Description.
e. Build an expression based on the available data elements, program objects, organisation
units, counts and constants.
In the right pane, double-click the data objects you want to include in the expression.
Combine with the mathematical operators located below the left pane.
f. Click Save.
10.Create the right side of the expression:
a. Click Right side.
b. Select a Missing value strategy. This selection sets how the system evaluates a
validation rule if data is missing.
Option Description
Skip if any value is missing The validation rule will be skipped if any of
the values which compose the expression
are missing. This is the default option.
Always select this option you use the
Exclusive pair or Compulsory pair
operator.
Configure metadata Create or edit a validation rule group
224
Option Description
Skip if all values are missing The validation rule will be skipped only if
all of the operands which compose it are
missing.
Never skip The validation rule will never be skipped
in case of missing data, and all missing
operands will be treated effectively as a
zero.
c. Select Sliding window if you want to view data relative to the period you are comparing.
See also About validation rules.
d. Type a Description.
e. Build an expression based on the available data elements, program objects, organisation
units, counts and constants.
In the right pane, double-click the data objects you want to include in the expression.
Combine with the mathematical operators located below the left pane.
f. Click Save.
11.(Optional) Choose which Organisation unit levels this rule should be evaluated for.
Leaving this empty will cause the validation rule to be evaluated at all levels.
12.(Optional) Click Skip this rule during form validation to avoid triggering this rule while
doing data entry
13.Click Save.
20.7.3. Create or edit a validation rule group
1. Open the Maintenance app and click Validation > Validation rule group.
2. Click the add button.
3. Type a Name.
4. (Optional) In the Code field, assign a code.
5. (Optional) Type a Description.
6. Double-click the Validation rules you want to assign to the group.
7. Click Save.
20.7.4. Create or edit a validation notification
1. Open the Maintenance app and click Validation > Validation notification.
2. Click the add button.
3. Type a Name.
4. (Optional) In the Code field, assign a code.
5. Select Validation rules.
6. Select Recipient user groups.
7. (Optional) Select Notify users in hierarchy only.
If you select this option, the system will filter the recipient users. (The system derives the
recipient users from the recipient user groups.) The filter is based on which organisation unit
the recipient user belongs to. The users linked to organisation units which are ancestors of
Configure metadata Clone metadata objects
225
the organisation unit where the violation took place will receive validation notifications. The
system will ignore other users and these users won't receive validation notifications.
8. Create the message template:
a. Create the Subject template.
Double-click the parameters in the Template variables field to add them to your subject.
b. Create the Message template.
Double-click the parameter names in the Template variables field to add them to your
message.
9. Click Save.
20.7.5. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
20.7.6. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
Configure metadata Delete metadata objects
226
20.7.7. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.7.8. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.7.9. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.8. Manage attributes
20.8.1. About attributes
You can use metadata attributes to add additional information to metadata objects. In addition
to the standard attributes for each of these objects it may be useful to store information for
additional attributes, for example the collection method for a data element.
Configure metadata Create or edit an attribute
227
In the Maintenance app, you manage the following attribute objects:
Table20.13.Attribute objects in the Maintenance app
Object type Available functions
Attribute Create, edit, clone, delete, show details and
translate
20.8.2. Create or edit an attribute
1. Open the Maintenance app and click Attribute.
2. Click the add button.
3. In the Name field, type the name of the attribute.
Each attribute must have a unique name
4. (Optional) In the Code field, assign a code.
5. Select a Value type.
If the value supplied for the attribute does not match the value type you will get a warning.
6. Select an Option set .
7. Select the options you want, for example:
Select Mandatory if you want an object to always have the dynamic attribute.
Select Unique if you want the system to enforce that values are unique for a specific
object type.
8. Click Save.
The dynamic attribute is now available for the objects you assigned it to.
20.8.3. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
Configure metadata Delete metadata objects
228
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
20.8.4. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.8.5. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.8.6. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
Configure metadata Manage constants
229
20.9. Manage constants
20.9.1. About constants
Constants are static values which can be made available to users for use in data elements and
indicators. Some indicators, such as "Couple year protection rate" depend on constants which
usually do not change over time.
In the Maintenance app, you manage the following constant objects:
Table20.14.Constant objects in the Maintenance app
Object type Available functions
Constant Create, edit, clone, share, delete, show
details and translate
20.9.2. Create or edit a constant
1. Open the Maintenance app and click Other > Constant.
2. Click the add button.
3. In the Name field, type the name of the constant.
4. (Optional) In the Short name field, type an abbreviated name of the constant.
5. (Optional) In the Code field, assign a code.
6. In the Description field, type a brief, informative description of the constant.
7. In the Value field, define the constant's value.
8. Click Save.
The constant is now available for use.
20.9.3. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
Configure metadata Change sharing settings for metadata
objects
230
4. Click Save.
20.9.4. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
20.9.5. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.9.6. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
Configure metadata Translate metadata objects
231
2. In the object list, click the options menu and select Show details.
20.9.7. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.10. Manage option sets
20.10.1. About option sets
Option sets provide a pre-defined drop-down (enumerated) list for use in DHIS2. You can define
any kind of options.
Example20.13.
An option set called "Delivery type" would have the options: "Normal", "Breach", "Caesarian"
and "Assisted".
Configure metadata Create or edit an option set
232
Table20.15.Option set objects in the Maintenance app
Object type Available functions
Option set Create, edit, clone, share, delete, show
details and translate
20.10.2. Create or edit an option set
Important
Option sets must have a code as well as a name. You can change the names but you can't
change the codes. Both names and codes of all options must be unique, even across
different option sets.
1. Open the Maintenance app and click Other > Option set.
2. Click the add button.
3. In the Primary details tab, define the option set:
a. In the Name field, type the name of the constant.
b. In the Code field, assign a code.
c. Select a Value type.
d. Click Save.
4. For each option you need, perform the following tasks:
a. Click the Options tab.
b. Click the add button.
c. Type a Name and a Code.
d. Sort the options by name, code/value or manually.
e. Click Save.
20.10.3. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
20.10.4. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
Configure metadata Delete metadata objects
233
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
20.10.5. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.10.6. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.10.7. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Configure metadata Manage legends
234
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.11. Manage legends
20.11.1. About legends
You can create, edit, clone, delete, show details and translate legends to make the maps you're
setting up for your users meaningful. You create maps in the GIS app.
Note
Continuous legends must consist of legend items that end and start with the same value,
for example: 0-50 and 50-80. Do not set legend items like this: 0-50 and 51-80. This will
create gaps in your legend.
20.11.2. Create or edit a legend
Note
It is not allowed to have gaps in a legend.
It is not allowed to have overlapping legend items.
1. Open the Maintenance app and click Other > Legend.
2. Click the add button.
3. In the Name field, type the legend name.
4. (Optional) In the Code field, assign a code.
5. Create the legend items you want to have in your legend:
a. Select Start value and End value.
b. Select Number of legend items.
c. Select a color scheme.
d. Click Create legend items.
Tip
Click the options menu to edit or delete a legend item.
6. (Optional) Add more legend items:
a. Click the add button.
b. Enter a name and select a start value, an end value and a color.
c. Click OK.
7. (Optional) Change the color scales.
a. Click the colour scale to view a list of color scale options, and select a color scale.
Configure metadata Clone metadata objects
235
b. To customize a color scale, click the add button. In the Edit legend item dialog, click the
color scale button and handpick colors, or enter your color values.
8. Click Save.
Example20.14.Vaccination coverage legends
Table20.16.
Legend item Start value End value
Low bad 0 50
Medium 50 80
High good 80 100
Too high 100 1000
20.11.3. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
20.11.4. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
Configure metadata Delete metadata objects
236
20.11.5. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.11.6. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.11.7. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.11.8. Assign a legend to indicator or data element
You can assign a legend to an indicator or a data element in the Maintenance app, either
when you create the object or edit it. When you then select the indicator or data element in
the GIS app, the system automatically selects the assigned legend.
20.11.9. See also
Using the GIS app
Configure metadata Manage predictors
237
20.12. Manage predictors
20.12.1. About predictors
A predictor tells DHIS2 how to generate a data value based on data values from past periods
and/or the period of the data value. It defines which past periods to sample, and how to combine
the data to produce a predicted value. A predictor always generates an aggregate data value,
but the past data values used to calculate the predicted value may come from aggregate data,
event data, or both.
A simple use of predictors would be to copy a past period data value into a new period, for
example into the next month, or into the same quarter in the next year. A more complex use
of predictors would be for disease surveillance, to predict what value would be expected in a
given week or month of the year, based on previous data values. A validation rule could then
be used to see how the actual value compares with the expected (predicted) value.
You can specify the organisation unit level(s) for which a predictor will generate values. For
example in disease surveillance you can use one predictor to give the expected value at each
local facility, given the amount of variation you would expect at a single facility, while using
a different predictor to estimate the value you would expect summed over all facilities in
a district, given the (smaller) proportional variation that you would expect when adding up
the values for all facilities in the district. You could also define additional predictors at any
higher levels of the organisation unit hierarchy, where you might expect different proportions
of variation. Alternatively, you can define a single predictor for all these levels and use the
standard deviation function to determine what amounts of deviation were measured at each
level.
In the Maintenance app, you manage the following predictor objects:
Table20.17.Predictor objects in the Maintenance app
Object type Available functions
Predictor Create, edit, clone, delete, show details and
translate
20.12.2. Sampling past periods
Predictors can generate data values for periods that are in the past, present, or future. These
values are based on data sampled from periods before the predicted period, and/or data
from the predicted period. When you use data sampled from past periods (periods before the
predicted period), several parameters determine the choice of which past periods to sample
from:
20.12.2.1. Sequential sample count
A predictor's Sequential sample count gives the number of immediate prior periods to sample.
For example, if a predictor's period type is Weekly and the Sequential sample count is 4, this
means to sample four prior weeks immediately preceding the predicted value week. So the
predicted value for week 9 would use samples from weeks 5, 6, 7, and 8:
If a predictor's period type is Monthly and the Sequential sample count is 4, this means to
sample four prior months immediately preceding the predicted value month. So the predicted
value for May would use samples from weeks January, February, March, and April:
Configure metadata Sampling past periods
238
The Sequential sample count can be greater than the number of periods in a year. For example,
if you want to sample the 24 months immediately preceding the predicted value month, set
the Sequential sample count to 24:
20.12.2.2. Sequential skip count
A predictor's Sequential skip count tells how many periods should be skipped immediately
prior to the predicted value period, within the Sequential sample count. This could be used,
for instance, in outbreak detection to skip one or more immediately prededing samples that
might in fact contain values from the beginning of an outbreak that you are trying to detect.
For example, if the Sequential sample count is 4, but the Sequential skip count is 2, then the
two samples immediately preceding the predicted period will be skipped, resulting in only two
periods being sampled:
20.12.2.3. Annual sample count
A predictor's Annual sample count gives the number of prior years for which samples should
be collected at the same time of year. This could be used, for instance, for disease surveillance
in cases where the expected incidence of the disease varies during the year and can best be
compared with the same relative period in previous years. For example, if the Annual sample
count is 2 (and the Sequential sample count is zero), then samples would be collected from
periods in the immediately preceding two years, at the same time of year.
20.12.2.4. Sequential and annual sample counts together
You can use the sequential and annual sample counts together to collect samples from a
number of sequential periods over a number of past years. When you do this, samples will
be collected in prior years during the period at the same time of year as the predicted value
period, and also in previous years both before and after the same time of year, as determined
by the Sequential sample count number.
Configure metadata Sampling past periods
239
For example, if the Sequential sample count is 4 and the Annual sample count is 2, samples will
be collected from the 4 periods immediately preceding the predicted value period. In addition
samples will be collected in the prior 2 years for the corresponding period, as well as 4 periods
on either side:
20.12.2.5. Sequential, annual, and skip sample counts together
You can use the Sequential skip count together with the sequential and annual sample counts.
When you do this, the Sequential skip count tells how many periods to skip in the same year as
the predicted value period. For example, if the Sequential sample count is 4 and the Sequential
skip count is 2, then the two preiods immediatly preceding the predicted value period period
will be skipped, but the two periods before that will be sampled:
If the Sequential skip count is equal to or greater than the Sequential sample count, then no
samples will be collected for the year containing the predicted value period; only periods from
past years will be sampled:
20.12.2.6. Sample skip test
You can use the Sample skip test to skip samples from certain periods that would otherwise
be included, based on the results of testing an expression within those periods. This could be
used, for instance, in disease outbreak detection, where the sample skip test could identify
previous disease outbreaks, to exclude those samples from the prediction of a non-outbreak
baseline expected value.
The Sample skip test is an expression that should return a value of true or false, to indicate
whether or not the period should be skipped. It can be an expression that tests any values in
the preiovus period. For example, it could test for a data value that was explicitly entered to
indicate that a previous period should be skipped. Or it could compare a previously predicted
value for a period with the actual value recorded for that period, to determine if that period
should be skipped.
Configure metadata Create or edit a predictor
240
Any periods for which the Sample skip test is true will not be sampled. For example:
20.12.3. Create or edit a predictor
1. Open the Maintenance app and click Other > Predictor.
2. Click the add button.
3. In the Name field, type the predictor name.
4. (Optional) In the Code field, assign a code.
5. (Optional) Type a Description.
6. Select an Output data element. Any value generated by this predictor is stored as a value
of this data element. The value is rounded according to the value type of the data element:
If the value type is an integer type, the predicted value is rounded to the nearest integer.
For all other value types, the number is rounded to four significant digits. (However if there
are more than four digits to the left of the decimal place, they are not replaced with zeros.)
7. Select a Period type.
8. Assign one or more organisation unit levels. The ouput value will be assigned to an
organisation unit at this level (or these levels). The input values will come from the
organisaiton unit to which the output is assigned, or from any level lower under the output
organisation unit.
9. Create a Generator. The generator is the expression that is used to calculate the predicted
value.
a. Type a Description of the generator expression.
b. Enter the generator expression. You can build the expression by selecting data elements
for aggregate data, or program data elements, attributes or indicators. Organisation unit
counts are not yet supported.
To use sampled, past period data, you should enclose any items you select in one of the
following aggregate functions:
Aggregate function Means
AVG Average (mean) value
COUNT Count of the data values
MAX Maximum value
MEDIAN Median value
MIN Minimum value
STDDEV Standard deviation
SUM Sum of the values
Any items inside an aggregate function will be evaluated for all sampled past periods,
and then combined according to the formula inside the aggregate function. Any items
Configure metadata Create or edit a predictor
241
outside an aggregate function will be evaluated for the period in which the prediction is
being made.
You can build more complex expressions by clicking on (or typing) any of the elements
below the expression field: ( ) * / + - Days. Constant numbers may be added by typing
them. The Days option inserts [days] into the expression which resolves to the number of
days in the period from which the data came.
You can also use the following functions in your expression, either inside or containing
aggregate functions, or independent of them:
Function Means
IF(test, valueIfTrue, valueIfFalse) Evaluates test which is an expression
that evaluates to a boolean value -- see
Boolean expression notes below. If
the test is true, returns the valueIfTrue
expression. If it is false, returns the
valueIfFalse expression.
ISNULL(item) Returns the boolean value true if the item
is null (missing), otherwise returns false.
The item can be any selected item from
the right (data element, program data
element, etc.).
Boolean expression notes: A boolean expression must evaluate to true or false. The
following operators may be used to compare two values resulting in a boolean expression:
<, >, !=, ==, >=, and <=. The following operators may be used to combine two boolean
expressions: && (logical and), and || (logical or). The unary operator ! may be used to
negate a boolean expression.
Generator expression examples:
Generator expression Means
SUM(#{FTRrcoaog83.tMwM3ZBd7BN}) Sum of the sampled values of data
element FTRrcoaog83 and category
option combination (disaggregation)
tMwM3ZBd7BN
AVG(#{FTRrcoaog83}) + 2 *
STDDEV(#{FTRrcoaog83})
Average of the sampled values of of
data element FTRrcoaog83 (sum of all
disaggregations) plus twice its standard
deviation
SUM(#{FTRrcoaog83}) / SUM([days]) Sum of all sampled values of data element
FTRrcoaog83 (sum of all disaggregations)
divided by the number of days in all
sample periods (resulting in the overall
average daily value)
SUM(#{FTRrcoaog83}) +
#{T7OyqQpUpNd}
Sum of all sampled values of data
element FTRrcoaog83 plus the value of
data element T7OyqQpUpNd in the period
being predicted for
1.2 * #{T7OyqQpUpNd} 1.2 times the value of data element
T7OyqQpUpNd in the period being
predicted for
Configure metadata Clone metadata objects
242
Generator expression Means
IF(ISNULL(#{T7OyqQpUpNd}), 10, 20) If the data element T7OyqQpUpNd is null,
then 10, otherwise 20.
10.(Optional) Create a Sample skip test. The sample skip test tells which previous periods if
any to exclude from the sample.
a. Type a Description of the skip test.
b. Enter the sample skip test expression. You can build the expression by selecting
data elements for aggregate data, or program data elements, attributes or indicators.
Organisation unit counts are not yet supported. As with the generator function, you may
click on (or type) any of the elements below the expression field: ( ) * / + - Days. The
functions IF() and ISNULL() as described above may also be used.
The expression must evaluate to a boolean value of true or false. See Boolean
expression notes above.
Skip test expression examples:
Skip test expression Means
#{FTRrcoaog83} > #{M62VHgYT2n0} The value of data element FTRrcoaog83
(sum of all disaggregations) is
greater than the value of data
element M62VHgYT2n0 (sum of all
disaggregations)
#{uF1DLnZNlWe} > 0 The value of data element uF1DLnZNlWe
(sum of all disaggregations) is greater
than the zero
#{FTRrcoaog83} > #{M62VHgYT2n0} ||
#{uF1DLnZNlWe} > 0
The value of data element FTRrcoaog83
(sum of all disaggregations) is
greater than the value of data
element M62VHgYT2n0 (sum of all
disaggregations) or the value of data
element uF1DLnZNlWe (sum of all
disaggregations) is greater than the zero
11.Enter a Sequential sample count value.
This is for how many sequential periods the calculation should go back in time to sample
data for the calculations.
12.Enter an Annual sample count value.
This is for how many years the calculation should go back in time to sample data for the
calculations.
13.(Optional) Enter a Sequential skip count value.
This is how many sequential periods, immediately preceding the predicted value period,
should be skipped before sampling the data.
14.Click Save.
20.12.4. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
Configure metadata Delete metadata objects
243
4. Click Save.
20.12.5. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.12.6. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.12.7. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.13. Manage push reports
20.13.1. About push reports
Push reports allows you to increase awareness and usage of data analysis by sending reports
with charts, tables and maps directly to users e-mail addresses.
Configure metadata About push reports
244
A push report gets its content from existing dashboards.
A push report lists the dashboard items in the same order as on the dashboard.
A push report can only contain dashboard items with charts, maps or tables.
You create the push report and its schedule in the Maintenance app.
The Title and Message parameters you set up in the Maintenance app, are included in
each report. The Name you give the report is not included in the report. Instead, the name
is used to identify the push analysis object in the system. This way a report can be named
one thing, and the title of the report can be another.
When you run a push report job, the system compiles a list of recipients from the user groups
you've selected. The system then generates a report for each member of the selected user
groups. Each of the dashboard items are generated specifically for each user. This means
that the data included in the report reflects the data the user has access to. All users could
therefore get the same report (if all the data is "static") or custom reports (if all the data is
"dynamic"), or a combination of the two.
Push reports are sent by e-mail to the recipients, not through the internal DHIS2 messaging
system. If a user doesn't have a valid e-mail, or if the job fails, no e-mails are sent. In this
case, the problem is logged on the server.
Note
The data generated in the push reports is public so verify that you don't include any
sensitive data.
Configure metadata Create or edit a push report
245
Example20.15.Push report
In the Maintenance app, you manage the following push reports objects:
Table20.18.Push reports objects in the Maintenance app
Object type Available functions
Push analysis Create, edit, clone, delete, show details,
translate, preview and run
20.13.2. Create or edit a push report
1. Open the Maintenance app and click Other > Push analysis.
2. Click the add button.
Configure metadata Preview push reports
246
3. In the Name field, type the name of the scheduled report.
This name is not included in the report e-mail. Instead, the name is used to identify the push
analysis object in the system.
4. (Optional) In the Code field, assign a code.
5. Add a report Title.
This title is included in the report e-mail.
6. (Optional) Add a Message.
This message is included in the report e-mail.
7. Select a Dashboard to base the report on.
8. Select and assign the user groups you want to send the report to.
9. Select a Scheduling frequency: Daily, Weekly or Monthly.
Note
If you schedule a push report to "Monthly" and "31", the scheduled report job will not
run if the month has less than 31 days.
10.(Optional) Select Enable to activate the push report job.
The job won't run until you activate it.
11.Click Save.
20.13.3. Preview push reports
1. Open the Maintenance app and click Other > Push analysis.
2. In the push report list, locate the push report you want to preview.
3. Click the options menu and select Preview.
A preview of the push report opens in a new window.
20.13.4. Run push report jobs
1. Open the Maintenance app and click Other > Push analysis.
2. In the push report list, locate the push report you want to run.
3. Click the options menu and select Run now.
The push report job runs immediately.
20.13.5. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
20.13.6. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Configure metadata Display details of metadata objects
247
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.13.7. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.13.8. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
20.14. Manage external map layers
20.14.1. About external map layers
You can customize GIS by including map layers from various sources and combine them with
your own data in DHIS2. DHIS2 supports common map service formats such as Web Map
Service (WMS), Tile Map Service (TMS) and XYZ tiles.
20.14.2. Create or edit an external map layer
Note
DHIS 2 only supports the Web Mercator projection (EPSG:3857) so make sure that the
external service supports this projection.
Configure metadata Create or edit an external map layer
248
Table20.19.External map layer objects in the Maintenance app
Object type Available functions
External map layer Create, edit, clone, delete, show details and
translate
1. Open the Maintenance app and click Other > External map layer.
2. Click the add button.
3. In the Name field, type a name that describes the content of the external map layer.
This is the name you'll see in the GIS app.
4. (Optional) In the Code field, assign a code.
5. Select a Map service format.
DHIS2 supports three common map service formats:
Web Map Service (WMS)
Image format: PNG format allows layers to be transparent, JPG format offers better
compression and is often faster to load.
Layers: A WMS can contain several individual layers, and you can specify which you want
to include (comma separated). Refer to the WMS GetCapabilities document to see the
available layers.
Tile Map Service (TMS)
XYZ tiles (can also be used for WMTS)
6. Enter the URL to the map service.
Note
XYZ and TMS URLs must contain placeholders {}, for example: http://{s}.tile.osm.org/
{z}/{x}/{y}.png.
7. (Optional) Enter Source of the map layers. The field can contain HTML tags if you want to
link to the source.
When you use an external map service it is important to highlight where the data comes
from.
8. Select a Placement:
Bottom - basemap: For the GIS app, this places the external map layer above other DHIS2
base maps but below the thematic map layers. For the Maps app, this makes the external
map layer selectable as the base map (i.e. as an alternative to the DHIS2 base maps).
Top - overlay: For the GIS app, this places the external map layer above the thematic map
layers but below facility and event data layers. For the Maps app, this allows the external
map to be added from the Add Layer selection and placed anywhere above the base map.
9. (Optional) Add a legend.
You can add a legend in two ways:
Select a predefined Legend to describe the colors of the map layer.
Tip
Click Add new to create legends that you're missing. In the form that opens, create
the legends you need. When you're done, click Refresh values.
Enter a link to an external image legend in Legend image URL.
These are often provided for WMS. See under LegendURL in the WMS GetCapabilites
document.
Configure metadata Clone metadata objects
249
10.Click Save.
20.14.3. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
20.14.4. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
20.14.5. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
20.14.6. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
Configure metadata Edit multiple object groups at once
250
5. Click Save.
20.15. Edit multiple object groups at once
The Metadata group editor in the Maintenance app allows you to edit multiple object
groups at the same time. You can edit the following objects types:
Table20.20.Object types in the Metadata group editor
Object type Available functions
Category option
Category option group
Data element Add one data element to multiple data
element groups
Remove one data element from multiple
data element groups
Data element group Add multiple data elements to one data
element group
Remove multiple data elements from one
data element group
Indicator Add one indicator to multiple indicator
groups
Remove one indicator from multiple indicator
groups
Indicator group Add multiple indicators to one indicator
group
Remove multiple indicators from one
indicator group
20.15.1. Edit multiple objects in an object group
1. Open the Maintenance app and click Metadata group editor.
2. Click Manage items in group.
3. Select an object group type, for example Indicator groups.
4. Select an object group, for example HIV.
5. In the left-hand list, select the object(s) you want to add to the object group and click the
right arrow.
6. In the right-hand list, select the object(s) you want to remove from the object group and
click the left arrow.
20.15.2. Edit an object in multiple object groups
1. Open the Maintenance app and click Metadata group editor.
2. Click Manage groups for item.
3. Select an object type, for example Indicators.
4. Select an object, for example ANC LLITN coverage.
5. In the left-hand list, select the objects group(s) you want to add the object to and click the
right arrow.
Configure metadata Edit an object in multiple object groups
251
6. In the right-hand list, select the object group(s) you want to remove the object from and
click the left arrow,
Configure programs in the Maintenance
app
About programs
253
Chapter 21. Configure programs in the
Maintenance app
21.1. About programs
Traditionally, public health information systems have been reporting aggregated data of
service provision across its health programs. This does not allow you to trace the people
provided with these services. In DHIS2, you can define your own programs with stages. These
programs are a essential part of the "tracker" functionality which lets you track individual
records. You can also track other ‘entities’ such as wells or insurances. You can create two
types of programs:
Table21.1.Program types
Program type Description Examples of use
Event program Single event without
registration program
(anonymous program or
SEWoR)
Anonymous, individual
events are tracked
through the health system.
No person or entity is
attached to these individual
transactions.
Has only one program
stage.
To record health cases
without registering any
information into the system.
To record survey data or
surveillance line-listing.
Tracker program Single event with
registration program
(SEWR)
An entity (person,
commodity, etc.) is tracked
through each individual
transaction with the health
system
Has only one program
stage.
A tracked entity instance
(TEI) can only enroll in the
program once.
To record birth certificate
and death certificate.
Multi events with
registration program
(MEWR)
An entity (person,
commodity, etc.) is tracked
through each individual
transaction with the health
system
Mother Health Program with
stages as ANC Visit (2-4+),
Delivery, PNC Visit.
Configure programs in the Maintenance
app
About programs
254
Program type Description Examples of use
Has multiple program
stages.
To create a program, you must first configure several types of metadata objects. You create
these metadata objects in the Maintenance app or the Program / Attributes (legacy) app.
Table21.2.Program metadata objects in the Maintenance app
Object type Description Available functions
Event program A program to record single
event without registration
Create, edit, share, delete,
show details and translate
Program indicator An expression based
on data elements and
attributes of tracked entities
which you use to calculate
values based on a formula.
Create, edit, share, delete,
show details and translate
Program rule Allows you to create and
control dynamic behavior
of the user interface in
the Tracker Capture and
Event Capture apps.
Create, edit, delete, show
details and translate
Program rule variable Variables you use to create
program rule expressions.
Create, edit, delete, show
details and translate
Relationship type Defines the relationship
between tracked entity A
and tracked entity B, for
example mother and child.
Create, edit, clone, delete,
show details and translate
Tracked entity Types of entities which
can be tracked through
the system. Can be
anything from persons to
commodities, for example a
medicine or a person.
A program must have one
tracked entity. To enrol
a tracked entity instance
into a program, the tracked
entity of an entity and
tracked entity of a program
must be the same.
Note
A program must be
specified with only
one tracked entity.
Only tracked entity as
same as the tracked
entity of program
can enroll into that
program.
Create, edit, clone, delete,
show details and translate
Configure programs in the Maintenance
app
Configure event programs in the
Maintenance app
255
Object type Description Available functions
Tracked entity attribute Used to register extra
information for a tracked
entity.
Can be shared between
programs.
Create, edit, clone, share,
delete, show details and
translate
Table21.3.Program metadata objects in the Program / Attributes app
Object type Description Available functions
Program A program consist of
program stages.
Create, edit, share, delete,
assign to organisation units,
show details and translate
Program stage A program stage defines
which actions should be
taken at each stage.
Create, edit, change sort
order, delete, show details
and translate
Program stage section N/A Create, edit, change sort
order, delete, show details
and translate
Program indicator group A group of program
indicators
Create, edit, delete, show
details and translate
Validation rule A validation rule is based on
an expression which defines
a relationship between data
element values.
Create, edit and delete
Program notification Automated message
reminder
Set reminders to be
automatically sent to
enrolled tracked entity
instances before scheduled
appointments and after
missed visits.
Create, edit and delete
Program stage notification - Create, edit and delete
Design custom registration
form
- -
21.2. Configure event programs in the Maintenance app
21.2.1. About event programs
Single event without registration programs are called event programs. You configure them in
the Maintenance app. Event programs can have three types of data entry forms:
Table21.4.Types of data entry forms for event programs
Form type Description
Basic Lists all data elements which belong to the
program. You can change the order of the
data elements.
Configure programs in the Maintenance
app
Workflow: Create an event program
256
Form type Description
Section A section groups data elements. You can
then arrange the order of the sections to
create the desired layout of the data entry
form.
Custom Defines the data entry form as HTML page.
Note
Custom forms takes precedence over section forms if both are present.
If no custom or section form are defined, the basic form will be used.
The Android apps only supports section forms.
You can create program notifications for event programs. The notifications are sent either via
the internal DHIS2 messaging system, via e-mail or via text messages (SMS). You can use
program notifications to, for example, send an automatic reminder to a tracked entity 10 days
before a scheduled appointment. You use the program’s tracked entity attributes (for example
first name) and program parameters (for example enrollment date) to create a notification
template. In the Parameters field, you'll find a list of available tracked entity attributes and
program parameters.
21.2.2. Workflow: Create an event program
1. Enter the event program details.
2. Assign data elements.
3. Create data entry form(s): Basic, Section or Custom.
4. Assign the program to organisation unit(s).
5. Create program notification(s).
21.2.3. Create or edit an event program
21.2.3.1. Enter event program details
1. Open the Maintenance app and click Program > Program.
2. Click the add button.
3. Enter program details, then click next.
Field Description
Name The name of the program.
Short name A short name of the program. The short
name is used as the default chart or table
title in the analytics apps.
Description A detailed description of the program.
Version The version of the program. This is used
for example when people collect data
offline in an Android implementation.
When they go online and synchronize
their metadata, they should get the latest
version of the program.
Category combination The category combination you want to
use. The default setting is None.
Data approval workflow The data approval workflow you want to
use. The default setting is No value.
Configure programs in the Maintenance
app
Create or edit an event program
257
Field Description
Completed events expiry date Defines the number of days for which you
can edit a completed event. This means
that when an event is completed and
the specified number of expiry days has
passed, the event is locked.
Example21.1.
If you set "Completed events expiry days"
to 10", an event is locked ten days after
the completion date. After this date you
can no longer edit the event.
Expiry period type
Expiry days
The expiry days defines for how many
days after the end of the previous period,
an event can be edited. The period type
is defined by the expiry period type. This
means that when the specified number of
expiry days has passed since the end date
of the previous period, the events from
that period are locked.
Example21.2.
If you set the expiry type to "Monthly" and
the expiry days to "10" and the month
is October, then you can't add or edit
an event to October after the 10th of
November.
4. Click next.
21.2.3.2. Assign data elements
1. Click Assign data elements.
2. In the list of available items, double-click the data elements you want to assign to the event
program.
3. (Optional) For each data element, add additional settings:
Setting Description
Compulsory The value of this data element must be
filled into data entry form before you can
comple the event.
Allow provided elsewhere Specify if the value of this data element
comes from other facility, not in the
facility where this data is entered.
Display in reports Displays the value of this data element
into the single event without registration
data entry function.
Date in future Will allow user to select a date in future for
date data elements.
Render option as radio Displays a radio button in the data entry
form. It's only possible to use for option
sets.
4. Click next.
Configure programs in the Maintenance
app
Create or edit an event program
258
21.2.3.3. Create data entry forms
The data entry forms decide how the data elements will be displayed to the user in the Event
Capture app.
1. Click Create data entry form.
2. Click Basic, Section or Custom.
3. To create a Basic data entry form: Drag and drop the data elements in the order you want.
4. To create a Section data entry form:
a. Click the add button and enter a section name.
b. Click the section so it's highlighted by a black line.
c. Add data elements by clicking the plus sign next to the data elements' names.
d. Repeat above steps until you've all the sections you need.
e. Change the section order: click the options menu, then drag the section to the place you
want.
5. To create a Custom data entry from: Use the WYSIWYG editor to create a completely
customized form. If you select Source, you can paste HTML code directly in the editing area.
You can also insert images for example flags or logos.
6. Click next.
21.2.3.4. Assign organisation units
1. Click Assign organisation units.
2. In the organisation tree, double-click the organisation units you want to add to the program
to.
You can locate an organisation unit in the tree by expanding the branches (click on the arrow
symbol), or by searching for it by name. The selected organisation units display in orange.
3. Click next.
21.2.3.5. Create program notifications
1. Create the message you want to send:
a. Click What to send?.
b. Enter a Name.
c. Create the Subject template: Double-click the parameters in the Template variables
field to add them to your subject.
Note
The subject is not included in text messages.
d. Create the Message template: Double-click the parameter names in the Template
variables list to add them to your message.
Example21.3.
Dear A{w75KJ2mc4zz}, You're now enrolled in V{program_name}.
2. Define when you want to send the message:
a. Click When to send it?.
b. Select a Notification trigger.
Notification trigger Description
Program stage completion The program stage notification is sent
when the program stage is completed
Configure programs in the Maintenance
app
Reference information: Program
notification parameters
259
Notification trigger Description
Days scheduled (due date) The program stage notification is sent XX
number of days before or after the due
date
You need to enter the number of days
before or after the scheduled date that
the notification will be send.
3. Define who you want to send the message to:
a. Click Who to send it to?.
b. Select a Notification recipient.
Notification recipient Description
Tracked entity instance Receives program notifications via e-mail
or text message.
To receive a program notification, the
recipient must have an e-mail address or
a phone number attribute.
Organisation unit contact Receives program notifications via e-mail
or text message.
To receive a program notification, the
receiving organisation unit must have
a registered contact person with e-mail
address and phone number.
Users at organisation unit All users registered to the selected
organisation unit receive program
notifications via the internal DHIS2
messaging system.
User group All members of the selected user group
receive the program notifications via the
internal DHIS2 messaging system
Program TBA
c. Click Save.
4. Repeat above steps to create all the program notifications you need.
5. Click Save.
Note
You configure when the program notifications are sent in the Data Administration app
> Scheduling > Program notifications scheduler.
Click Run now to send the program notifications immediately.
Select a time and click Start to schedule the program notifications to be send at a
specific time.
21.2.4. Reference information: Program notification parameters
Table21.5.Program notification parameters to use in program notifications
Notification type Variable name Variable code
Program Current date V{current_date}
Configure programs in the Maintenance
app
Configure tracker programs in the
Maintenance app
260
Notification type Variable name Variable code
Days since enrollment date V{days_since_enrollment_date}
Enrollment date V{enrollment_date}
Incident date V{incident_date}
Organisation unit name V{org_unit_name}
Program name V{program_name}
Program stage Current date V{current_date}
Days since due date V{days_since_due_date}
Days until due date V{days_until_due_date}
Due date V{due_date}
Organisation unit name V{org_unit_name}
Program name V{program_name}
Program stage name V{program_stage_name}
21.3. Configure tracker programs in the Maintenance app
Note
From release 2.27, you create event programs (programs without registration) in the
Maintenance app. You still create tracker programs (programs with registration) in the
Program / Attributes app.
21.4. Configure program indicators
21.4.1. About program indicators
Program indicators are expressions based on data elements and attributes of tracked entities
which can be used to calculate values based on a formula. Program indicators consist of an
aggregation type, an analytics type, an expression and a filter.
Program indicators are evaluated based on the assigned aggregation type, expression and
filter. The order of evaluation is:
1. The filter will filter the events which become part of the evaluation/aggregation routine.
2. The expression will be evaluated per event.
3. All evaluated expression values will be aggregated according to the aggregation type of the
program indicator.
Table21.6.Program indicator components
Program rule component Description
Aggregation type The aggregation type determines how the
program indicator will be aggregated. The
following aggregation types are available:
• Average
Average (number)
Average (number, disaggregation)
Configure programs in the Maintenance
app
About program indicators
261
Program rule component Description
Average (sum in organisation unit
hierarchy)
Average (sum of numbers)
Average (sum of numbers,
disaggregation)
Average (Yes/No)
• Count
• Custom
The "custom" aggregation type allows
you to specify the aggregation type
in-line in the expression. All other
aggregation types are applied to the
entire expression.
Using the "custom" aggregation type
might lead to an exception of the order
of evaluation described above where
individual parts of the expression can be
evaluated and aggregated, as opposed
to the entire expression being evaluated
prior to aggregation.
• Default
• Max
• Min
• None
Standard deviation
• Sum
• Variance
Analytics type The available analytics types are event and
enrollment.
The analytics type defines whether the
program indicator is calculated based on
events or program enrollments. This has an
impact on what type of calculations can be
made.
Events implies a data source where each
event exists as an independent row. This
is suitable for performing aggregations
such as counts and sums.
Enrollments implies a data source where
all events for a single enrollment is
combined on the same row. This allows
for calculations which can compare event
data from various program stages within
a program enrollment.
Analytics period boundaries Defines the boundaries for the program
indicator calculation. The boundaries
determine which events or enrollments gets
included in aggregations, always relative
Configure programs in the Maintenance
app
About program indicators
262
Program rule component Description
to the aggregate reporting period start and
end. When creating the program indicator,
the default boundaries will get preselected
based on analytics type.
For analytics type event, the default
boundaries will be configured to
encapsulate any events with an event
date after the reporting period starts and
before the reporting period ends.
For analytics type enrollment, the
default boundaries will encapsulate all
enrollments with an enrollment date after
the reporting date starts and before the
reporting period ends. In addition, the
default enrollment program indicator
evaluates the newest event for all
program stages regardless of date.
It is possible to change the upper and
lower boundaries to include a longer or
shorter period relative to the reporting
period, or delete one of the boundaries -
in effect returing all data before or after
a certiain period. It is also possible to add
more constraints, for example to make an
enrollment program indicator only include
event data up to a given point in time.
Boundary target: Can be incident
date, event date or enrollment date.
Designates what is being constrained by
the boundary.
Analytics period boundary type: Defines
wether the boundary is a end boundary
- starting with "before...", or a start
boundary - "after...". Also defines whether
the boundary relates to the end of the
aggregate reporting period or the start of
the aggregate reporting period.
Offset period by amount: In some
cases, for example cohort analytics, the
boundary should be offset relative to
the aggregate reporting period when
running pivots and reports. The offset
period by amount is used to move the
current boundary either back(negative) or
forward(positive) in time. The amount and
period type together will determine how
big the offset will be. An example can be
when making a simple enrollment cohort
porgram indicator for a 1 year cohort, it
might be enough to offset each boundary
of the program indicator with "-1" and
"Years"
Period type: See above. Can be any
period, e.g. Weekly or Quarterly.
Configure programs in the Maintenance
app
About program indicators
263
Program rule component Description
Expression The expression defines how the indicator
is being calculated. The expression can
contain references to various entities which
will be substituted with a related values
when the indicator is calculated:
Data elements: Will be substituted with
the value of the data element for the time
period and organisation unit for which
the calculation is done. Refers to both
program stage and data element.
Attributes: Will be substituted with the
value of the attribute for the person /
tracked entity for which the calculation is
done.
Variables: Will be substituted with special
values linked to the program, including
incident date and date of enrollment
for the person, current date and count
of values in the expression for the time
period and organisation unit for which the
calculation is done.
Constants: Will be substituted with the
value of the constant.
The expression is a mathematical
expression and can also contain operators.
For single event programs and tracker
programs with analytics type event,
the expression will be evaluated per
event , then aggregated according to its
aggregation type.
For tracker programs with analytics
type enrollment, the expression will be
evaluated per enrollment, then aggregated
according to its aggregation type.
Filter The filter is applied to events and filters
the data source used for the calculation
of the indicator. I.e. the filter is applied
to the set of events before the indicator
expression is being evaluated. The filter
must evaluate to either true or false. It filter
is applied to each individual event. If the
filter evaluates to true then the event is
included later in the expression evaluation,
if not it is ignored. The filter can, in a similar
way as expressions, contain references to
data elements, attributes and constants.
The program indicator filter can in addition
use logical operators. These operators can
be used to form logical expressions which
ultimately evaluate to either true or false.
Configure programs in the Maintenance
app
Create or edit a program indicator
264
Program rule component Description
For example you can assert that multiple
data elements must be a specific value, or
that specific attributes must have numerical
values less or greater than a constant.
In the Maintenance app, you manage the following program indicator objects:
Object type Available functions
Program indicator Create, edit, clone, share, delete, show
details and translate
Program indicator group Create, edit, clone, share, delete, show
details and translate
21.4.2. Create or edit a program indicator
Note
A program indicator belongs to exactly one program.
1. Open the Maintenance app and click Indicator > Program indicator.
2. Click the add button.
3. Select a Program and enter:
Name
Short name
Code
Description
4. Select number of Decimals in data output.
5. Select an Aggregation type.
6. Select a if you want to Display in form.
7. Assign one or multiple Legends.
8. (Optional) Enter a Category option combination for aggregate data export.
9. (Optional) Enter an Attribute option combination for aggregate data export.
10.Create the expression.
a. Click Edit expression.
b. Create the expression based on mathematical operators and the attributes, variables and
constants listed to the right.
11.Create the filter.
a. Click Edit filter.
b. Create the expression based on mathematical operators and the attributes, variables and
constants listed to the right.
12.Click Save.
21.4.3. Create or edit a program indicator group
1. Open the Maintenance app and click Indicator > Program indicator group.
2. Click the add button.
3. Enter Name and Code.
4. In the list of available program indicators, double-click the program indicators you want to
assign to your group.
5. Click Save.
Configure programs in the Maintenance
app
Reference information: Expression and
filter examples per value type
265
21.4.4. Reference information: Expression and filter examples per value type
The table below shows examples of how to write expressions and filters for different data
element and attribute value types:
Table21.7.Expression and filter examples per value type
Value types Example syntax
Integer
Negative integer
Positive or zero integer
Positive integer
Number
Percentage
Numeric fields, can be used for
aggregation as an expression, or in
filters:
#{mCXR7u4kNBW.K0A4BauXJDl} >= 3
Yes/No
Yes only
Boolean fields. Yes is translated to
numeric 1, No to numeric 0. Can be used
for aggregation as an expression, or in
filters:
#{mCXR7u4kNBW.Popa3BauXJss} == 1
Text
Long text
Phone number
Email
Text fields. Can be checked for equality
in filters:
#{mCXR7u4kNBW.L8K4BauIKsl} ==
'LiteralValue'
Date
Age
Date fields. Most useful when combined
with a d2:daysBetween function,
which produces a number that can be
aggregated as an expression or used in
filters:
d2:daysBetween(#{mCXR7u4kNBW.JKJKBausssl},V{enrollment_date})
> 100
Can also directly be checked for equality
in filters:
#{mCXR7u4kNBW.JKJKBausssl} ==
'2011-10-28'
Date
Age
Date fields. Most useful when combined
with a d2:daysBetween function,
which produces a number that can be
aggregated as an expression or used in
filters:
d2:daysBetween(#{mCXR7u4kNBW.JKJKBausssl},V{enrollment_date})
> 100
Can also directly be checked for equality
in filters:
#{mCXR7u4kNBW.JKJKBausssl} ==
'2011-10-28'
Configure programs in the Maintenance
app
Reference information: Functions,
variables and operators to use in
program indicator expressions and
filters
266
21.4.5. Reference information: Functions, variables and operators to use in
program indicator expressions and filters
Example21.4.
An expression that includes both attributes, data elements and constants looks like this:
(A{GPkGfbmArby} + #{mCXR7u4kNBW.NFkjsNiQ9PH}) * C{bCqvfPR02Im}
Example21.5.
An expression which uses the custom aggregation type and hence can use inline aggregation
types looks like this:
(sum(#{mCXR7u4kNBW.K0A4BauXJDl} * #{mCXR7u4kNBW.NFkjsNiQ9PH}) /
sum(#{mCXR7u4kNBW.NFkjsNiQ9PH})) * 100
Note how the "sum" aggregation operator is used inside the expression itself.
21.4.5.1. Functions to use in a program indicator expression or filter
The program indicator expression and filter support a range of functions. The functions can be
applied to data elements and attributes:
Table21.8.Functions to use in a program indicator expression or filter
Function Arguments Description
d2:hasValue (object) Returns true if the data element/attribute has
a value. Can be used in filters to distinguish
between the number 0 and no value, and
to distinguish between exlicit "No" and no
selection for a Yes/No field.
d2:minutesBetween(datetime, datetime) Produces the number of minutes between two
data elements/attributes of type "date and
time". The static datetime format is 'yyyy-MM-
dd hh:mm'.
d2:daysBetween(date, date) Produces the number of days between two data
elements/attributes of type date. The static date
format is 'yyyy-MM-dd'.
d2:weeksBetween(date, date) Produces the number of full weeks between two
data elements/attributes of type date. The static
date format is 'yyyy-MM-dd'.
d2:monthsBetween(date, date) Produces the number of full months between
two data elements/attributes of type date. The
static date format is 'yyyy-MM-dd'.
d2:yearsBetween(date, date) Produces the number of full years between two
data elements/attributes of type date. The static
date format is 'yyyy-MM-dd'.
d2:condition (boolean-expr, true-val,
false-val)
Evaluates the conditional expression and if
true returns the true value, if false returns the
false value. The conditional expression must be
quoted.
d2:zing (number) Evaluates the data element/attribute of
type number to zero if the value is negative,
otherwise to the value itself.
Configure programs in the Maintenance
app
Reference information: Functions,
variables and operators to use in
program indicator expressions and
filters
267
Function Arguments Description
d2:oizp (number) Evaluates the data element/attribute of type
number to one if the value is zero or positive,
otherwise to zero.
d2:zpvc (object, [,object,
object,...])
Returns the number of numeric zero and
positive values among the given object
arguments. Can be provided any number of
arguments.
Example21.6.
A filter that uses the "hasValue" function looks like this: this:
d2:hasValue(#{mCXR7u4kNBW.NFkjsNiQ9PH})
Example21.7.
An expression that uses the "zing" and "oizp" functions looks like this:
d2:zing(A{GPkGfbmArby}) + d2:oizp(#{mCXR7u4kNBW.NFkjsNiQ9PH}))
Example21.8.
An expression that uses the "daysBetween" function looks like this:
d2:daysBetween(#{mCXR7u4kNBW.k8ja2Aif1Ae},'2015-06-01')
Example21.9.
An expression that uses the "condition" function looks like this:
d2:condition('#{mCXR7u4kNBW.NFkjsNiQ9PH} > 100',150,50)
Example21.10.
An expression that uses the "zpvc" function looks like this:
d2:zpvc(A{GPkGfbmArby}),#{mCXR7u4kNBW.NFkjsNiQ9PH}),4,-1)
21.4.5.2. Variables to use in a program indicator expression or filter
The program indicator expression and filter support a range of variables:
Table21.9.Variables to use in a program indicator expression or filter
Variable Description
event_date The date of when the event took place.
due_date The date of when an event is due.
incident_date The date of the incidence of the event.
enrollment_date The date of when the tracked entity instance was enrolled in the
program.
enrollment_status Can be used to include or exclude enrollments in certain statuses.
Example21.11.
When calculating the hemoglobin improvement/deterioration
throughout a pregnancy, it might make sense to only consider
completed enrollments. If non-completed enrollments is not filtered
Configure programs in the Maintenance
app
Reference information: Functions,
variables and operators to use in
program indicator expressions and
filters
268
Variable Description
out, these will represent half-finished ANC followups, where the final
improvement/deterioration is not yet established.
current_date The current date.
value_count The number of non-null values in the expression part of the event.
zero_pos_value_countThe number of numeric positive values in the expression part of the
event.
event_count The count of events (useful in combination with filters).
enrollment_count The count of enrollments (useful in combination with filters).
tei_count The count of tracked entity instances (useful in combination with
filters).
program_stage_nameCan be used in filters for including only certain program stages in a
filter for tracker programs. Uses the name of the program stage:
V{program_stage_name} == 'ANC first visit'
program_stage_id Can be used in filters for including only certain program stages in a
filter for tracker programs. Uses the unique identifier of the program
stage:
V{program_stage_id} == 'YPSSfbmAtt1'
Example21.12.
An expression that uses the "value count" variable looks like this:
(#{A03MvHHogjR.a3kGcGDCuk6} + #{A03MvHHogjR.wQLfBvPrXqq}) / V{value_count}
Example21.13.
An expression that uses the "event_date" and "incident_date" variables looks like this:
d2:daysBetween(V{incident_date},V{event_date})
21.4.5.3. Operators to use in a program indicator filter
Table21.10.Operators to use in a program indicator filter
Operator Description
and Logical AND
or Logical OR
== Equal to
!= Not equal to
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
These operators can be used to form logical expressions which ultimately evaluate to either
true or false. For example you can assert that multiple data elements must be a specific value,
or that specific attributes must have numerical values less or greater than a constant.
Example21.14.
A filter that uses both attributes and data elements looks like this:
Configure programs in the Maintenance
app
Configure program rules
269
A{cejWyOfXge6} == 'Female' and #{A03MvHHogjR.a3kGcGDCuk6} <= 2
Tip
DHIS2 is using the JEXL library for evaluating expressions which supports additional
syntax beyond what is covered in this documentation. See the reference at the project
home page to learn how you can create more sophisticated expressions
21.5. Configure program rules
21.5.1. About program rules
Program rules allows you to create and control dynamic behavior of the user interface in the
Tracker Capture and Event Capture apps. During data entry, the program rules expressions
are evaluated each time the user interface is displayed, and each time a data element is
changed. Most types of actions will take effect immediately when the user enters values in the
Tracker Capture and Event Capture apps.
Table21.11.Program rule components
Program rule component Description
Program rule action Each program rule contains one or multiple
actions. These are the behaviors that are
triggered in the user interface when the
expression is true. Actions will be applied
at once if the expression is true, and will be
reverted if the expression is no longer true.
There are several types of actions and you
can have several actions in one program
rule.
Program rule expression Each program rule has a single expression
that determines whether the program
rule actions should be triggered, if the
expression evaluates to true. If the
expression is true the program rule is in
effect and the actions will be executed. If
the expression is false, the program rule is
no longer in effect and the actions will no
longer be applied.
You create the expression with standard
mathematical operators, custom functions,
user-defined static values and program
rule variables. The program rule variables
represent attribute and data element
values which will be evaluated as part of
the expression.
Program rule variable Program rule variables lets you include
data values and attribute values in program
rule expressions. Typically, you'll have
to create one or several program rule
variables before creating a program rule.
This is because program rules expressions
usually contain at least one data element or
attribute value to be meaningful.
Configure programs in the Maintenance
app
Workflow
270
Program rule component Description
The program rule variables are shared
between all rules in your program. When
you create multiple program rules for the
same program, these rules will share the
same library of program rule variables.
In the Maintenance app, you manage the following program rule objects:
Object type Available functions
Program rule Create, edit, clone, delete, show details and
translate
Program rule variable Create, edit, clone, share, delete, show
details and translate
21.5.2. Workflow
1. In the Maintenance app, create program rule variable(s) if needed.
2. In the Maintenance app, create the program rule:
a. Enter the program rule details.
b. Create the program rule expression.
c. Define the program rule actions.
3. In the Tracker Capture or Event Capture apps, verify that the program rule behaves as
expected.
21.5.3. Create or edit a program rule variable
1. Open the Maintenance app and click Program > Program rule variable.
2. Click the add button.
3. Select a Program and enter a Name.
4. Select if you want to Use code for option set.
This option is only effective when the data element or tracked entity attribute is connected to
an option set. If you don't select this option, the program rule variable will be populated with
the option set's name. If you select the option, the program rule variable will be populated
with the option set's code instead.
5. Select a Source type and enter the required information.
Depending on the source type, you'll have to select, for example, a Program stage, Data
element or Tracked entity attribute.
The source types determine how the program rule variable is populated with a value.
Source type Description
Data element from the newest event
for a program stage
This source type works the same way as
Data element from the newest event
in the current program, except that it
only evaluates values from one program
stage.
This source type can be useful in program
rules where the same data element is
used in several program stages, and a rule
needs to evaluate the newest data value
from within one specific stage.
Configure programs in the Maintenance
app
Create or edit a program rule variable
271
Source type Description
Data element from the newest event
in the current program
This source type is used when a program
rule variable needs to reflect the newest
known value of a data element, regardless
of what event the user currently has open.
This source type is populated slightly
differently in Tracker Capture and Event
Capture apps:
Tracker Capture: the program rule
variable will be populated with the newest
data value collected for the given data
element within the enrollment.
Event Capture: the program rule variable
will be populated with the newest data
value found within the 10 newest events in
the same organisation unit.
The newest data value is determined with
event date.
Data element in current event Program rule variables with this source
type will contain the data value from the
same event that the user currently has
open.
This is the most commonly used source
type, especially for skip logic (hide
actions) and warning/error rules.
Data element from previous event Program rule variables with this source
type will contain the value from a specified
data element from a previous event. Only
older events is evaluated, not including
the event that the user currently has open.
This source type is commonly used when
a data element only should be collected
once during an enrollment, and should be
hidden in subsequent events.
Another use case is making rules for
validating input where there is an
expected progression from one event to
the next - a rule can evaluate whether the
previous value is higher/lower and give a
warning if an unexpected value is entered.
This source type is populated slightly
differently in Tracker Capture and Event
Capture apps:
Tracker Capture: the program rule
variable will be populated with the newest
data value collected for the given data
element within the enrollment - but only
Configure programs in the Maintenance
app
Create or edit a program rule
272
Source type Description
evaluating the events that comes before
the current event date.
Event Capture: the program rule variable
will be populated with the newest data
value collected within the 10 events
preceding the current event date - not
including the current event.
The newest data value is determined with
event date.
Calculated value TBA
Tracked entity attribute Populates the program rule variable with
a specified tracked entity attribute for the
current enrollment.
Use this is the source type to create
program rules that evaluate data values
entered during registration.
This source type is also useful when you
create program rules that compare data in
events to data entered during registration.
This source type is only used for tracker
programs (programs with registration).
6. Click Save.
21.5.4. Create or edit a program rule
Note
A program rule belongs to exactly one program.
1. Open the Maintenance app and click Program > Program rule.
2. Click the add button.
3. Enter the program rule details. These fields are not shown to the end user, they are only
meant for the program administrator.
Program
Name
Description
Priority
Example21.15.
Let's say you have 16 program rules in your program. You configure the program rules
with the following priority settings:
Priority 1 for program rule A
Priority 2 for program rules B - K
No priority for program rules L - P
Result: the system runs the program rules in the following order:
a. Program rule A
Configure programs in the Maintenance
app
Create or edit a program rule
273
b. Program rules B - K (you can't find out or configure in which order the system runs these
program rules)
c. Program rules L - P.
4. Click Enter program rule expression and create the program rule expression with the
help of variables, functions and operators.
5. Click Define program rule actions and create the actions executed when the expression
is true.
a. Click the add button, select an Action and enter the required information.
Depending on the action type, you'll have to perform different types of settings. For some
action types, you must also enter free text or create expressions.
Action type Required settings Description

Assign value Data element to assign
value to
Program rule variable
to assign value to
Expression to evaluate
and assign
Used to help the user
calculate and fill out fields
in the data entry form.
The idea is that the user
shouldn’t have to fill in
values that the system
can calculate, for example
BMI.
When a field is assigned
a value, the user sees the
value but the user can't
edit it.
Example from
Immunization stock card i
Zambia: The data element
for vaccine stock outgoing
balance is calculated
based on the data element
for incoming stock balance
minus the data elements
for consumption and
wastage.
Advanced use: configure
an 'assign value' to do a
part of a calculation and
then assign the result
of the calculation to a
program rule variable.
This is the purpose with
the "Calculated value"
program rule variable.
Display text Display widget
Static text
Expression to evaluate
and display after static
text
Used to display
information that is not
an error or a warning, for
example feedback to the
user. You can also use this
action to display important
information, for example
Configure programs in the Maintenance
app
Create or edit a program rule
274
Action type Required settings Description
the patient's allergies, to
the user.
Display key/value pair Display widget
Key label
Expression to evaluate
and display as value
Used to display
information that is not an
error or a warning.
Example: calculate
number of weeks and
days in a pregnancy and
display it in the format the
clinician is used to see it
in. The calculation is based
on previous recorded data.
Error on complete Data element to display
error next to
Tracked entity attribute
to display error next to
Static text
Expression to evaluate
and display after static
text
Used whenever you've
cross-consistencies in the
form that must be strictly
adhered to. This action
prevents the user from
continuing until the error
is resolved.
This action differs from the
regular Show error since
the error is not shown until
the user tries to actually
complete the form.
If you don't select a data
element or a tracked
entity attribute to
display the error next
to, make sure you write
a comprehensive error
message that helps the
user to fix the error.
Hide field Data element to hide
Tracked entity attribute
to hide
Custom message for
blanked field
Used when you want to
hide a field from the user.
Custom message for
blanked field allows
you to define a custom
message displayed to the
user in case the program
rule hides and blanks out
the field after the user
typed in or selected a
value.
If a hide field action hides
a field that contains a
value, the field will always
removed. If no message
is defined, a standard
message will be displayed
to alert the user.
Configure programs in the Maintenance
app
Create or edit a program rule
275
Action type Required settings Description
Hide section Program stage section
to hide
TBA
Hide program stage Program stage to hide Used when you want to
hide a program stage
section from the user.
Make field mandatory Data element to make
mandatory
Tracked entity attribute
to make mandatory
TBA
Show error Data element to display
error next to
Tracked entity attribute
to display error next to
Static text
Expression to evaluate
and display after static
text
Used whenever there are
rules which must strictly
be adhered to. The show
error action prevents the
user from continuing until
the error is resolved.
Such a strict validation
should only be used
when it's certain that the
evaluated expression is
never true unless the user
has made a mistake in
data entry.
It's mandatory to define
a message that is shown
to the user when the
expression is true and the
action is triggered.
You can select which data
element or tracked entity
attribute to link the error
to. This will help the user
to fix the error.
In case several data
elements or attributes are
involved, select the one
that is most likely that
the user would need to
change.
Show warning Data element to display
warning next to
Tracked entity attribute
to display warning next
to
Static text
Expression to evaluate
and display after static
text
Used to give the user a
warning about the entered
data, but at the same time
to allow the user to save
and continue.
You can use warnings
to help the user avoid
errors in the entered
data, while at the same
time allow the user to
consciously disregard the
Configure programs in the Maintenance
app
Create or edit a program rule
276
Action type Required settings Description
warnings and save a value
that is outside preset
expectations.
Static text defines the
message shown to the
user when the expression
is true and the action is
triggered.
You can select which data
element or tracked entity
attribute to link the error
to. This will help the user
to fix the error.
In case several data
elements or attributes are
involved, select the one
that is most likely that
the user would need to
change.
Warning on complete Data element to display
warning next to
Tracked entity attribute
to display warning next
to
Static text
Expression to evaluate
and display after static
text
Used to give the user a
warning if he/she tries
to complete inconsistent
data, but at the same
time to allow the user to
continue. The warning is
shown in a dialog when
the user completes the
form.
Static text defines the
message shown to the
user when the expression
is true and the action is
triggered. This field is
mandatory.
You can select which data
element or tracked entity
attribute to link the error
to. This will help the user
to fix the error.
If you don't select a data
element or a tracked
entity attribute to
display the error next
to, make sure you write
a comprehensive error
message that helps the
user to fix the error.
Send Message Message template to
send
Send Message triggers
a notification based
on provided message
Configure programs in the Maintenance
app
Example: Program rules
277
Action type Required settings Description
template. This action
will be taken at event/
enrollment completion.
Message template will be
parsed and variables will
be substituted with actual
values.
b. Click Save.
c. (Optional) Repeat above steps to add more actions.
6. Click Save.
21.5.5. Example: Program rules
Note
You can view all examples on the demo server: https://play.dhis2.org/dev/dhis-web-
maintenance/#/list/programSection/programRule
Example21.16.Display key/value pair
This example shows how to configure a program rule which calculate number of weeks and
days in a pregnancy and display the result in the format the clinician is used to see it in. The
calculation is based on previous recorded data.
1. Program rule details
Configure programs in the Maintenance
app
Example: Program rules
278
2. Program rule expression
3. Program rule action
The full expression in the Data field:
d2:concatenate(d2:weeksBetween(#{lmp}, V{current_date}), '+',
d2:modulus(d2:daysBetween(#{lmp}, V{current_date}), 7))
Result of program rule in Tracker Capture or Event Capture apps:
Example21.17.Show display text in Feedback widget
This example shows how to configure a program rule to display text in the Feedback widget
in the Tracker Capture app.
Configure programs in the Maintenance
app
Example: Program rules
279
1. Program rule variable
2. Program rule details
Configure programs in the Maintenance
app
Example: Program rules
280
3. Program rule expression
4. Program rule action
Result of program rule in Tracker Capture or Event Capture apps:
Example21.18.Show information from first program stage in Feedback widget
This example shows how to configure a program rule to always display certain data in the
Feedback widget in the Tracker Capture app. This is useful when you want to make sure that
vital data, for example medicine allergies, is always visible.
Configure programs in the Maintenance
app
Example: Program rules
281
1. Program rule variable
2. Program rule details
Configure programs in the Maintenance
app
Example: Program rules
282
3. Program rule expression
4. Program rule action
Configure programs in the Maintenance
app
Example: Program rules
283
Medicine allergies recorded in first program stage in the Tracker Capture app:
Result of program rule in the Tracker Capture app:
Example21.19.Calculate gestational age in weeks at visit
By using a program rule of type "Assign value" you can calculate the "Gestational age at visit"
value and fill it in the data entry form. You configure the program rule to calculate "Gestational
age at visit" based on either "LMP date" or "Ultrasound estimated due date".
Configure programs in the Maintenance
app
Example: Program rules
284
1. Program rule details
2. Program rule expression
3. Program rule action
Configure programs in the Maintenance
app
Reference information: Operators
and functions to use in program rule
expression
285
Result of program rule in Tracker Capture or Event Capture apps:
21.5.6. Reference information: Operators and functions to use in program rule
expression
Tip
You can nest functions within each other and with subexpressions to form more complex
conditions. An example that produces the gestational age in weeks, based on last
menstrual date:
d2:floor( d2:daysBetween(#{lastMenstrualDate},V{event_date}) / 7 )
Tip
The source type will determine how the d2: function calls will evaluate a (sourcefield)
parameter.
Example: where #{hemoglobinCurrent} is set to source type Data element in current
event. The following function call with evaluate whether hemoglobin is entered in the
current event.
d2:hasValue( 'hemoglobinCurrent' )
Example: where #{hemoglobin} is set to source type Data element from the newest
event in the current program. The following function call with evaluate whether there
exists a value for the hemoglobin in any event in the enrollment.
d2:hasValue( 'hemoglobin' )
Configure programs in the Maintenance
app
Reference information: Operators
and functions to use in program rule
expression
286
Example: where #{hemoglobinPrevious} is set to source type Data element from
previous event . The following function call with evaluate whether there exists a value
for the hemoglobin among the events preceding the current event.
d2:hasValue( 'hemoglobinPrevious' )
Table21.12.Possible operators to use in a program rule expression
Operator Description
+ Add numbers together
- Subtract numbers from each other
* Multiply two numbers
/ Divide two numbers
% The modulus of two numbers
&& Logical AND. True only when the expression on the left and right side is
true. The left and right side can be yes/no, yes only or a subexpression in
parenthesis.
|| Logical OR. True when either the expression on the left or the expression
on the right side is true. The left and right side can be yes/no, yes only or a
subexpression in parenthesis.
> Left number greater than right number
>= Left number greater than or equal to right number
< Left number less than right number
<= Left number less than or equal to right number.
== Left side equal to right side. Supports numbers, text, yes/no and yes only.
!= Left side not equal to right side. Supports numbers, text, yes/no and yes
only.
! Negates the following value. Can be used for yes/no, yes only or a sub-
expression in parenthesis.
() Parenthesis is used to group sub-expressions.
Table21.13.Custom functions to use in a program rule expression
Function Arguments Description
d2:ceil (number) Rounds the input argument up to the nearest
whole number.
Example:
d2:ceil(#{hemoglobinValue})
d2:floor (number) Rounds the input argument down to the
nearest whole number.
An example producing the number of weeks
the woman is pregnant. Notice that the
subexpression #{gestationalAgeDays}/7 is
evaluated before the floor function is executed:
d2:floor(#{gestationalAgeDays}/7)
d2:round (number) Rounds the input argument to the nearest
whole number.
Configure programs in the Maintenance
app
Reference information: Operators
and functions to use in program rule
expression
287
Function Arguments Description
d2:modulus (number,number) Produces the modulus when dividing the first
with the second argument.
An example producing the number of days the
woman is into her current pregnancy week:
d2:modulus(#{gestationalAgeDays},7)
d2:zing (number) Evaluates the argument of type number to zero
if the value is negative, otherwise to the value
itself.
d2:oizp (number) Evaluates the argument of type number to one
if the value is zero or positive, otherwise to
zero.
d2:concatenate(object, [,object,
object,...])
Produces a string concatenated string
from the input parameters. Supports
any number of parameters. Will mainly
be in use in future action types, for
example to display gestational age with
d2:concatenate('weeks','+','gestationalageDays').
d2:daysBetween(date, date) Produces the number of days between the first
and second argument. If the second argument
date is before the first argument the return
value will be the negative number of days
between the two dates. The static date format
is 'yyyy-MM-dd'.
Example, calculating the gestational age(in
days) of a woman, based on the last menstrual
period and the current event date:
d2:daysBetween(#{lastMenstrualDate},V{event_date})
d2:weeksBetween(date, date) Produces the number of full weeks between
the first and second argument. If the second
argument date is before the first argument the
return value will be the negative number of
weeks between the two dates. The static date
format is 'yyyy-MM-dd'.
d2:monthsBetween(date, date) Produces the number of full months between
the first and second argument. If the second
argument date is before the first argument the
return value will be the negative number of
months between the two dates. The static date
format is 'yyyy-MM-dd'.
d2:yearsBetween(date, date) Produces the number of years between the first
and second argument. If the second argument
date is before the first argument the return
value will be the negative number of years
between the two dates. The static date format
is 'yyyy-MM-dd'.
d2:addDays (date, number) Produces a date based on the first argument
date, adding the second argument number of
days.
Configure programs in the Maintenance
app
Reference information: Operators
and functions to use in program rule
expression
288
Function Arguments Description
An example calculating the pregnancy due date
based on the last menstrual period:
d2:addDays(#{lastMenstrualDate},283)
d2:count (sourcefield) Counts the number of values that is entered for
the source field in the argument. The source
field parameter is the name of one of the
defined source fields in the program - see
example
Example usage where
#{previousPregnancyOutcome} is one of the
source fields in a repeatable program stage
"previous pregnancy":
d2:count('previousPregnancyOutcome')
d2:countIfValue(sourcefield,text) Counts the number of matching values that
is entered for the source field in the first
argument. Only occurrences that matches the
second argument is counted. The source field
parameter is the name of one of the defined
source fields in the program - see example.
Example usage where
#{previousPregnancyOutcome} is one of
the source fields in a repeatable program
stage "previous pregnancy". The following
function will produce the number of previous
pregnancies that ended with abortion:
d2:countIfValue('previousPregnancyOutcome','Abortion')
d2:countIfZeroPos(sourcefield) Counts the number of values that is zero or
positive entered for the source field in the
argument. The source field parameter is the
name of one of the defined source fields in the
program - see example.
Example usage where
#{fundalHeightDiscrepancy} is one of the
source fields in program, and it can be either
positive or negative. The following function will
produce the number of positive occurrences:
d2:countIfZeroPos('fundalHeightDiscrepancy')
d2:hasValue (sourcefield) Evaluates to true of the argument source field
contains a value, false if no value is entered.
Example usage, to find if the source field
#{currentPregnancyOutcome} is yet filled in:
d2:hasValue('currentPregnancyOutcome')
d2:zpvc (object, [,object,
object,...])
Returns the number of numeric zero and
positive values among the given object
Configure programs in the Maintenance
app
Reference information: Operators
and functions to use in program rule
expression
289
Function Arguments Description
arguments. Can be provided with any number of
arguments.
d2:validatePattern(text, regex-pattern) Evaluates to true if the input text is an exact
match with the supplied regular expression
pattern. The regular expression needs to be
escaped.
Example expression, triggering actions if a
number is not on the pattern 9999/99/9:
!d2:validatePattern(A{nrc},'\\d{6}\/\\d{2}\/\
\d')
Example expression, triggering actions that if
the address is not consisting of letters or white
spaces, then a white space, then a number:
!
d2:validatePattern(A{registrationAddress},'[\
\w ]+ \\d+')
Example, triggering actions if a name contains
any numbers:
!d2:validatePattern(A{name},'[^\\d]*')
Example expression, triggering actions if a
mobile number contains the illegal number
sequence 555:
d2:validatePattern(A{mobile} ,'.*555.*')
d2:left (text, num-chars) Evaluates to the left part of a text, num-chars
from the first character.
The text can be quoted or evaluated from a
variable:
d2:left(#{variableWithText}, 3)
d2:right (text, num-chars) Evaluates to the right part of a text, num-chars
from the last character.
The text can be quoted or evaluated from a
variable:
d2:right(#{variableWithText}, 2)
d2:substring (text, start-char-num,
end-char-num)
Evaluates to the part of a string specified by the
start and end character number.
Example expression:
d2:substring(#{variableWithText}, 1, 3)
If the #{variableWithText} in the above
example was 'ABCD', then the result of the
evaluation would be 'BC'
d2:split (text, delimiter, element-
num)
Split the text by delimiter, and keep the nth
element(0 is the first).
Configure programs in the Maintenance
app
Reference information: Operators
and functions to use in program rule
expression
290
Function Arguments Description
The text can be quoted or evaluated from a
variable, the delimiter must be quoted:
d2:split(#{variableWithText}, '-', 1)
Note: comma delimiter(,) is not supported.
d2:length (text) Find the length of a string.
Example:
d2:length(#{variableWithText})
Table21.14.Standard variables to use in program rule expressions
Variable Type Description
V{current_date}(date) Contains the current date whenever the rule is
executed.
Example expression:
d2:daysBetween(#{symptomDate},V{current_date})
< 0
V{event_date}(date) Contains the event date of the current event
execution. Will not have a value at the moment
the rule is executed as part of the registration
form.
V{due_date} (date) This variable will contain the current date when
the rule is executed. Note: This means that the
rule might produce different results at different
times, even if nothing else has changed.
V{event_count}(number) Contains the total number of events in the
enrollment.
V{enrollment_date}(date) Contains the enrollment date of the current
enrollment. Will not have a value for single
event programs.
V{incident_date}(date) Contains the incident date of the current
enrollment. Will not have a value for single
event programs.
V{enrollment_id}(string) Universial identifier string(UID) of the current
enrollment. Will not have a value for single
event programs.
V{event_id} (string) Universial identifier string(UID) of the current
event context. Will not have a value at the
moment the rule is executed as part of the
registration form.
V{orgunit_code}(string) Contains the code of the orgunit that is linked
to the current enrollment. For single event
programs the code from the current event
orgunit will be used instead.
Configure programs in the Maintenance
app
Configure relationship types
291
Variable Type Description
Example expression to check wether orgunit
code starts with WB_:
d2:left(V{orgunit_code},3) == 'WB_'
21.6. Configure relationship types
21.6.1. About relationship types
A relationship type defines the relationship between tracked entity A and tracked entity B, for
example mother and child.
21.6.2. Create or edit a relationship type
1. Open the Maintenance app and click Program > Relationship type.
2. Click the add button.
3. Type a Name of the relationship type.
4. (Optional) Assign a Code.
5. In the A is to B field, enter a description of which relationship tracked entity A has to tracked
entity B, for example mother.
6. In the B is to A field, enter a description of which relationship tracked entity B has to tracked
entity A, for example child.
7. Click Save.
21.7. Configure tracked entities
21.7.1. About tracked entities
A tracked entity is a types of entities which can be tracked through the system. It can be
anything from persons to commodities, for example a medicine or a person.
A program must have one tracked entity. To enrol a tracked entity instance into a program,
the tracked entity of an entity and tracked entity of a program must be the same.
Tracked entity attributes are used to register extra information for a tracked entity. Tracked
entity attributes can be shared between programs.
21.7.2. Create or edit a tracked entity attribute
1. Open the Maintenance app and click Program > Tracked entity attribute.
2. Click the add button.
3. In the Name field, type the tracked entity attribute name.
4. (Optional) Type a Short name.
5. (Optional) In the Code field, assign a code.
6. (Optional) Type a Description.
Configure programs in the Maintenance
app
Create or edit a tracked entity attribute
292
7. Select an Option set.
8. In the Value type field, select the type of data that the tracked entity attribute will record.
Table21.15.Value types
Value type Description
Age -
Coordinate A point coordinate specified as
longitude and latitude in decimal
degrees. All coordinate should be
specified in the format "-19.23 , 56.42"
with a comma separating the longitude
and latitude.
Date Dates render as calendar widget in data
entry.
Date & time -
E-mail -
File A file resource where you can store
external files, for example documents
and photos.
Image Similar to File, but restricted to images.
Integer Any whole number (positive and
negative), including zero.
Letter -
Long text Textual value. Renders as text area in
forms.
Negative integer Any whole number less than (but not
including) zero.
Number Any real numeric value with a single
decimal point. Thousands separators
and scientific notation is not supported.
Percentage Whole numbers inclusive between 0 and
100.
Phone number
Positive integer Any whole number greater than (but not
including) zero.
Positive of zero integer Any positive whole number, including
zero.
Organisation unit -
Unit interval Any real number greater than or equal
to 0 and less than or equal to 1.
Text Textual value. The maximum number of
allowed characters per value is 50,000.
Time Time is stored in HH:mm format.
HH is a number between 0 and 23
mm is a number between 00 and 59
Tracker associate -
Configure programs in the Maintenance
app
Create or edit a tracked entity attribute
293
Value type Description
Username This will be populated with the
username of the user which performs
data entry automatically during the
data entry process.
Yes/No Boolean values, renders as drop-down
lists in data entry.
Yes only True values, renders as check-boxes in
data entry.
9. Select an Aggregation type.
Table21.16.Aggregation operators
Aggregation operator Description
Average Average the values in both the period as
and the organisation unit dimensions.
Average (sum in organisation unit
hierarchy)
Average of data values in the period
dimension, sum in the organisation unit
dimensions.
Count Count of data values.
Min Minimum of data values.
Max Maximum of data values.
None No aggregation is performed in any
dimension.
Sum Sum of data values in the period and
organisation unit dimension.
Standard deviation Standard deviation (population-based) of
data values.
Variance Variance (population-based) of data values.
10.Select Unique to specify that the values of the tracked entity attribute is unique.
There are two options for the unique setting:
Entire system: The values of the tracked entity attribute can duplicate with values which
belong to other tracked entity attributes. But the values in this tracked entity attribute
must not duplicate.
Select Automatically generated to allow automatic generation of the tracked entity
attribute value. When the generate setting is selected on, an optional field for specifying
pattern also displays. This field should contain a pattern based on the TextPattern syntax.
When the value is automatically generated, it will be unique for this attribute for the entire
system. See the TextPattern section for more information on how it works.
Organisation unit: The values of the tracked entity attribute must not duplicate in the
same organisation unit.
11.Select Inherit to registry a new entity for relationship with an available entity, all inherit
entity attribute values of the entity will be pre-filled in the registration form.
12.(Optional) Select Confidential.
This option is only available if you have configured encryption for the system.
13.(Optional) Select Display in list without program.
14.(Optional) Assign one or multiple Legends.
15.Click Save.
Configure programs in the Maintenance
app
Create or edit a tracked entity type
294
21.7.3. Create or edit a tracked entity type
1. Open the Maintenance app and click Program > Tracked entity type.
2. Click the add button or an already exsisting tracked entity type.
3. Type a Name of the tracked entity.
4. (Optional) Enter a Description of the tracked entity.
5. (Optional) Enter a Minimum number of attributes required to search. This specifies the
amount of attributes that need to be filled out in order to be able to search for this tracked
entity type in a global search. See Configure Search for more information.
6. (Optional) Enter a Maximum number of tracked entity instances to return in search.
This specifies the amount of tracked entity instances that will be returned in a global search.
See Configure Search for more information.
7. (Optional) Add Tracked entity type attributes. This is used to configure search, see
Configure Search for more information.
8. (Optional) Enter an Alternative name of the tracked entity.
9. Click Save.
21.8. Configure search
Users can be given search organisation units, which makes it possible to search for tracked
entity instances outside their data capture organisation units.
Searching can be done either in the context of a program, or in the context of a tracked entity
type. To be give users the option of searching in the context of a program, it is necessary
to configure which of the programs tracked entity attributes is searchable. To give users the
option of searching in the context of a tracked entity type, you will have to configure which of
the tracked entity type attributes is searchable.
21.8.1. Configure search for tracker program
To be able to search with a program, you will have to make some of the program attributes
searchable. Unique program attributes will always be searchable.
1. Open Program app
2. Open or create a tracker program
3. Go to Attributes
4. If you have no attributes, add one
5. Set the attribute searchable
Searchable program attributes will assigned to a search group.
Unique group. One group per unique program attribute. Unique attributes cannot be
combined with other program attributes in a search. The result from the search can only be
0 or 1 tracked entity instance.
Non-unique group. This group contains all non-unique program attributes and makes it
possible to combine multiple attributes in a search.
There are two limits that can be set for a program search, as part of the Program configuration.
Minimum number of attributes required to search: This property defines how many of the
non-unique attributes that must be entered before a search can be performed.
Configure programs in the Maintenance
app
Configure search for tracked entity type
295
Maximum number of tracked entity instances to return: This property defines the maximum
number of results a user will get in her search. If a too large number of tracked entity
instances is found, the user must provide a more specific search.
21.8.2. Configure search for tracked entity type
Note
TET = Tracked entity type
To be able to search without a program, you will have to make some of the TET attributes
searchable. Unique TET attributes will always be searchable.
1. Open Tracked entity type app
2. Open a Tracked entity type
3. If the TET has no attributes, add one
4. Set the attribute searchable
Searchable TET attributes will assigned to a search group.
Unique group. One group per unique TET attribute. Unique attributes cannot be combined
with other TET attributes in a search. The result from the search can only be 0 or 1 tracked
entity instance.
Non-unique group. This group contains all non-unique TET attributes and makes it possible
to combine multiple attributes in a search.
There are two limits that can be set for a TET search
Minimum number of attributes required to search: This property defines how many of the
non-unique attributes that must be entered before a search can be performed.
Maximum number of tracked entity instances to return: This property defines the maximum
number of results a user will get in her search. If a too large number of tracked entity
instances is found, the user must provide a more specific search.
21.8.3. Configure search organisation units for a user
To be able to search in other organisation units than the users data capture organisation units,
the user must be assigned with search organisation units. Giving a user a search organisation
unit will also give it access to search in all children of that organisation unit.
1. Open Users app
2. Click on a user
3. Open Assign search organisation units
4. Select organisation units
5. Click Save
21.9. Clone metadata objects
Cloning a data element or other objects can save time when you create many similar objects.
1. Open the Maintenance app and find the type of metadata object you want to clone.
2. In the object list, click the options menu and select Clone.
3. Modify the options you want.
4. Click Save.
Configure programs in the Maintenance
app
Delete metadata objects
296
21.10. Delete metadata objects
Note
You can only delete a data element and other data element objects if no data is
associated to the data element itself.
Warning
Any data set that you delete from the system is irrevocably lost. All data entry forms,
and section forms which may have been developed will also be removed. Make sure that
you have made a backup of your database before deleting any data set in case you need
to restore it at some point in time.
1. Open the Maintenance app and find the type of metadata object you want to delete.
2. In the object list, click the options menu and select Delete.
3. Click Confirm.
21.11. Change sharing settings for metadata objects
You can assign different sharing settings to metadata objects, for example organisation units
and tracked entity attributes. These sharing settings control which users and users groups that
can view or edit a metadata object.
Some metadata objects also allows you to change the sharing setting of data entry for the
object. These additional settings control who can view or enter data in form fields using the
metadata.
Note
The default setting is that everyone (Public access) can find, view and edit metadata
objects.
1. Open the Maintenance app and find the type of metadata object you want to modify.
2. In the object list, click the context menu and select Sharing settings.
3. (Optional) Add users or user groups: search for a user or a user group and select it. The user
or user group is added to the list.
4. Change sharing settings for the access groups you want to modify.
Can edit and view: The access group can view and edit the object.
Can view only: The access group can view the object.
No access (only applicable to Public access): The public won't have access to the object.
5. Change data sharing settings for the access groups you want to modify.
Can capture data: The access group can view and capture data for the object.
Can view data: The access group can view data for the object.
No access: The access group won't have access to data for the object.
6. Click Close.
21.12. Display details of metadata objects
1. Open the Maintenance app and find the type of metadata object you want to view.
2. In the object list, click the options menu and select Show details.
Configure programs in the Maintenance
app
Translate metadata objects
297
21.13. Translate metadata objects
DHIS2 provides functionality for translations of database content, for example data elements,
data element groups, indicators, indicator groups or organisation units. You can translate these
elements to any number of locales. A locale represents a specific geographical, political, or
cultural region.
Tip
To activate a translation, open the System Settings app, click > Appearance and
select a language.
1. Open the Maintenance app and find the type of metadata object you want to translate.
2. In the object list, click the options menu and select Translate.
Tip
If you want to translate an organisation unit level, click directly on the Translate icon
next to each list item.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
Configure programs in the Programs/
Attributes app (legacy app)
About programs
299
Chapter 22. Configure programs in the
Programs/Attributes app (legacy app)
Changes in how you configure programs from version
2.27
You create program indicators and program rules in the Maintenance app. It's
no longer possible to create program indicators and program rules in the legacy
Program / Attributes app.
You can create event programs (programs without registration) in the Maintenance
app. The old version of this functionality is also available in the legacy Program /
Attributes app.
22.1. About programs
There are three type of programs:
Multi events with registration program (MEWR):
Used for programs with many stages, for example Mother Health Program with stages such
as ANC Visit (2-4+), Delivery, PNC Visit.
Single event with registration program (SEWR):
Used for birth certificate and death certificate. This type of programs have only one stage.
An TEI just can enroll into the program one time.
Single event without registration program (anonymous program or SEWoR):
Used for saving health cases without registering any information into the system. This type
of programs have only one stage.
A program must be specified with only one tracked entity. Only tracked entity as same as the
tracked entity of program can enroll into that program.
A program needs several types of metadata that you create in the Program / Attributes and
Maintenance apps.
Table22.1.Program metadata objects in the Program / Attributes app
Object type Description Available functions
Program A program consist of
program stages.
Create, edit, share, delete,
assign to organisation units,
show details and translate
Program stage A program stage defines
which actions should be
taken at each stage.
Create, edit, change sort
order, delete, show details
and translate
Program stage section N/A Create, edit, change sort
order, delete, show details
and translate
Program indicator group A group of program
indicators
Create, edit, delete, show
details and translate
Validation rule A validation rule is based on
an expression which defines
Create, edit and delete
Configure programs in the Programs/
Attributes app (legacy app)
About programs
300
Object type Description Available functions
a relationship between data
element values.
Program notification Automated message
reminder
Set reminders to be
automatically sent to
enrolled tracked entity
instances before scheduled
appointments and after
missed visits.
Create, edit and delete
Program stage notification - Create, edit and delete
Design custom registration
form
- -
Table22.2.Program metadata objects in the Maintenance app
Object type Description Available functions
Event program A single event without
registration program
Create, edit, share, delete,
show details and translate
Program indicator An expression based on data
elements and attributes of
tracked entities which can
be used to calculate values
based on a formula.
Create, edit, share, delete,
show details and translate
Program rule Allows you to create and
control dynamic behavior
of the user interface in
the Tracker Capture and
Event Capture apps.
Create, edit, delete, show
details and translate
Relationship type Defines the relationship
between tracked entity A
and tracked entity B, for
example mother and child.
Create, edit, clone, delete,
show details and translate
Tracked entity Types of entities which
can be tracked through
the system. Can be
anything from persons to
commodities, for example a
medicine or a person.
A program must have one
tracked entity. And entity
registered must be specified
an tracked entity. To enrol a
tracked entity instance into a
program, the tracked entity
of an entity and tracked
entity of a program must be
the same.
Create, edit, clone, delete,
show details and translate
Tracked entity attribute Used to register extra
information for a tracked
entity.
Create, edit, clone, share,
delete, show details and
translate
Configure programs in the Programs/
Attributes app (legacy app)
Manage programs
301
Object type Description Available functions
Can be shared between
programs.
To learn how you create program metadata in the Maintenance app, see Configure programs
in the Maintenance app
22.2. Manage programs
22.2.1. Create a program
1. Open the Program / Attributes app and click Program.
2. Click Add new.
3. Enter program details:
a. Enter a program Name.
b. Enter a Short name.
c. Enter a Description of the program.
d. Select a Type.
e. Select a Tracked entity.
f. Select a Combination of categories.
g. Select a Data approval workflow.
h. Select if you want to Display front page list.
i. Select if First stage appears on registration page.
j. Enter number of Completed events expiry days.
Defines the number of days for which you can edit a completed event. This means that
when an event is completed and the specified number of expiry days has passed, the
event is locked.
Example22.1.
If you set "Completed events expiry days" to 10", an event is locked ten days after the
completion date. After this date you can no longer edit the event.
k. Select an Expiry period type and enter number of Expiry days.
The expiry days defines for how many days after the end of the previous period, an event
can be edited. The period type is defined by the expiry period type. This means that when
the specified number of expiry days has passed since the end date of the previous period,
the events from that period are locked.
Example22.2.
If you set the expiry type to "Monthly" and the expiry days to "10" and the month is
October, then you can't add or edit an event to October after the 10th of November.
4. Enter enrollment details:
a. Select if you want to Allow future enrollment dates.
b. Select if you want to Allow future incident dates.
c. If you want a tracked entity to be able to enroll only once in a program, select Only enroll
once (per tracked entity instance lifetime)
This setting is useful for example in child vaccination or post-mortem examination
programs where it wouldn't make sense to enroll a tracked entity more than once.
Configure programs in the Programs/
Attributes app (legacy app)
Assign a program to organisation units
302
d. Select if you want to Show incident date.
This setting allows you to show or hide the incident date field when a tracked entity enroll
in the program.
e. Enter a Description of incident date.
Example22.3.
In an immunization program for child under 1 year old, the incident date is the child's
birthday,
In a maternal program, the incident date is the date of last menstrual period.
f. Enter a Description of enrollment date.
Example22.4.
The date when a tracked entity is registered to the system.
g. Select if you want to Capture coordinates.
5. Enter relationship shortcut details:
a. Select a Relationship type.
Example22.5.
When a baby is born, you can register the baby and enroll him/her into the Child program
from the "Delivery" event of the mother. After that, create a relationship as Mother/Child
for this mother and the baby.
b. Enter a Shortcut link label.
The shortcut link label is displayed in Relation tab in the tracked entity instance (TEI)
dashboard.
c. Select Who is the new relative to the existing entity?.
d. Select the Program for new relative to be enrolled in.
Specify a program that new relatives of the tracked entity will be enrolled in
6. Select if you want to Skip generation of events that are overdue (before enrollment
date).
When a tracked entity enrolls into the program, the events corresponding to the program
stages are created. If you select this field, the system will not generate overdue events.
7. Assign tracked entity attributes.
a. In the list of Available attributes, double-click the attributes you want to assign to the
program.
b. For each assigned attribute, review the settings. You can select:
Display in list
This is the required field. Verify that at least one attribute has this property.
• Mandatory
Date in future
8. Click Add.
22.2.2. Assign a program to organisation units
1. Open the Program / Attributes app and click Program.
2. Click the program you want to modify and select Assign program to organisation units.
3. Select organisation units.
Configure programs in the Programs/
Attributes app (legacy app)
Edit programs
303
4. Click Save.
22.2.3. Edit programs
1. Open the Program / Attributes app and click Program.
2. Click the program you want to modify and select Edit.
3. Modify the options you want.
4. Click Update.
22.2.4. Change sharing settings for programs
To set the authority for sharing a program:
1. Open the Program / Attributes app and click Program.
2. Click the program you want to modify and select Sharing settings.
3. (Optional) Add a user group:
a. Search for a user group and select it.
b. Click the plus icon.
The user group is added to the list.
4. (Optional) If you want to allow external access, select External access (without login).
5. Change the settings for the user groups you want to modify.
None: The program is private. Only the user who created it can see and use it.
Can view: Everyone in the user group can view the program.
Can edit and view: Everyone in the user group can view and edit the program.
6. Click Save.
22.2.5. Delete programs
1. Open the Program / Attributes app and click Program.
2. Click the relevant program and select Remove.
3. Click OK to confirm.
22.2.6. Display programs
1. Open the Program / Attributes app and click Program.
2. Click the relevant program and select Show details.
22.2.7. Translate program names
1. Open the Program / Attributes app and click Program.
2. Click the relevant program and select Translate.
3. Select a locale.
4. Type a Name, Short name and Description.
5. Click Save.
Configure programs in the Programs/
Attributes app (legacy app)
Manage program stages
304
22.3. Manage program stages
22.3.1. About program stages
A program consist of program stages. A program stage defines which actions should be taken
at each stage.
22.3.2. Create a program stage
1. Open the Program / Attributes app and click Program.
2. Click the program you want to add a program stage to and select View program stages.
A list of existing stages for the selected program opens. If the program doesn't have any
program stages, the list is empty.
3. Click Add new.
4. Enter program stage details:
a. Enter a Name.
b. Enter a Description.
c. In the Scheduled days from start field, enter the minimum number of days to wait for
starting the program stage.
5. Enter repeatable program stage details.
a. Specify if the program stage is Repeatable or not.
b. Select a Period type.
c. Enter Standard interval days.
The number of days to repeat the repeatable program stage.
d. Clear Display generate event box after completed if you don't want to display Create
new event box to create new event for a repeatable stage after you click Complete for an
event of the stage in data entry form. This field is select by default.
6. Enter form details.
Table22.3.
Option Action
Auto-generate event Clear check box to prevent creating an
event of this program stage automatically
when a entity enroll in the program.
Open data entry form after enrollment Select check box to automatically open the
event of this stage as soon as the entity has
enrolled into the program.
Report date to use If you have selected the Open data entry
form after enrollment check box, also
select a Report date to use: Date of
incident or Date of enrollment.
This is the date used as report date for an
event that has been opened automatically.
If the Report date to use is
selected as one of those two ('incident
date'/'enrollment date'), in Dashboard, the
'Report date' of the event will be set as one
of those two.
Configure programs in the Programs/
Attributes app (legacy app)
Create a program stage
305
Option Action
Block entry form after completed Select check box to block the entry form
after completion of the event of this stage.
This means that the data in the entry form
can't be changed until you reset the status
to incomplete.
Ask user to complete program when
stage is completed
Select check box to trigger a pop-up which
asks the user if he/she wants to create the
event of next stage.
Ask user to create new event when
stage is complete
Select check box to trigger a pop-up which
asks the users if he/she wants to create a
new event of this stage when an event of
this stage is completed.
This property is active only if you have
selected Repeatable.
Generate events by enrollment date Check on it for auto-generating due dates
of events from program-stages of this
program based on the enrollment date. If it
is not checked, the due dates are generated
based on incident date.
Capture coordinates Select check box to capture an event's
coordinates.
Many types of events may be recorded at a
facility or be owned-by a health worker at a
facility, but actually take place somewhere
in the community.
Complete allowed only if validation
passes
Select check box to enforce that an event
created by this program stage is only
completed when all validation rules have
passed.
Pre-generate event UID Select check box to pre-generate unique
event id numbers.
Description of report date Type a description of the report date.
This description is displayed in the case
entry form.
7. Assign data elements:
a. In the list of Available data elements, double-click the data elements you want to assign
to the program stage.
b. For each assigned data element, review the properties. You can select:
Table22.4.
Option Description
Compulsory The value of this data element must
be filled into data entry form before
completing the event.
Allow provided elsewhere Specify if the value of this data element
comes from other facility, not in the facility
where this data is entered.
Configure programs in the Programs/
Attributes app (legacy app)
Create a program stage section
306
Option Description
Display in reports Display the value of this data element into
the single event without registration data
entry function.
Date in future Allow to select a date in future for date
data elements.
8. Click Add.
22.3.3. Create a program stage section
1. Open the Program / Attributes app and click Program.
2. Click the program you want to add a program stage section to and select View program
stages.
A list of existing stages for the selected program opens. If the program doesn't have any
program stages, the list is empty.
3. Click a program stage and select Section management.
4. Click Add new.
5. Enter a program stage section Name.
6. In the list of Available data elements, double-click the data elements you want to assign
to the program stage section.
7. In the list of Available indicators, double-click the indicators you want to assign to the
program stage section.
8. Click Add.
22.3.4. Change program stage sort order
1. Open the Program / Attributes app and click Program.
2. Click the relevant program and select View program stages.
A list of existing stages for the selected program opens. If the program doesn't have any
program stages, the list is empty.
3. Click Sort order.
4. Modify the order of the program stages with the up and down arrows.
5. Click Save.
22.3.5. Change program stage section sort order
1. Open the Program / Attributes app and click Program.
2. Click the relevant program and select View program stages.
A list of existing stages for the selected program opens. If the program doesn't have any
program stages, the list is empty.
3. Click a program stage and select Section management.
4. Click Sort order.
5. Modify the order of the program stage sections with the up and down arrows.
6. Click Save.
22.3.6. Edit program stages
1. Open the Program / Attributes app and click Program.
Configure programs in the Programs/
Attributes app (legacy app)
Display program stages
307
2. Click the relevant program and select View program stages.
A list of existing stages for the selected program opens. If the program doesn't have any
program stages, the list is empty.
3. Click the program stage you want to modify and select Edit.
4. Modify the options you want.
5. Click Update.
22.3.7. Display program stages
1. Open the Program / Attributes app and click Program.
2. Click the relevant program and select View program stages.
A list of existing stages for the selected program opens. If the program doesn't have any
program stages, the list is empty.
3. Click the program stage you want to display and select Show details.
22.3.8. Translate program stages
1. Open the Program / Attributes app and click Program.
2. Click the relevant program and select View program stages.
A list of existing stages for the selected program opens. If the program doesn't have any
program stages, the list is empty.
3. Click the program stage you want to modify and select Translate.
4. Select a locale.
5. Type a Name.
6. Click Save.
22.4. Manage program notifications
22.4.1. About program notifications
You can create program notifications for programs with registration and their program stages.
The notifications are sent either via the internal DHIS2 messaging system, via e-mail or via
text messages (SMS). You can use program notifications to, for example, send an automatic
reminder to a tracked entity 10 days before a scheduled appointment. You use the program’s
tracked entity attributes (for example first name) and program parameters (for example
enrollment date) to create a notification template.
In the Parameters field, you'll find a list of available tracked entity attributes and the following
program parameters:
Table22.5.
Notification type Variable name Variable code
Program Current date V{current_date}
Days since enrollment date V{days_since_enrollment_date}
Enrollment date V{enrollment_date}
Incident date V{incident_date}
Configure programs in the Programs/
Attributes app (legacy app)
Create a program notification
308
Notification type Variable name Variable code
Organisation unit name V{org_unit_name}
Program name V{program_name}
Program stage Current date V{current_date}
Days since due date V{days_since_due_date}
Days until due date V{days_until_due_date}
Due date V{due_date}
Organisation unit name V{org_unit_name}
Program name V{program_name}
Program stage name V{program_stage_name}
22.4.2. Create a program notification
1. Open the Program / Attributes app and click Program.
2. Click the relevant program and select View program notifications.
A list of existing program notifications for the selected program opens. If the program doesn't
have any program notifications, the list is empty.
3. Click Add new.
4. Enter a Name.
5. In the Trigger by field, select what should trigger the notification.
Configure programs in the Programs/
Attributes app (legacy app)
Create a program notification
309
Table22.6.
Trigger Description Note
Program enrollment The program notification is
sent when the TEI enrols in
the program.
-
Program completion The program notification is
sent when the program of
TEI is completed
-
Days scheduled (incident
date)
The program notification is
sent XX number of days
before or after the incident
date
You need to enter the
number of days before or
after the scheduled date
that the notification will be
send.
Days scheduled (enrollment
date)
The program notification
is sent XX number of
days before or after the
enrollment date
You need to enter the
number of days before or
after the scheduled date
that the notification will be
send.
6. In the Recipients field, select who should receive the program notification.
Table22.7.
Recipient type Description Note
Tracked entity instance Receives program
notifications via e-mail or
text message.
To receive a program
notification, the recipient
must have an e-mail
address or a phone number
attribute.
Organisation unit contact Receives program
notifications via e-mail or
text message.
To receive a program
notification, the receiving
organisation unit must have
a registered contact person
with e-mail address and
phone number.
Users at organisation unit: All users registered to
the selected organisation
unit receive program
notifications via the internal
DHIS2 messaging system.
-
User group All members of the
selected user group receive
the program notifications
via the internal DHIS2
messaging system
-
7. Create the Subject template.
Double-click the parameters in the Parameters field to add them to your subject.
Note
The subject is not included in text messages.
8. Create the Message template.
Configure programs in the Programs/
Attributes app (legacy app)
Create a program stage notification
310
Double-click the parameter names in the Parameters field to add them to your message.
Example22.6.
Dear A{w75KJ2mc4zz}, You're now enrolled in V{program_name}.
9. Click Save.
Note
You configure when the program notifications are sent in the Data Administration app
> Scheduling > Program notifications scheduler.
Click Run now to send the program notifications immediately.
Select a time and click Start to schedule the program notifications to be send at a
specific time.
22.4.3. Create a program stage notification
1. Open the Program / Attributes app and click Program.
2. Click the relevant program and select View program stages.
3. Click the relevant program stage and select View program stage notifications.
A list of existing program stage notifications for the selected program stage opens. If the
program stage doesn't have any program stage notifications, the list is empty.
4. Click Add new.
5. Enter a Name.
6. In the Trigger by field, select what should trigger the notification.
Table22.8.
Trigger Description Note
Program stage completion The program stage
notification is sent when the
program stage is completed
-
Days scheduled (due date) The program stage
notification is sent XX
number of days before or
after the due date
You need to enter the
number of days before or
after the scheduled date
that the notification will be
send.
7. In the Recipients field, select who should receive the program stage notification. You can
select:
Table22.9.
Recipient type Description Note
Tracked entity instance Receives program
notifications via e-mail or
text message.
To receive a program stage
notification, the recipient
must have an e-mail
address or a phone number
attribute.
Organisation unit contact Receives program
notifications via e-mail or
text message.
To receive a program stage
notification, the receiving
organisation unit must have
a registered contact person
Configure programs in the Programs/
Attributes app (legacy app)
Manage custom registration forms
311
Recipient type Description Note
with e-mail address and
phone number.
The system selects the
same organisation unit as
where the event took place.
Users at organisation unit: All users registered to
the selected organisation
unit receive program
notifications via the internal
DHIS2 messaging system.
-
User group All members of the
selected user group receive
the program notifications
via the internal DHIS2
messaging system
-
8. Create the Subject template.
Double-click the parameter names in the Parameters field to add them to your subject.
Note
The subject is not included in text messages.
9. Create the Message template.
Double-click the parameter names in the Parameters field to add them to your message.
Example22.7.
Dear A{w75KJ2mc4zz}, please come to your appointment the V{due_date}.
10.Click Save.
Note
You configure when the program stage notifications are sent in the Data
Administration app > Scheduling > Program notifications scheduler.
Click Run now to send the program notifications immediately.
Select a time and click Start to schedule the program notifications to be send at a
specific time.
22.5. Manage custom registration forms
22.5.1. About program custom registration forms
You can create custom registration form for each available program in system or for normal
registration form which is used to register any entity without having program information and
this entity can enroll into a certain program after that.
Note
Check on Auto save registration form check box in Design tracked entity form to save
the custom registration form to being designed automatically.
Configure programs in the Programs/
Attributes app (legacy app)
About program stage data entry forms
312
22.5.2. About program stage data entry forms
A program stage has three types of data entry forms:
1. Custom data entry form: Define a data entry form as HTML page. Click on the program stage
which you would like and select to define custom data entry form. The system supports to
define a custom entry form with multi stages. So this form can be re-used in other stages
of the same program.
2. Section data entry form: Group some data elements which belong to the program stage as
sections and display data elements by each section. Click on the program stage which you
would like and select Section management link to define section data entry form.
3. Default data entry form: List all data elements which belong to the program stage.
22.5.3. Create a custom program registration form
1. Open the Program / Attributes app and click Program.
2. Click the program you want to add a custom registration form to and select Design custom
registration form.
3. Enter a Name.
4. Create the form in the built-in WYSIWYG HTML editor. If you select Source, you can paste
HTML code directly in the editing area. You can also insert images.
5. Click Save.
22.5.4. Create a program stage data entry form
1. Open the Program / Attributes app and click Program.
2. Click the program you want to add a program stage data entry form to and select View
program stages.
A list of existing stages for the selected program opens. If the program doesn't have any
program stages, the list is empty.
3. Click the program stage you want to add a program stage entry form to and select Design
data entry form.
4. Enter a Name.
5. Create the form in the built-in WYSIWYG HTML editor. If you select Source, you can paste
HTML code directly in the editing area. You can also insert images.
6. Click Save.
About sharing of objects Sharing of objects
313
Chapter 23. About sharing of objects
This chapter discusses the sharing of entities feature in DHIS2.
23.1. Sharing of objects
Many objects in DHIS2, like reports, charts, maps and indicators, can be shared. DHIS supports
sharing of metadata or sharing of data. Sharing of metadata means making an object, like a
report, available for reading or modification to a group of users or to everyone. Sharing of data
means making the actual data captured available to others, and controlling who can capture
that kind of data. For instance for reports, the sharing dialog can be opened by clicking on the
"Sharing settings" button next to each report in the list. Implementers can use this feature to
allow access to certain objects to only certain user groups. Users can use the feature to decide
who they would like to share objects (such as pivot tables, charts, dashboards, etc) with.
If sharing is supported for a particular class of objects, a dialog will be available called "Sharing
settings", usually available by clicking on the name of the object or in the analytics tools,
through an icon (Share with other people). Once you have accessed the sharing settings for
the object you wish to share, a dialog similar to the one below will be shown.
The new sharing dialog
You can share your report with everyone or with a number of user groups. "External access"
can be enabled to allow this resource to be shared with everyone, including users which cannot
logon to DHIS2. This is useful for sharing public resources with external systems. Note, that if
objects are shared externally, then they are visible to anyone who has access to the URL which
provides the resource without any login credentials.
Next to "Public access" you can choose your public access option under "METADATA": "No
access", "Can view only" or "Can edit and view", and under "DATA": "No access", "Can view
data", "Can capture data". Public access refers to users which are logged into the system. Edit
also implies deleting the report.
To share with a group, simply start typing the name of the group and the "Search for user
groups" input field and select your desired group. Click on the "+" icon next to the input field
to share with that group. For each group you can set an access option, similar to public access.
Sharing with a user group implies that all users in that group will get access to the shared
object. To create a user group you can go to the dashboard module and click on "Groups".
About sharing of objects Metadata sharing and access control
314
This will lead you to the list of groups where you can click "Add new" in the top right corner.
Creating user groups is open for everyone from the dashboard module.
23.2. Metadata sharing and access control
The objects which support metadata sharing are indicator, indicator group, indicator group set,
data dictionary, data set, program, standard report, resource, report table, chart, map and user
group. Out of those objects, report table, chart, map and user group are open for everyone to
create privately. Private means that the objects are available only to yourself or potentially to
a number of user groups if you choose to share the object. These objects are referred to as
"open" objects and can be created by all users. The remaining objects require that your user
account has the authority to create them. These objects are referred to as "non-open" objects.
A user can be granted the authority to create publicly accessible objects or privately accessible
objects. In order to create a publicly accessible object (available for viewing or editing by
anyone) your user account must have the authority to do so. As an example, to create a
publicly accessible chart, your user must have the "Create public chart" authority granted. The
authority to create private objects applies only to non-open objects. For example, to allow a
user to create indicators which will only be accessible to that user and not to everyone, the
user can be issued with the "Create private indicator" authority.
Sharing a non-open object with another person and let her edit the object requires that the
person's user account has the authority for updating that type of objects granted. For instance,
if you want to let another person edit your indicator, that person's user account must have the
"Update indicator" authority granted. This does not apply for open objects.
When you create a new object it will automatically become viewable for everyone if your user
account has the authority to create public objects. As an example, if you create a standard
report and you have the "Create public standard report" authority granted, the report will
become viewable for everyone. If you do not have that authority granted the report will be
viewable only to yourself. After you have created an object, you may navigate to the "Sharing
settings" dialog and set your desired access control level.
If you need a user account which is able to view absolutely all objects you can create a user
role with the "ALL" authority and assign a user to that role. If you need to switch between a
"complete" view of objects and a "personal" view of objects it is recommended to create two
user accounts, one assigned with the "ALL" authority and one without.
23.3. Metadata sharing applied
The metadata sharing functionality is useful in several scenarios. One use-case is setting up
a DHIS2 instance for a global organisation with operations in multiple countries. Typically the
organisation has a set of global data sets, indicators and reports which should apply to all
countries, while all countries will have the need for country-specific data sets, indicators and
reports. In this scenario the following approach could work:
Set up one user group for global personnel.
Set up a user group for personnel in each country.
Create global data sets and reports, make them viewable for everyone and editable for the
global user group only.
Create country-specific data sets and reports, make them viewable and editable for the
country user group and the global user group only.
This way, the global indicators and reports could be viewed and analysed by everyone, but
maintained by the global user group only. The country-specific data sets, indicators and reports
could be viewed and maintained by the country and global personnel, without being visible or
impacting the system for other countries in the organisation.
About sharing of objects Data sharing and access control
315
A similar approach could work for a scenario with a donor, multiple funding agencies and
implementing partners in a country, where user groups could be set up for each of those
entities. That way each implementing partner could create and share their reports within their
organisation without affecting or allowing access to others. Reports could also be shared with
supervisors and funding agencies at the end of reporting periods.
Another use-case is a country department of health with multiple health programs. Typically
there is a need for having general reports and charts for the department while allowing the
health programs to develop specific reports and charts for internal use. This can be achieved
by creating user groups for each health program. Later, when developing reports and charts,
these can be made viewable and editable to the program user group only. This way the reports
will not be visible to other programs and users. This is beneficial because the reports are kept
internal to the program and because the visible list of reports of other users are kept shorter
and more relevant.
23.4. Data sharing and access control
The objects which support data sharing are data set, tracked entity type, program and program
stage. The purpose of data sharing is to control which users can capture data, and which users
can see the data captured.
23.4.1. Data sharing for event based programs
Applies to the object types of tracked entity type, program and program stage. When working
with single event programs in event capture, a user will have to possess the "DATA:Can view
data" sharing level to see the program and its data. Without this sharing level, the program
and its data will not be visible to the user. When working with tracker programs in tracker
capture, the user will need to have "DATA:Can view data" to both the tracked entity type and
program. In case of a tracker program, the user will also need "DATA:Can view data" on each
program stage individually to be able to see the data within the program. To capture data the
user needs the "DATA:Can capture data" sharing level.
Note
To see and capture data for a program, a data capture user also needs to report for an
organisaction unit to where the program has been assigned.
Table23.1.Data sharing for tracker programs
Object
type
Can view data Can capture data Comment
Tracked
entity
type
Search for tracked
entities with this tracked
entity type.
See tracked entity type
attribute values for this
tracked entity type.
Edit visible tracked
entity attributes for
tracked entity instances
of this type.
Register/create new
tracked entity instances
of this type.
Delete tracked entity
instances of this type.
• Deactivate/reactivate
tracked entity instances
of this type.
About sharing of objects Data sharing for data sets
316
Object
type
Can view data Can capture data Comment
Program Search for tracked
entities within this
program.
See tracked entity
attributes specific to this
program.
See enrollment details
for the program.
See notes for the
enrollment.
Enroll into the program.
Edit enrollment details
for the program.
• Complete/reopen
enrollments into the
program.
Add notes for the
program.
Edit relationships for the
program.
Send message to
tracked entity instance.
Delete enrollments in
the program.
Both "Can view
data" and "Can
capture data" also
requires the user
to have "Can
view data" for
the tracked entity
type.
Program
stage
See the program stage
and its events and data
within an enrollment.
See the program stage
notes.
Add/schedule/refer a
new event within the
program stage.
Complete/reopen the
events within the
program stage.
Edit tracked entity data
values within events in
the program stage.
Add notes for events in
the program stage.
Delete events in the
program stage.
Both "Can view
data" and "Can
capture data" also
requires the user
to have "Can
view data" for
the program and
the tracked entity
type.
Table23.2.Data sharing for single event programs
Object
type
Can view data Can capture data Comment
Program See list of events within
the program.
See tracked entity data
values for events in the
program.
Add new events into the
program.
Edit data for events in
the program.
Delete events in the
program.
23.4.2. Data sharing for data sets
Applies to the object types of data set. When working with data sets, the user will need to have
"DATA:Can capture data" to both see and capture data in the data set.
Note
To see and capture data for a data set, a data capture user also needs to report for an
organisaction unit to where the data set has been assigned.
About sharing of objects Data sharing for data sets
317
Table23.3.Data sharing for data sets
Object
type
Can view data Can capture data Comment
Data set See data for the data
set.
Add/edit data sets.
Data Administration Data integrity
319
Chapter 24. Data Administration
The data administration module provides a range of functions to ensure that the data stored
in the DHIS2 database is integral and that the database performance is optimised. These
functions should be executed on a regular basis by a data administrator to ensure that the
quality of the data stored is optimal.
24.1. Data integrity
DHIS2 can perform a wide range of data integrity checks on the data contained in the database.
Identifying and correcting data integrity issues is extremely important for ensuring that the
data used for analysis purposes is valid. Each of the data integrity checks that are performed by
the system will be described, along with general procedures that can be performed to resolve
these issues.
24.1.1. Data elements without data set
Each data element must be assigned to a data set. Values for data elements will not be
able to be entered into the system if a data element is not assigned to a data set. Choose
Maintenance->Datasets->Edit from the main menu and then add the "orphaned" data element
to the appropriate data set.
24.1.2. Data elements without groups
Some Data Elements have been allocated to several Data Element Groups. This is currently
not allowed, because it will result in duplication of linked data records in the analytics record
sets that provide aggregated data. Go to Maintenance -> Data Element Groups to review each
Data Element identified and remove the incorrect Group allocations.
24.1.3. Data elements violating exclusive group sets
Some data elements have been allocated to several data element groups that are members
of the same data element group set. All group sets in DHIS2 are defined as exclusive, which
means that a data element can only be allocated to one data element group within that group
set. Go to Maintenance -> Data elements and indicators ->Data element groups to review each
data element identified in the integrity check. Either remove the data element from all groups
except the one that it should be allocated to, or see if one of the groups should be placed in
a different group set.
24.1.4. Data elements in data set but not in form or sections
Data elements have been assigned to a data set, but have not been assigned to any sections
of the data set forms. All data sets which use section forms, should generally have all data
elements in the data set assigned to exactly one section of the dataset.
24.1.5. Data elements assigned to data sets with different period types
Data elements should not be assigned to two separate data sets whose period types differ.
The recommended approach would be to create two separate data elements (for instance a
monthly and yearly data element) and assign these to respective datasets.
Data Administration Data sets not assigned to organisation
units
320
24.1.6. Data sets not assigned to organisation units
All data sets should be assigned to at least one organisation unit.
24.1.7. Sections with invalid category combinations
Data sets which use section forms should only have a single category combination within
each section. This violation could result from assigning a data element to a section, but then
changing the category combination of this data element at a later point in time.
24.1.8. Indicators with identical formulas
Although this rule will not affect data quality, it generally does not make sense to have two
indicators with the exact same definition. Review the identified indicators and their formulas
and delete or modify any indicator that appears to be the duplicate.
24.1.9. Indicators without groups
All data elements and indicators must be assigned to at least one group, so these Indicators
need to be allocated to their correct Data Element and Indicator Group. From the main menu,
go to Data elements/Indicators -> Indicator Groups, and allocate each of the `Orphaned`
indicators to its correct group.
24.1.10. Invalid indicator numerators
Violations of this rule may be caused by an incorrect reference to a deleted or modified data
element. Review the indicator and make corrections to the numerator definition.
24.1.11. Invalid indicator denominators
Violations of this rule may be caused by an incorrect reference to a deleted or modified data
element. Review the indicator and make corrections to the denominator definition.
24.1.12. Indicators violating exclusive group sets
Some indicators have been allocated to several indicator groups that are members of the same
indicator group set. All group sets in DHIS2 are defined as exclusive, which means that an
indicator can only be allocated to one indicator group within that group set. Go to Maintenance
-> Data elements and indicators ->Indicator groups to review each indicator identified in the
integrity check. Either remove the indicator from all groups except the one that it should be
allocated to, or see if one of the groups should be placed in a different group set.
24.1.13. Duplicate periods
If periods have been imported from external applications, it may be possible that some periods
will be duplicated. If you have any periods which appear to be duplicated here, you will need to
resolve these directly in the DHIS2 database. All data which has been assigned to the duplicated
period, should be moved to the correct period, and the duplicate period should be removed.
Data Administration Organisation units with cyclic references
321
24.1.14. Organisation units with cyclic references
Organisation units cannot be both parent and children of each other, directly nor indirectly. If
this situation occurs, you will need to resolve the cyclic reference directly in the DHIS2 database
in the "organisation unit" table, by reassigning the "parentid" field of the organisation units.
24.1.15. Orphaned organisation units
All organisation units must exist within the organisation unit hierarchy. Go to Organisation-
units >Hierarchy Operations and move the offending organisation unit into the proper position
in the hierarchy.
24.1.16. Organisation units without groups
All organisation units must be allocated to at least one group. The problem might either be that
you have not defined any compulsory OrgUnit Group Set at all, or that there are violations of the
compulsory rule for some OrgUnits . NOTE: If you have defined no compulsory OrgUnit Group
Sets, then you must first define them by going to Organisation units->Organisation unit group
sets and define at least one compulsory Group Set (the group set 'Type' are nearly universally
relevant). If you have the relevant group sets, go to Maintenance -> OrgUnit Groups to review
each OrgUnit identified and add the relevant Group allocation.
24.1.17. Organisation units violating compulsory group sets
These organisation units have not been assigned to the any organisation unit group within one
of the compulsory organisation unit group sets. When a group set is defined as compulsory,
it means that an organisation unit must be allocated to at least one organisation unit group
within that group set. For instance, all organisation units must belong to one of the groups in
the 'Type' group set. It might belong to the `Hospital` or the `Clinic` or any other 'type' group -
but it must belong to exactly one of them. Go to Organisation units->Organisation unit groups
to review each organisation unit identified in the integrity check. Allocate all organisation units
to exactly one compulsory group.
24.1.18. Organisation units violating exclusive group sets
Some organisation units have been allocated to several organisation unit groups that are
members of the same organisation unit group set. All group sets in DHIS2 are defined as
exclusive, which means that an organisation unit can only be allocated to one organisation unit
group within that Group Set. For instance, one organisation unit cannot normally belong to the
both the 'Hospital' and 'Clinic' groups , but rather to only to one of them. Go to Organisation unit-
>Organisation unit groups to review each organisation unit identified in the integrity check.
Remove the organisation units from all groups except the one that it should be allocated to.
24.1.19. Organisation unit groups without group sets
The organisation unit groups listed here have not been allocated to a group set. Go to
Maintenance->Organisation unit->Organisation unit group sets and allocate the Organisation
unit group to the appropriate group set.
24.1.20. Validation rules without groups
All validation rules must be assigned to a group. Go to Maintenance app > Validation rule
group and assign the offending validation rule to a group.
Data Administration Invalid validation rule left side
expressions
322
24.1.21. Invalid validation rule left side expressions
An error exists in the left-side validation rule definition. Go to Maintenance app > Validation
rule and click Edit on the offending rule. Click Left side and make the required corrections.
24.1.22. Invalid validation rule right side expressions
An error exists in the right-side validation rule definition. Go to Maintenance app > Validation
rule and click Edit on the offending rule. Click Right side and make the required corrections.
24.2. Maintenance
Table24.1.Data maintenance functions in the Data Administration app
Function Description
Clear analytics tables Completely empties the analytics tables.
These tables are used to generate aggregate
data for the pivot tables, GIS and reports.
Remove zero data values Removes zero data values from the
database. Values registered for data
elements with aggregation operator average
is not removed, as such values will be
significant when aggregating the data,
contrary to values registered for data
elements with aggregation operator sum.
Reducing the number of data values will
improve system performance.
Permanently remove soft deleted data
values
When a data value is deleted in DHIS2,
the system will mark the corresponding
database row as deleted, and not actually
delete the row.
Running this maintenance function will
physically remove these data value rows
from the database.
Prune periods Removes all periods which have no
registered data values. Reducing the number
of periods will improve system performance.
Remove expired invitations Will delete users which represent user
account invitations that now have gone past
their expiry date.
Drop SQL views DHIS2 lets you set up and manage SQL
views as system objects with corresponding
database SQL views.
Running this maintenance function will drop
underlying SQL views for all system views.
Use the Create SQL views function to
recreate these SQL views.
Create SQL views Recreates all SQL views in the database.
Update category option combinations Rebuilds the category option combinations.
This may be required after altering the
Data Administration Resource tables
323
Function Description
category options which belong to a given
category.
Update organisation unit paths The organisation unit table in the DHIS2
database has a column "path" which
contains a concatenated string of all
ancestors in the hierarchy for each
organisation unit.
Running this maintenance function will
update and ensure that these values are
in sync with the current organisation unit
hierarchy. This column is managed by DHIS2,
but a manual update might be useful when
doing data loading directly in the database.
Clear application cache Clears the system cache.
Reload apps Manually reloads and detects installed DHIS2
apps.
The installed apps are also detected when
the system starts and when installing or
uninstall apps.
24.3. Resource tables
Resource tables are supporting tables that are used during analysis of data. One would typically
join the contents of these tables with the data value table when doing queries from third-party
applications like Microsoft Excel. They are also used extensively by the analysis modules of
DHIS2. Regeneration of the resource tables should only be done once all data integrity issues
are resolved. The resource tables are also generated automatically, every time the analytics
process is run by the system.
Organisation unit structure (_orgunitstructure)
This table should be regenerated any time there have been any changes made to the
organisational unit hierarchy. This table provides information about the organisation unit
hierarchy. It has one row for each organisation unit, one column for each organisation unit
level and the organisation unit identifiers for all parents in the lineage as values.
Data element group set structure (_dataelementgroupsetstructure)
This table provides information about which data elements are members of which data
element group sets. The table has one row for each data element, one column for each data
element group set and the names of the data element group as values.
Indicator group set structure (_indicatorgroupsetstructure)
This table provides information about which indicators are members of which indicator group
sets. The table has one row for each indicator, one column for each indicator group set and
the names of the indicator group as values.
Organisation unit group set structure (_organisationunitgroupsetstructure)
This table provides information about which organisation units are members of which
organisation unit group sets. The table has one row for each organisation unit, one column
for each organisation unit group set and the names of the organisation unit groups as values.
Category structure (_categorystructure)
Data Administration Locale Management
324
This table provides information about which data elements are members of which categories.
The table has one row for each data element, one column for each category and the names
of the category options as values.
Data element category option combo name (_categoryoptioncomboname)
This table should be regenerated any time there have been changes made to the category
combination names. It contains readable names for the various combinations of categories.
Data element structure (_dataelementstructure)
This table provides information about all data elements and which period type (frequency)
they capture data at. The period type is determined through the data set membership and
hence relies on data elements to be member of data sets with similar period types to have
a defined behavior.
Period structure (_dataperiodstructure)
This table provides information about all periods and which period type they are associated
with. For each period type with lower frequency than itself, it contains information about
which period it will fall within.
Data element category option combinations (_dataelementcategoryoptioncombo)
This table provides a mapping between data elements and all possible category option
combinations.
24.4. Locale Management
It is possible to create custom locales in DHIS2. In addition to the locales available through the
system, you might want to add a custom locale such as "English" and "Zambia" to the system.
This would allow you to translate metadata objects to local languages, or to account for slight
variants between countries which use a common metadata definition.
The locale is composed of a language along with a country. Select the desired values and press
"Add". This custom locale will now be available as one of the translation locales in the system.
24.5. SQL View
The SQL View functionality of DHIS2 will store the SQL view definition internally, and then
materialize the view when requested.
Database administrators must be careful about creating database views directly in the DHIS
2 database. For instance, when the resource tables are generated, all of them will first be
dropped and then re-created. If any SQL views depend on these tables, an integrity violation
exception will be thrown and the process will be aborted.
The SQL views are dropped in reverse alphabetical order based on their names in DHIS2,
and created in regular alphabetical order. This allows you to have dependencies between SQL
views, given that views only depend on other views which come earlier in the alphabetical
order. For instance, "ViewB" can safely depend on "ViewA". Otherwise, having views depending
on other view result in an integrity violation error.
Data Administration Creating a new SQL view
325
24.5.1. Creating a new SQL view
To create a new SQL view, click Apps > Data administration >SQL view and click Add new.
The "Name" attribute of the SQL view will be used to determine the name of the table that
DHIS2 will create when the view is materialized by the user. The "Description" attribute allows
one to provide some descriptive text about what the SQL view actually does. Finally, the "SQL
statement" should contain the SQL view definition. Only SQL "SELECT" statements are allowed
and certain sensitive tables (i.e. user information) are not accessible Press "Save" to store the
SQL view definition.
24.5.2. SQL View management
In order to utilize the SQL views, simply click the view and from the context menu, choose
"Execute query". Once the process is completed, you will be informed that a table has been
created. The name of the table will be provided, and is composed from the "Description"
attribute provided in the SQL view definition. Once the view has been generated, you can view
it by clicking the view again, and selecting "Show SQL View".
Tip
If you have a view which depends on another view, you should be careful about how the
views are named. When analytics is run on the DHIS2 server, all views must be dropped,
and are recreated. When analytics starts, the views are dropped in alphabetical order,
and then recreated in reverse alphabetical order. Thus, if view A depends on view B, it
must appear before view B in alphabetical order. If it appears after view B in alphabetical
order, analytics may fail, as the view with dependencies will not be dropped in the correct
order.
24.6. Duplicate data elimination
This function is useful when data has been entered mistakenly for two data elements which
represents the same phenomena.
Start by selecting the data element to eliminate from the list and click confirm. Then select the
data element to keep and click confirm again. Finally, verify the selection and click merge.
In the situation where data exists for the data element to eliminate and not for the one to
keep, the data will be moved to the one to keep. When data exists for both data elements,
the data which was updated last will be used. When data exists only for the one to keep, no
action will be taken. The data element to eliminate will eventually be deleted, except when it
is a multidimensional data element and has other data registered.
Data Administration Data statistics
326
24.7. Data statistics
The data statistics module provides an overview of the number of objects stored in the DHIS2
database.
The total number of each type of object is presented in a series of tables with summary
statistics of each object.
24.8. Lock exceptions
Lock exceptions provide fine-grained control over exemption from a locked data set. After the
expiry of the data set, data entry will be denied by default, unless an exception has been
granted through the Lock exception interface. To enable a lock exception, select the desired
organization units, data sets, and time period and press "Add". By granting a lock exception,
data entry will be enabled even after the expiry period of the data set has passed.
Data Administration Min-Max Value Generation
327
In the example above, a data lock exception would be created for "ab Abundant Life
Organization" and "ab Seventh Day Hospital" for the "Care and Support" dataset for "February
2012".
24.9. Min-Max Value Generation
This administrative function can be used to generate min-max values, which are used as part
of the data quality and validation process for specific organization units and data sets. Simply
select the dataset from the left hand frame, and then select the required organisation units to
generate the min-max values for from the organisational units selector on the right. Press the
"Generate" button to generate or regenerate all min-max values. Press "Remove" to remove
all min-max values which are currently stored in the database.
24.10. Cache Statistics
This option is for system administrators only to use. The cache statistics shows the status of
the application level cache. The application level cache refers to the objects and query results
that the application is caching in order to speed up performance. If the database has been
modified directly the application cache needs to be cleared for it to take effect.
24.11. Scheduling
The Scheduler is an application for managing background jobs in DHIS2. Background jobs can
do a number of tasks, such as running analytics, synchronizing data and meta data, or sending
a push analysis report. The application provides the ability to create, modify and delete such
jobs.
Data Administration Creating a job
328
The Scheduler comes bundled with DHIS2 and is accessed through the App Menu.
The start page of the Scheduler app shows an overview of existing jobs. By default, pre-defined
system jobs are hidden. To view these, toggle Show system jobs in the top right corner.
When you create or modify a job, it will be rescheduled according to selected preferences. To
run a job on demand, press the green triangle labeled "Run now". This action is only available
for enabled jobs.
24.11.1. Creating a job
1. Open the Scheduler app and click the add button in the bottom right corner.
2. Choose a suitable Name for the new job.
3. Select a running frequency for the job, i.e. when and how often the job should run.
a. You can either select a pre-defined frequency from the dropdown-menu, or ...
b. You can give the job a custom Cron expresssion if you want a specific schedule.
c. Enabling the Continuous execution option will make the job run constantly. In other
words, as soon as the job finishes, it will be scheduled to run again right away. Selecting
this option will disable the other fields.
4. Select the Job type you want to schedule using the dropdown-menu.
5. If the job type is customizable, a Parameters section will appear below. These additional
options specify the details of the scheduled job, and will vary greatly depending on the job
type.
6. Press the Add job button to confirm the job creation. The newly created job should now be
listed in the job overview, given that the Show system jobs setting is not enabled.
Data Administration Configuring a job
329
Jobs are enabled by default.
24.11.2. Configuring a job
With the proper permissions, you can modify the details of user-created jobs. Note that for
system jobs, only the schedule (cron expression) can be changed.
To quickly enable or disable a user created job from running, use the Enabled column on the
landing page of the Scheduler app. System jobs are always enabled.
Further configuring a job:
1. Select a job from the landing page to unveil the Attributes and change them to accordingly.
See the previous section for scheduling details.
2. If the job type supports extra options, the Parameters section will also be available.
3. When done, press the Save changes button to persist the changes.
24.11.3. Deleting a job
1. Select the job you want to delete.
2. Press the Delete button in the bottom right corner.
3. Confirm by pressing Delete again in the popup window.
24.12. Data synchronization
DHIS2 provides a feature for synchronizing data being captured on the local instance with
a another, remote instance of DHIS2. This can be useful e.g. when you have deployed
multiple stand-alone instances of DHIS2 which are required to submit data values to a central
DHIS2 instance. Till now only aggregate data was being synced. Starting from 2.24 even non
anonymous events data (line list) will also be synced.
These are the steps to enable data synchronization:
Data Administration Metadata Synchronization Scheduling
330
Go to Settings > Synchronization, enter the remote server URL, username and password and
click Save. You can test your settings by clicking on the "Test settings" link.
Go to Data administration > Scheduling. Under Data synchronization set strategy to Enabled,
and click Start.
Some aspects of the data synchronization feature to be aware of:
The local DHIS2 instance will store the password of the user account on the remote
instance encrypted in the local database. The remote account is used for authentication
when transferring data. For security purposes make sure you set the "enryption.password"
configuration parameter in hibernate.properties to a strong password.
Deploying the remote server on SSL/HTTPS is strongly recommended as the username and
password are sent in clear text using basic authentication and could be intercepted by an
attacker.
The data synchronization uses the UID property of data elements, category option combos
and organisation units to match the meta-data. Hence the synchronization is dependent on
these three meta-data objects being harmonized on the local and remote instance in order
to work appropriately.
The very first time DHIS2 attempts to synchronize data the system will include data entered
during the last three days. For the subsequent attempts the system will store the time of the
last successful data synchronization and only include data saved or edited since that time. A
synchronization job is considered successful only if data was submitted, authenticated and
saved successfully on the remote server,.
The system will attempt a synchronization every minute. If the local server does not have a
working Internet connection at the time, the synchronization will be silenly aborted and re-
attempted after a minute.
You can see the time of last successful synchronization with remote server in the scheduling
screen next to the "Last success" label.
24.13. Metadata Synchronization Scheduling
DHIS2 provides a feature for synchronizing meta data from a remote instance to a local instance
of DHIS2. This can be useful when you have deployed multiple stand-alone instances of DHIS2
and you need to create meta data in all the local instances similar to the central DHIS2 instance.
These are the steps to enable meta data synchronization:
Go to Settings > Synchronization, enter the remote server URL, username and password and
click Save.
Go to Metadata administration > Scheduling. Under Metadata synchronization set strategy
to Enabled, select the time-period and click Start.
Some aspects of the meta data synchronization feature to be aware of:
The local DHIS2 instance will store the password of the user account of the remote instance
in its database. The remote user account is used for authentication when transferring/
downloading data. For security purposes make sure you set the "encryption.password"
configuration parameter in hibernate.properties to a strong password.
Deploying the remote server on SSL/HTTPS is strongly recommended as the username and
password are sent in clear text using basic authentication and could be intercepted by an
attacker.
Also ensure that the remote user is not having ALL authority, instead simply create a user with
F_METADATA_MANAGE authority so that even if these details are intercepted by a hacker,
one cannot have full control of the remote system.
The meta data synchronization relies on the underlying import layer. Each meta data version
is an export of meta data between two given timestamps. Each sync of meta data version is
Data Administration Metadata Synchronization Scheduling
331
an attempt to import that meta data snapshot into the local instance. The sync of versions is
incremental. The local instance will try to download the meta data versions from the central
instance one after the other. Failure to sync a specific meta data version will not let the sync
proceed to further versions. In case of failures, appropriate changes must be made to meta
data at central to ensure that the error gets resolved. Metadata configuration is critical and
the configurator should be careful while rolling out the updates to the production. It's always
recommended to have staging environments in place to ensure the sanity of the meta data
versions and their impact thereafter. The local instance will sync the meta data from first
version so that harmony is maintained and local and central instance will work appropriately.
The system will attempt a synchronization at the scheduled time. If the local or remote server
does not have a working Internet connection at the time, the synchronization will be aborted
and re-attempted after as per the retry count as mentioned in the dhis.conf file.
You can see the time of last successful synchronization with remote server in the scheduling
screen next to the "Last success" label.
Datastore Manager Using the Datastore Manager
333
Chapter 25. Datastore Manager
The Datastore Manager is intended for advanced-level DHIS2 users. Before you use the
Datastore Manager, you can read more about the Data store here: DHIS2 data store.
25.1. Using the Datastore Manager
The Datastore Manager lets you manage the content of the web API data stores. This is helpful
when managing apps and external scripts.
25.2. Add a new namespace and key to the Datastore Manager
Note: You have to create a namespace before you can add a key to it.
1. Click New.
2. Enter a name for the namespace you want to create.
3. Enter a key name, and select Create. The new namespace displays in the left pane.
25.3. Add a key to an existing namespace in the Datastore Manager
To add a new key to an existing namespace in the Datastore Manager,
1. Select the namespace you want to add a key to.
2. Click the options menu, and click New key.
3. Enter a key name in the New key dialog box.
4. Click Create. The new key is added to the namespace you selected.
25.4. Delete a namespace or key from the Datastore Manager
To delete a namespace, or key, click the Options menu, and then click Delete, and then Delete
again. Note that if you delete the only key in a namespace, you will also delete the namespace
it belongs to.
25.5. Search for namespaces or keys
Use the search tool in the top left corner to search for namespaces and keys as follows:
Enter a namespace name followed by # and the key name to search for a specific key in
a namespace.
Enter # followed by the name of a key to search for keys only.
Datastore Manager Search your JSON library
334
25.6. Search your JSON library
Use the search tool in the workspace toolbar to search your JSON library.
25.7. Edit namespaces or keys in the Datastore Manager
Use the Search tool to find namespaces or keys in your datastore. When you edit your content,
you can toggle between the Tree view and the Code view. Use the Tree view to get an
overview of the contents of the Datastore. Use the Code view to edit your code directly in the
code editor. Remember to save your work by clicking the Save button.
In the Code view, you can edit your code. When you edit a line of code, it is highlighted in yellow.
Any errors are marked by the editor. If you hover over the error icon, you can view a short
description of the error.
Configure the GIS app Context
335
Chapter 26. Configure the GIS app
26.1. Context
Setting up the GIS simply means storing coordinates for the organisation units you want to
show on the map in the database. Coordinates are often distributed in proprietary formats and
will need to be converted to a format which DHIS2 understands. ESRI shapefiles are the most
common geospatial vector data format for desktop applications. You might find shapefiles for
your country here or in many other geospatial data repositories on the web. Some amount of
work needs to be done in order to use these coordinates in DHIS2 GIS, namely transforming
the data into a suitable format and ensuring the name which are contained in the geospatial
data match exactly with the names of the organization units which they should be matched to.
If you go to the organisation unit module and edit one of the units, you can see a text field
called Coordinates. Here you may fill in its coordinates directly (geojson format) which is useful
if you just want to update a couple of units.
An example point/facility coordinate:
[29.341,-11.154]
An example polygon/area coordinates string:
[[[[29.343,-11.154],[28.329,-11.342],[28.481,-10.239],[29.833,-10.412]]]]
However, if you are going to e.g. add coordinates for all units at a certain level you don't want
to do that manually. This is where the automatic GML import comes into play and the following
section explains the preferred way of using it.
Important
The only co-ordinate reference system supported by DHIS2 is EPSG:4326, also known
as geographic longitude/latitude. Coordinates must be stored with the longitude (east/
west position) proceeding the latitude (north/south position). If your vector data is in a
different CRS than EPSG 4326, you will need to re-project the data first before importing
into DHIS2.
26.2. Importing coordinates
Step 1 - Simplify/generalize your geographical data
The boundaries in geographical data files are usually very accurate, too much so for the needs
of a web-based GIS. This usually does not affect the performance when using GIS files on a
local system, but it is usually necessary to optimize the geographical data for the web-based
GIS system of DHIS2. All geographical data needs to be downloaded from the server and
rendered in a browser, so if the data is overly complex, the performance of the DHIS2 GIS will
be negatively impacted. This optimization process can be described as follows:
Coordinates: The number of significant decimal digits (e.g. 23.02937874993774) should be
shortened to fewer digits (e.g. 23.03). Although this will result in some inaccuracies on the
map, given the usual scale at which maps in DHIS2 are produced (> 1:50,000), the loss of
precision should not be noticeable. Normally, no more than four significant digits after the
decimal point should be necessary.
Polygons: In addition to shortening the number of significant digits, the actual number of
points should also be reduced to an optimal level. Finding this optimal level may take a bit of
experimentation. Decreasing the precision of the points as well as the number of points through
Configure the GIS app Importing coordinates
336
generalization, will lead to degradation of the polygon. However, after a bit of experimentation,
an optimal level of generalization can be found, where the accuracy of the polygon is visually
acceptable, and the performance of the GIS is optimal.
For polygons, we need to make the boundary lines less detailed by removing some of the line
points. Make a backup of your shapefiles before you start. One possible method is the use of
MapShaper which is an online tool which can be used to generalize geographical data. To use
MapShaper, simply upload your shapefile to the site. Then, at the center bottom you see a
slider that starts at 0%. It is usually acceptable to drag it up to about 80%. In the left menu
you can check "show original lines" to compare the result and you may want to give a different
simplification method a try. When you are happy with the result, click "export" in the top right
corner. Then check the first of the four options called "Shapefile - polygons", click "create" and
wait for the download buttons to appear. Now, download the two files to your local computer
and overwrite the existing ones. Move on to the next step with your new simplified shapefile.
Step 2 - Convert the shapefile to GML
The recommended tool for geographical format conversions is called "ogr2ogr". This should
be available for most Linux distributions sudo apt-get install gdal-bin. For Windows, go
to http://fwtools.maptools.org/ and download "FWTools", install it and open up the FWTools
command shell. During the format conversion we also want to ensure that the output has the
correct coordinate projection (called EPSG:4326 with geographic longitude and latitude). For a
more detailed reference of geographic coordinates, please refer to this site. If you have already
reprojected the geographic data to the geographic latitude/longitude (EPSG:4326) system,
there is no need to explicitly define the output coordinate system, assuming that ogr2ogr
can determine the input spatial reference system. Note that most shapefiles are using the
EPSG:4326 system. You can determine the spatial reference system by executing the following
command.
ogrinfo -al -so filename.shp
Assuming that the projection is reported to be EPSG:27700 by ogrinfo, we can transform it to
EPSG:4326 by executing the following command.
ogr2ogr -s_srs EPSG:27700 -t_srs EPSG:4326 -f GML filename.gml filename.shp
If the geographic data is already in EPSG:4326, you can simply transform the shapefile to GML
by executing the following command.
ogr2ogr -f GML filename.gml filename.shp
You will find the created GML file in the same folder as the shapefile.
Step 3 - Prepare the GML file
Unfortunately, the GML file is not ready for importation yet. Open it in a robust text editor like
Geany (Linux) or Notepad++ (Windows). GML is an XML based format which means that you
will recognize the regular XML tag hierarchy. In the GML file an organisation unit is represented
as a <gml:featureMember>. Inside the feature members we usually find a lot of attributes, but
we are just going to import their coordinates.
In order to import geospatial data from the feature members of the GML input, DHIS2 must
match each of them with an organisation unit in its database. The feature member element
must, in other words, contain a reference to its corresponding organisation unit. The reference
itself must be one of three possible DHIS2 identifiers: uid, code or name. The identifier of
choice must be provided as a property for each feature member element. The importer will
look for a property with the local name of either Uid, Code or Name, e.g. "ogr:Name" or
"anyPrefix:Code".
If your feature members already contain a property of the identifier you wish to use (such as
the name of an area) you can use search and replace in a text editor to rename these elements
Configure the GIS app Importing coordinates
337
to a name DHIS2 will recognize (see the below table). This is typically a workflow which is
applicable when using the name as the identifier (the source shapefile or even GML will usually
contain the name for each area it defines).
Table26.1.Organisation unit identifiers supported for GML import
Matching priority Identifier Valid spellings Guaranteed
unique
1 Uid uid, Uid, UID Yes
2 Code code, Code, CODE No
3 Name name, Name, NAME No
In the case of renaming properties one would usually find a tag named something like
"ogr:DISTRICT_NAME", "ogr:NAME_1" and rename it to "ogr:Name". If using the code or uid
identifiers on the other hand, looking up the correct values in the DHIS2 database and going
through the GML file, adding the properties for each corresponding feature member might be
necessary. In any of the cases it is important to realize that the identifier used must uniquely
identify an organisation unit (e.g. if there are two organisation units in the database of the same
name or code, these cannot be matched properly on either). As uid is the only guaranteed-to-
be-unque identifier it is the most robust choice. However, as matching on name is usually easier
(given that the name is already part of your data), a viable approach to solving uniqueness
conflicts can be to match any non-uniquely named organisation units on a different identifier
(uid, preferrably) and the rest on their names.
As can be seen in the above table there is a matching priority, meaning is any two or more
identifiers are provided for the same feature member, matching will be performed on the
highest priority identifier. Note also the valid properties which can be used in you GML. The
namespace prefix is not important as only the local name is used.
A common pitfall of performing preparation of the GML files is syntax- or element naming
errors. Therefore please make sure that all properties of the GML file are started and
terminated with correctly corresponding tags. Also make sure the properties follow either of
the given valid spellings of the property name. The identifying properties are supposed to
look like e.g. <ogr:Name>Moyamba District</ogr:Name>, <somePrefix:uid>x7uuia898nJ</
somePrefix:uid> or <CODE>OU_12345</CODE>. Another common error is not making sure
the identifier matches exactly, especially when using the name property. All matches are
performed on exact values, meaning that "Moyamba" in a source GML file would not be
matched against "Moyamba District" in the database.
Have a brief look at the identifiers and compare them to the corresponding values in the
database. If they seem to match fairly good, it is about time to do a preview in the import-
export module.
Go to Services -> Import-Export, select "Preview", select the GML file and click "Import". Look
for new/updated organisation units. Our intention is to add coordinates to already existing
organisation units in the database, so we want as many updates as possible and 0 new. Those
listed as new will be created as root units and mess up the organisation unit trees in DHIS2.
If any listed as new, click the number and the organisation units in question will appear in the
list below. If there are any slight misspellings compared to the organisation unit names in the
database - fix them and do the preview again. Otherwise, click the "discard all" button below
the list and then the "Import all" button above the list.
If the import process completes successfully, you should now be able to utilize the geographical
data in the DHIS2 GIS. If not, check the log for hints and look for common errors such as:
- Name duplicates in the GML file. The name column in the database is unique and does not
accept two organisation units with the same name.
Configure the GIS app Importing coordinates
338
- The "shortname" column in the organisationunit table in your database has a too small varchar
definition. Increase it to 100.
- Special name characters in the GML file. Be sure to convert these to appropriate XML
equivalents or escape sequences.
- Wrongly formatted input GML, non-matching tags
Configure report functionality Data sources for reporting
339
Chapter 27. Configure report
functionality
27.1. Data sources for reporting
27.1.1. Types of data and aggregation
In the bigger picture of HIS terminology all data in DHIS2 are usually called aggregated as they
are aggregates (e.g. monthly summaries) of medical records or some kind of service registers
reported from the health facilities. Aggregation inside DHIS2 however, which is the topic here,
is concerned with how the raw data captured in DHIS2 (through data entry or import)are further
aggregated over time (e.g. from monthly to quarterly values) or up the organisational hierarchy
(e.g. from facility to district values).
27.1.1.1. Terminology
Raw data refers to data that is registered into the DHIS2 either through data entry or data
import, and has not been manipulated by the DHIS2 aggregation process. All these data are
stored in the table (or Java object if you prefer) called DataValue.
Aggregated data refers to data that has been aggregated by the DHIS2, meaning it is no
longer raw data, but some kind of aggregate of the raw data.
Indicator values can also be understood as aggregated data, but these are special in
the way that they are calculated based on user defined formulas (factor * numerator/
denominator). Indicator values are therefore processed data and not raw data, and are
located in the aggregatedindicatorvalue table/object. Indicators are calculated at any level of
the organisational hierarchy and these calculations are then based on the aggregated data
values available at each level. A level attribute in the aggregateddatavalue table refers to
the organisational level of the orgunit the value has been calculated for.
Period and Period type are used to specify the time dimension of the raw or aggregated
values, and data can be aggregated from one period type to another, e.g. from monthly to
quarterly, or daily to monthly. Each data value has one period and that period has one period
type. E.g. data values for the periods Jan, Feb, and Mar 2009, all of the monthly period type
can be aggregated together to an aggregated data value with the period Q1 2009 and period
type Quarterly.
27.1.1.2. Basic rules of aggregation
27.1.1.2.1. What is added together
Data (raw) can be registered at any organisational level, e.g. at national hospital at level 2,
a health facility at level 5, or at a bigger PHC at level 4. This varies form country to country,
but DHIS2 is flexible in allowing data entry or data import to take place at any level. This
means that orgunits that themselves have children can register data, sometimes the same
data elements as their children units. The basic rule of aggregation in DHIS2 is that all raw
data is aggregated together, meaning data registered at a facility on level 5 is added to the
data registered for a PHC at level 4.
It is up to the user/system administrator/designer to make sure that no duplication of data
entry is taking place and that e.g. data entered at level 4 are not about the same services/visits
that are reported by orgunit children at level 5. NOTE that in some cases you want to have
duplication of data in the system, but in a controlled manner. E.g. when you have two different
Configure report functionality Types of data and aggregation
340
sources of data for population estimates, both level 5 catchment population data and another
population data source for level 4 based on census data (because sum of level 5 catchments is
not always the same as level 4 census data). Then you can specify using advanced aggregation
settings (see further down) that the system should e.g. not add level 5 population data to the
level 4 population data, and that level 3,2,1 population data aggregates are only based on
level 4 data and does not include level 5 data.
27.1.1.2.2. How data gets added together
How data is aggregated depends on the dimension of aggregation (see further down).
Along the orgunit level dimension data is always summed up, simply added together. Note that
raw data is never percentages, and therefore can be summed together. Indicator values that
can be percentages are treated differently (re-calculated at each level, never summed up).
Along the time dimension there are several possibilities, the two most common ways to
aggregate are sum and average. The user can specify for each data element which method to
use by setting the aggregation operator (see further down). Monthly service data are normally
summed together over time, e.g. the number of vaccines given in a year is the sum of the
vaccines given for each month of that year. For population, equipment, staff and other kind of
what is often called semi-permanent data the average method is often the one to use, as, e.g.
'number of nurses' working at a facility in a year would not be the sum of the two numbers
reported in the six-monthly staffing report, but rather the average of the two numbers. More
details further down under 'aggregation operators'.
27.1.1.3. Dimensions of aggregation
27.1.1.3.1. Organisational units and levels
Organisational units are used to represent the 'where' dimension associated with data values.
In DHIS2, organisational units are arranged in a hierarchy, which typically corresponds to
the hierarchical nature of the organisation or country. Organisational unit levels correspond
to the distinct levels within the hierarchy. For instance, a country may be organized into
provinces, then districts, then facilities, and then sub-centers. This organisational hierarchy
would have five levels. Within each level, a number of organisational units would exist. During
the aggregation process, data is aggregated from the lower organisational unit levels to higher
levels. Depending on the aggregation operator, data may be 'summed' or 'averaged' within
a given organisational unit level, to derive the aggregate total for all the organisational units
that are contained within a higher level organisational unit level. For instance, if there are ten
districts contained in a province and the aggregation operator for a given data element has
been defined as 'SUM', the aggregate total for the province would be calculated as the sum of
the values of the individual ten districts contained in that province.
27.1.1.3.2. Period
Periods are used to represent the 'when' dimension associated with data values. Data can
easily be aggregated from weeks to months, from months to quarters, and from quarters to
years. DHIS2 uses known rules of how these different intervals are contained within other
intervals (for instance Quarter 1 2010 is known to contain January 2010, February 2010 an
March 2010) in order to aggregate data from smaller time intervals, e.g. weeks, into longer
time intervals, e.g. months.
27.1.1.3.3. Data Elements and Categories
The data element dimension specifies 'what' is being recorded by a particular data value.
Data element categories are actually degenerated dimensions of the data element dimension,
and are used to disaggregate the data element dimension into finer categories. Data element
categories, such as 'Age' and 'Gender', are used to record a particular data element, typically
Configure report functionality Types of data and aggregation
341
for different population groups. These categories can then be used to calculate the overall total
for the category and the total of all categories.
27.1.1.4. Aggregation operators, methods for aggregation
27.1.1.4.1. Sum
The 'sum' operator simply calculates the sum of all data values that are contained within
a particular aggregation matrix. For instance, if data is recorded on a monthly basis at the
district level and is aggregated to provincial quarterly totals, all data contained in all districts
for a given province and all weeks for the given quarter will be added together to obtain the
aggregate total.
27.1.1.4.2. Average
When the average aggregation operator is selected, the unweighted average of all data values
within a given aggregation matrix are calculated.
It is important to understand how DHIS2 treats null values in the context of the average
operator. It is fairly common for some organisational units not to submit data for certain data
elements. In the context of the average operator, the average results from the number of data
elements that are actually present (therefore NOT NULL) within a given aggregation matrix. If
there are 12 districts within a given province, but only 10 of these have submitted data, the
average aggregate will result from these ten values that are actually present in the database,
and will not take into account the missing values.
27.1.1.5. Advanced aggregation settings (aggregation levels)
27.1.1.5.1. Aggregation levels
The normal rule of the system is to aggregate all raw data together when moving up the
organisational hierarchy, and the system assumes that data entry is not being duplicated
by entering the same services provided to the same clients at both facility level and also
entering an 'aggregated' (sum of all facilities) number at a higher level. This is to more easily
facilitate aggregation when the same services are provided but to different clients/catchment
populations at facilities on level 5 and a PHC (the parent of the same facilities) at level 4. In
this way a facility at level 5 and a PHC at level 4 can share the same data elements and simply
add together their numbers to provide the total of services provided in the geographical area.
Sometimes such an aggregation is not desired, simply because it would mean duplicating data
about the same population. This is the case when you have two different sources of data for
two different orgunit levels. E.g. catchment population for facilities can come from a different
source than district populations and therefore the sum of the facility catchment populations
do not match the district population provided by e.g. census data. If this is the case we would
actually want duplicated data in the system so that each level can have as accurate numbers
as possible, but then we do NOT want to aggregate these data sources together.
In the Data Element section you can edit data elements and for each of them specify how
aggregation is done for each level. In the case described above we need to tell the system
NOT to include facility data on population in any of the aggregations above that level, as the
level above, in this case the districts have registered their population directly as raw data. The
district population data should then be used at all levels above and including the district level,
while facility level should use its own data.
27.1.1.5.2. How to edit data element aggregation
This is controlled through something called aggregation levels and at the end of the edit data
element screen there is a tick-box called Aggregation Levels. If you tick that one you will see
Configure report functionality Resource tables
342
a list of aggregation levels, available and selected. Default is to have no aggregation levels
defined, then all raw data in the hierarchy will be added together. To specify the rule described
above, and given a hierarchy of Country, Province, District, Facility: select Facility and District
as your aggregation levels. Basically you select where you have data. Selecting Facility means
that Facilities will use data from facilities (given since this is the lowest level). Selecting District
means that the District level raw data will be used when aggregating data for District level
(hence no aggregation will take place at that level), and the facility data will not be part of the
aggregated District values. When aggregating data at Province level the District level raw data
will be used since this is the highest available aggregation level selected. Also for Country level
aggregates the District raw data will be used. Just to repeat, if we had not specified that District
level was an aggregation level, then the facility data and district data would have been added
together and caused duplicate (double) population data for districts and all levels above.
27.1.2. Resource tables
Resource tables provide additional information about the dimensions of the data in a format
that is well suited for external tools to combine with the data value table. By joining the
data value table with these resource tables one can easily aggregate along the data element
category dimension or data element/indicator/organisation unit groups dimensions. E.g. by
tagging all the data values with the category option male or female and provide this in a
separate column 'gender' one can get subtotals of male and female based on data values
that are collected for category option combinations like (male, <5) and (male,>5). See the
Pivot Tables section for more examples of how these can be used. orgunitstructure is another
important table in the database that helps to provide the hierarchy of orgunits together with
the data. By joining the orgunitstructure table with the data values table you can get rows
of data values with the full hierarchy, e.g. on the form: OU1, OU2, OU3, OU4, DataElement,
Period, Value (Sierra Leone, Bo, Badija, Ngelehun CHC, BCG <1, Jan-10, 32) This format makes
it much easier for e.g. pivot tables or other OLAP tools to aggregate data up the hierarchy.
27.1.3. Report tables
Report tables are defined, cross-tabulated reports which can be used as the basis of further
reports, such as Excel Pivot Tables or simply downloaded as an Excel sheet. Report tables are
intended to provide a specific view of data which is required, such as "Monthly National ANC
Indicators". This report table might provide all ANC indicators for a country, aggregated by
month for the entire country. This data could of course be retrieved from the main datamart,
but report tables generally perform faster and present well defined views of data to users.
27.2. How to create report tables
To create a new report table, go to the Report tables section of the Reports module (Reports
-> Report Table). Above the list of standard reports, use the "Add report table" or "Add
Dataelement Dimension Table" buttons. A regular report table can be used to hold data on
data elements, indicators or dataset completeness, while Dataelement dimension tables are
used to include data element categories in report tables. Creating the tables are done in the
same way, however, the only exception being when choosing data.
To create a report table, you start by making some general choices for the table, the
most important of which is the crosstab dimension. Then, you choose which data elements,
indicators, datasets or data element dimensions you want to include. Finally you select which
organisation units and time periods to use in the report table. Each of these steps are described
in detail below.
Configure report functionality General options
343
27.2.1. General options
Report table options
Cross tab dimensions
You can cross-tab one or more of the following dimensions: data element/indicator, orgunit,
and period, which means that columns will be created based on the values of the dimensions
chosen, e.g. if indicators is selected you will get column names in the table reflecting the names
of the selected indicators.
For example, if you cross-tab on indicators and periods, the column headers will say "<indicator
title> <period>". The organisation units will be listed as rows. See screenshot for clarification:
Indicators and periods are cross-tabbed
If you cross-tab on indicators and organisation units, the column headers of the table will say
"<indicator title> <organisation unit>". Now the periods will be listed as rows. See screenshot
for clarification:
Indicators and organisation units are cross-tabbed
Note that the options made here regarding crosstab dimensions may have consequences for
what options are available when using the report table as a data source later, for example for
standard reports.
Sort order
Affects the rightmost column in the table, allows you to choose to sort it low to high or high
to low.
Top limit
Top limit allow you to set a maximum number of rows you want to include in the report table.
Include regression
This adds additional columns with regression values that can be included in the report design,
e.g. in line charts.
Configure report functionality Selecting data
344
27.2.2. Selecting data
Data options
Indicators/Data elements
Here you select the data elements/indicators that you want to include in the report. Use the
group filter to more easily find what you are looking for and double click on the items you want
to include, or use the buttons to add/remove elements. You can have both data elements and
indicators in the same report.
Data sets
Here you select the data sets that you want to include in the report. Including a data set will
give you data on the data completeness of the given set, not data on its data elements. Double
click on the items you want to include, or use the buttons.
27.2.3. Selecting report parameters
Report parameter options
There are two ways to select both what organisation units to include in a report, and what time
periods should be included: relative, or fixed. Fixed organisation units and/or periods means
that you select the units/periods to include in the report table when you create the report table.
Using relative periods, you can select the time and/or units as parameters when the report table
is populated, for example when running a standard report or creating a chart. A combination
is also possible, for example to add some organisation units in the report permanently while
letting the users choose additional. Report parameters is discussed below. In general, using
fixed organisation units and/or time periods are an unnecessary restriction.
Fixed Organisation Units
To add fixed organisation units, click "Toggle fixed organisation units". A panel will appear
where you can choose orgunits to always include in the report. If you leave it blank, the users
select orgunits when running the report through the use of report parameters. Use the drop
down menu to filter organisation units by level, double click or use the buttons to add/remove.
Fixed Periods
Configure report functionality Selecting report parameters
345
To add fixed periods, click "Toggle fixed organisation units". A panel will appear where you can
choose periods to always include in the report. If you leave it blank, the users select periods
when running the report through the use of report parameters. Use the drop down menu to
choose period type (week, month, etc), the Prev and Next button to choose year, and double
click or use the buttons to add/remove.
Relative periods
Instead of using fixed/static periods like 'Jan-2010' or 'Q1-2010', more generic periods can be
used to create reusable report tables, e.g. for monthly reports the period 'Reporting month'
will simply pick the current reporting month selected by the user when running the report.
Note that all relative periods are relative to a "reporting month". The reporting month is either
selected by the users, otherwise the current month is used. Here is a description of the possible
relative periods:
Reporting month:
Use this for monthly reports. The month selected in the reporting month parameter will be
used in the report.
Months/Quarters this year:
This will provide one value per month or quarter in the year. This is well suited for standard
monthly or quarterly reports where all month/quarters need to be listed. Periods that still
have no data will be empty, but will always keep the same column name.
This year:
This is the cumulative so far in the year, aggregating the periods from the beginning of the
year up to and including the selected reporting month.
Months/Quarters last year:
This will provide one value per month or quarter last year, relative to the reporting month.
This is well suited for standard monthly or quarterly reports where all month/quarters need
to be listed. Periods that still have no data will be empty, but will always keep the same
column name.
Last year:
This is the cumulative last year, relative to the reporting month, aggregating all the periods
from last year.
Example - relative periods
Let's say we have chosen three indicators: A, B and C, and we have also chosen to use the
relative periods 'Reporting month' and 'This year' when we created the report table. If the
reporting month (selected automatically or by the user) is for example May 2010, the report
table will calculate the values for the three selected indicators for May 2010 (= the 'Reporting
month') and the accumulated values for the three selected indicators so far in 2010 (= so far
'This year').
Thus, we will end up with six values for each of the organisation units: "Indicator A May 2010",
"Indicator B May 2010" "Indicator C May 2010", "Indicator A so far in 2010", "Indicator B so far
in 2010" and "Indicator C so far in 2010".
Report parameters
Report parameters make the reports more generic and reusable over time and for different
organisation units. These parameters will pop up when generating the report table or running
a report based on the report table. The users will select what they want to see in the report.
There are four possible report parameters, and you can select none, all, or any combination.
Reporting month:
Configure report functionality Data element dimension tables
346
This decides which month will be used when the system is choosing the relative periods. If
the box it not checked, the user will not be asked for the reporting month when the report
is generated - the current month will then be used.
Grand parent organisation unit:
Select the grand parent of all the orgunit children and grand children you want listed in the
report. E.g. a selected region will trigger the use of the region itself, all its district, and all
their sub-districts.
Parent organisation unit:
Select the parent of all the orgunit children you want listed in the report. E.g. a selected
district will trigger the use of the district itself and all its children/sub-districts.
Organisation unit:
This triggers the use of this orgunit in the report. No children are listed.
Example - report parameters
Continuing with the example on relative periods just above, let's say that in addition to
'Reporting month', we have chosen 'Parent organisation unit' as a report parameter when we
created the report table. When we're running the report table, we will be asked to select an
organisation unit. Now, let's say we choose "Region R" as the organisation unit. "Region R" has
the children "District X" and "District Y".
When the report is run, the system will aggregate data for both "District X" and "District Y".
The data will be aggregated from the lowest level where they have been collected. The values
for the districts will be aggregated further to give an aggregated value for "Region R".
Thus, the report table will generate the six values presented in the previous example, for
"District X", "District Y" and "Region R".
27.2.4. Data element dimension tables
These tables enable the use of data element categories in report tables. There are
two differences from regular report tables. The first is that it is not possible to select
crosstab dimensions, as the columns will always be the disaggregations from the category
combinations. The other is the actual choice of data. Only one category combination can be
added per report, and only data elements from the same category combo can be selected.
Subtotals and the total will also be included in the table, e.g. a gender (male, female) + EPI
age(<1, >1) category combo would give the following columns: male+<1, male+>1, Female
+<1, female+>1, male, female,<1, >1, total.
Selecting data
Selecting category combinations
Configure report functionality Report table - best practices
347
Use the drop down menu to choose category combinations. The data elements using this
category combination will be listed. Double click to add to the report, or use the buttons.
27.2.5. Report table - best practices
To make the report tables reusable over time and across orgunits they can have parameters.
Four types of parameters are allowed; orgunit, parent orgunit (for listing of orgunits in one
area), grand parent orgunit and reporting month. As a side note it can be mentioned that we
are looking into expanding this to include reporting quarter and year, or to make that period
parameter more generic with regard to period type somehow. The ability to use period as a
parameter makes the report table reusable over time and as such fits nicely with report needs
such as monthly, quarterly or annual reports. When a report is run by the user in DHIS2, the
user must specify the values for the report tables that are linked to the report. First the report
table is re-generated (deleted and re-created with updated data), and then the report is run
(in the background, in Jasper report engine).
Report tables can consist of values related to data elements, indicators or data completeness,
which is related to completeness of reporting across orgunits for a given month. Completeness
reports will be covered in a separate section.
There are three dimensions in a report table that identify the data; indicators or data elements,
orgunits and periods. For each of these dimensions the user can select which metadata values
to include in the report. The user must select one or more data elements or indicators to appear
in the report. The orgunit selection can be substituted with a parameter, either one specific
orgunit or an orgunit parent (making itself and all its children appear in the report). If one or
more orgunits are selected and no orgunit parameter is used, then the report is static with
regard to which orgunits to include, which in most cases is an unnecessary restriction to a
report.
Using relative periods
The period selection is more advanced as it can in addition to specific periods like Jan-09,
Q1-08, 2007 also contain what is called relative periods. As report usually is run routinely over
time a specific period like Jan-09 is not very useful in a report. Instead, if you want to design
a monthly report, you should use the relative period called Reporting Month. Then you must
also include Reporting Month as one of your report parameters to let the system know what
exactly is the Reporting Month on the time of report generation. There are many other relative
periods available, and they all relate to the report parameter Reporting Month. E.g. the relative
period called So far this year refers to the accumulative value for the year incl. the Reporting
Month. If you want a trend report with multiple periods in stead of one aggregated period, you
can select e.g. 'Months this year', which would give you values for each month so far in the
year. You can do a similar report with quarters. The idea is to support as many generic report
types as possible using relative periods, so if you have other report needs, please suggest new
relative periods on the mailing list, and they might be added to the report table options.
Cross-tabbing dimensions
Cross tabbing is a very powerful functionality in report design, as the typical DHIS2 data table
with references to period, data element/indicator and orgunit makes more advanced report
design very difficult, as you cannot put e.g. specific indicators, periods or orgunits on specific
columns. E.g. by cross-tabbing on the indicator dimension in an indicator report table you
will get the indicator names on the column headers in your report, in addition to a column
referencing orgunit, and another column referencing period. With such a table design you could
drag and drop indicator names to specific columns or chart positions in the iReport software.
Similarly you can cross tab on orgunits or periods to make their names specifically available to
report design. E.g. by cross-tabbing on periods and selecting the two relative periods 'Reporting
month' and 'This year', you can design reports with both the last month and the accumulative
Configure report functionality Report table outcome
348
annual value for given month as they will be available as column headers in your report table.
It is also possible to combine two dimensions in cross-tabbing, e.g. period and indicator, which
makes it possible to e.g. look at three selected indicators for two specific relative periods. This
would e.g. make it possible to make a table or chart based report with BCG, DPT3 and Measles
coverage, both for the last month and the accumulative coverage so far in the year.
All in all, by combining the functionality of cross tabbing, relative periods and report table
parameters you should have a tool to support most report scenarios. If not, we would be very
happy to receive suggestions to further improvements to report tables. As already mentioned,
we have started to look at more fine-grained parameters for the period dimension as the
'Reporting month' does not cover enough, or at least is not intuitive enough, when it comes
to e.g. quarterly reports.
27.3. Report table outcome
When the report table is run, the system will calculate values for specified indicators/data
elements/data sets, orgunits and periods. The data will be presented in DHIS2 in a table layout.
The column headers will correspond to the cross-tab dimension you have selected. An example
report table showing ANC coverage for a district in The Gambia, is shown below. Here the
indicator and the periods are cross-tabbed, as can be seen from the column headers.
Example report table
Above the table there are six buttons; five download buttons and one Back button. Clicking the
Back button will simply take you back to the previous screen. The function of the five download
buttons, are presented below the screenshot:
The download buttons
The five download buttons
Download as Excel:
Downloads a generated Excel file you can open in Excel.
Download as CSV:
Downloads a generated .csv file. CSV stands for Comma Separated Values. It's a text file
with the file ending .csv. Each line in the file corresponds to a row in the table, while the
columns are separated with semi colons (;). The file can be opened in a text editor as well
as in a spread sheet program (such as Excel).
Download as PDF:
Downloads a generated PDF file. The data will be presented in a similar layout as the
generated table you are already viewing in DHIS2.
Download as Report:
Downloads a "styled" PDF file. In addition to present the data in a table layout, this file also
presents a chart, showing the aggregated data from all the chosen periods and the parent
Configure report functionality Standard reports
349
organisation unit chosen for the report table. The report is generated using the Jasper report
engine.
Download as JRXML:
Downloads the design file for the generated Report described in the previous bullet. The
design file (with the file ending .jrxml) can be opened in the Jasper iReport Designer software.
If you plan to design standard reports, this is the starting point.
27.4. Standard reports
27.4.1. What is a standard report?
A standard report is a manually designed report that presents data in a manually specified
layout. Standard reports can be based either on report tables or SQL queries. Both approaches
are described in the following sections. The main advantage of using report tables is that
of simplicity - no special development skills are required. In cases where you have special
requirements or need to utilize additional parts of the DHIS2 database you might want to use
a SQL based standard report. In any case you will be able to utilize report parameters in order
to create dynamic reports. The following guide will use the report table approach, while the
SQL approach is covered towards the end.
27.4.2. Designing Standard reports in iReport
Jasper iReport Designer is a tool for creating reports that can be used as Standard Reports in
DHIS2. The tool allows for the creation of standard report templates that can easily be exported
from DHIS2 with up to date data. The process of creating reports involves four major steps:
1. A report table must be created in DHIS2 with the indicators/data elements/datasets to be
used in the report.
2. You have to run the report table and download the design file (Click the "Download as JRXML"
button).
3. Open the downloaded .jrxml file using the free software Jasper iReport Designer to edit the
layout of the report.
4. The edited report can then be uploaded to DHIS2 to be used as a standard report.
If you want to preview your report during the design in iReport, you actually have to upload
your file to DHIS2 to see how it looks.
These four steps will be describe in detail in the coming sections. In general, when you are
making standard reports you should have a clear idea of how it should look before you even
make the report table, as how the report table is designed has implications for how the report
can be formatted in iReport. For example, what crosstab dimensions are selected in the report
table has consequences for what crosstabs are available for the standard report, and it has
consequences for what types of charts you can make.
27.4.2.1. Download and open the design file
Note: If you have not created a report table yet, you have to do so. See section "How to create
report tables" to do so.
Locate your desired report table and run it by clicking the green circle with a white arrow inside.
When the report is shown, click the "Download as JRXML" button to download the design file.
Then open that file in the Jasper iReport Designer software.
Configure report functionality Designing Standard reports in iReport
350
27.4.2.2. Editing the report
You are now ready to edit the layout of the report. The main iReport window consists of a
"Report Inspector" to the left, the report document in the middle, a "Palette" area on the upper
right hand side and a "Properties" area on the lower right hand side. The "Report Inspector"
are used for selecting and examining the various properties of the report, and when selecting
an item in the inspector, the "Properties" panel changes to display properties relating to the
selection. The "Palette" is used for adding various elements, e.g. text boxes, images and charts
to the document.
Overview of the main iReport window
Note: If you cannot see the Palette or Properties sidebar, you can enable them from the menu
item called "Window" on the menu bar.
The iReport document is divided into seven main bands, divided by layout separators (the blue
lines). These lines are used to decide how big each of the areas should be on the report.
The areas all have different purposes:
Title - area for the title of the report
Page header - area for the page header
Column header - area for column headers (for the table)
Detail 1 - area where the actual report data will be placed
Column footer - area to make footer of the table
Page footer - area for the page footer
Summary - elements in this area will be placed at the end of the report
By default you will see that only the Title, Column Header and the Detail 1 bands have data.
For most reports this is OK. The Title band is suitable for a title and e.g. a chart. Data fields
entered into the Detail 1 area will be iterated over to create a table. For example, if a field
called "dataelementname" is placed in the Detail 1 band, all data elements in the report table
will be listed here. We'll come back to data fields management just a little below.
Configure report functionality Designing Standard reports in iReport
351
The unused bands in the report are shrinked to add more space for your report data. You can
however increase/decrease the band height as you like. There are two ways to do that. The
first way is simply to drag the blue band-line as shown below.
Drag the blue lines to change the band heights
The other way to adjust the band height is to select a band in the "Report Inspector", and then
adjust the "Band height" value in the "Detail 1 - properties" area in the lower right corner.
Adjust the size of layout areas by changing the Band height property
As the fields are already present on the report, you probably don't want to do anything than
just fix the layout and drag fields around. You can also resize the fields by dragging the side,
top or bottom lines. If you want to change the text in the column headers, you simply double
click the field and change the text.
To add the a field to the table, we simply drag it to the Detail 1 band from the "Report Inspector".
The column header will be added automatically.
By double clicking the box, the text can be edited. The format of the text, such as size, font
and alignment, can be adjusted with the tools above the document.
Double click to edit the text, and change its appearance
NOTE: Fields starting with "$F" present values that are retrieved from the database
every time the report is run. The values here will vary, so do not change these fields
unless you want a static value here!
27.4.2.3. Text
There are two types of text in iReport: «Text labels» and «Text fields» (data fields). They work
in different ways, and should be used for different purposes. The main point is that text fields
are just placeholders that will be filled with the correct text from the report table when the
report is run, while text labels will stay the way they are when the report is run.
27.4.2.3.1. Static text
Static text are text plain text labels that can be edited normally. There are two ways to edit
text labels:
By double clicking in the text box
By using the Static text properties in the Properties panel
Click to edit text label
Configure report functionality Designing Standard reports in iReport
352
27.4.2.3.2. Text fields
Text fields are formulas that will be filled from the report table when the report is run. Unlike
static text, these can not be edited in a normal way. However, they can be manipulated in
various ways to ensure that the desired output will be produced. There are three ways to edit
the text fields:
By right clicking on the text box and selecting Edit expression
By double clicking the text field (not recommended, as this will not bring up the expression
editor)
By using the Text field properties in the Properties panel
Click to open Expression editor
Click to open Expression editor
Text fields can represent either numbers or text, so that they can be used both for showing
for example names of district or for numeric values. It is therefore important the Expression
class, seen in the Text field properties matches the Text field expression. For the default text
fields in the .jrxml file downloaded from DHIS2 this is not a problem, but it is important when
making new text fields. The two most important Expression classes are java.lang.Double for
numbers and java.lang.String for text.
27.4.2.3.2.1. Example
For example, let us say you have a quarterly report where you would like to add a new column
with the yearly total. You therefore add a new Static text field to the column header band, and
a Text field to the details band in. By default, new Text fields are set to java.lang.String (text).
However, the yearly total column will be filled with numbers. We therefore have to change the
Expression class for the new text field to java.lang.Double:
Click to show expression class options
Choose desired class
Configure report functionality Designing Standard reports in iReport
353
When we edit the text field expression, we see the Expression editor window with all the
available columns from the report table. We can see here that each of these are marked with
what type they are - text or number. What we need to make sure of is therefore that the
expression class we choose for the text field matches the actual expression.
Expression editor
27.4.2.4. Filtering the table rows
In the default table exported from DHIS2, there are some rows that it might be better to leave
out of the table, and some that it would be preferable to have at the end. For example, when
making a table based on a report table with the «parent organisation unit» parameter, the
default table might have a row with the national level somewhere in between all the regions.
In iReport, this can be changed so that the «parent organisation unit» appears at the bottom
of the table. This involves two steps that will be explained below. Note that this will not work
where there is only one organisation units, and it is therefore most useful when using the
«parent organisation unit» or «grand parent organisation unit» parameters in the report table.
27.4.2.4.1. Hiding the «parameter organisation unit» from the table
We exclude the "parameter organisation unit" from the table by using a property in the Details
band called "Print when expression". To set a Print when expression, start by selecting the
Detail band in the Report inspector, then edit the Print when expression in the properties panel.
Select Detail 1 in the Report Inspector
Configure report functionality Designing Standard reports in iReport
354
Open the Expression Editor by clicking next to Print When Expression
The Expression editor window should now appear. What we must do is to create an
expression that checks if the row being generated is the row with the organisation unit
given as a parameter. The report table contains a column that we can use for this called
organisation_unit_is_parent. To exclude the row with the parameter organisation unit, double
click on organisation_unit_is_parent in the list to copy it to the expression area, then add
.equals("No") at the end so that the code is:
$F{organisation_unit_is_parent}.equals("No")
This tells the report engine to only print table rows where the organisation unit is not the parent
organisation unit.
Code to skip parent organisation unit
27.4.2.4.2. Putting the "param organisation unit" at the bottom of the table
Instead of removing the "param organisation unit" from the table entirely, it is also possible
to put it at the bottom (or top) of the table. This is done by using the sort functionality
explained in the next section, and choosing to sort first by "organisation_unit_is_parent".
Other sorting options can be added in addition to this, for example to make a list where the
param organisation unit is at the bottom of the table, with the other organisation units listed
alphabetically above it.
Configure report functionality Designing Standard reports in iReport
355
27.4.2.4.3. Hiding other rows
Using the expression editor it is also possible to exclude other rows from the table, in addition
to the parent organisation unit as was explained above. In Ghana, for example, all regions have
a «fake district» which is the name of the region in square brackets. This can also be excluded
from the table using the Print when expression that was introduced above. To to this, follow the
instructions above to bring up the Expression editor window. Then, we use Java expressions
to test whether or not the row should be hidden.
27.4.2.4.3.1. Example - removing rows with organisation units starting with [
Example - removing rows with organisation units starting with [
($F{organisationunitname}.charAt( 0 ) != '[')
This makes the report skip any rows where the first character of the organisation unit name is [.
It is also possible to combine several of these expressions. To do this we put the expressions
in a parenthesis with the two characters && in between. For example, to make a table that
leaves both organisation units whose name starts with [ and the parent organisation unit, we
can use the following expression:
($F{organisationunitname}.charAt( 0 ) != '[')&&
$F{organisation_unit_is_parent}.equals("No")
Combining expressions in the Expression editor
27.4.2.5. Sorting
Often you will be making reports where the first column is organisation unit names. However,
it can be a problem that the list of organisation units are not sorted alphabetically. This can
be fixed in iReport through a few simple steps.
In the report inspector, right click on the name of the report (by default this is dpt) and select
Edit query.
Configure report functionality Designing Standard reports in iReport
356
Choose Edit Query
A Report query window will appear. Click on the Sort options button.
Choose Sort Options...
A Sorting window as show below will appear. Here, we can add our sorting options. Click the
Add field button. Another small window will show up, with a drop down menu where you can
choose Sort by organisationunitname to have the table sorted alphabetically by name.
Configure report functionality Designing Standard reports in iReport
357
Choose Add
Choose sort parameter
Click OK - Close - OK to close the three windows. The table should now be sorted.
27.4.2.6. Changing indicator/data element names
By default, the reports from DHIS2 uses the short names for indicators and data elements in
reports and charts. In some cases these are not always very meaningful for third parties, but
with some work they can be given custom names through iReport. This is useful for example
if you are making a report with indicators as rows and periods as column, or for charts with
indicators.
Shortnames - before and after
To change the names of an indicator or data element, we have to edit its «expression» or
formula, for example by right clicking the text box and choosing Edit expression to bring up
the Expression editor.
Configure report functionality Designing Standard reports in iReport
358
Choose Edit Expression
Next, we have to insert some Java code. In the following example, we will be replacing the
shortname of three indicators with their proper names. The code searches for the shortname,
and then replaces it with a proper name.
Expression editor, showing replacing shortnames
($F{indicatorname}.equals("Bed Util All")) ? "Bed Utilisation - All Wards"
:
($F{indicatorname}.equals("Bed Util Mat")) ? "Bed Utilisation - Maternity"
:
($F{indicatorname}.equals("Bed Util Ped")) ? "Bed Utilisation - Paediatric"
:
$F{indicatorname}
From this, we can see a pattern that is reusable for more general cases.
For each indicator or data element we want to change the name for, we need one line
Each line is separated by a colon :
We finish the expression with a «regular» line
Each line has the same format, where the red text is the shortname, the blue text is what we
want to insert instead.
Configure report functionality Designing Standard reports in iReport
359
Code for replacing shortnames. Shortname in red, new name in blue
The same expressions can be used for example when having indicator names along the
category axis of a chart.
27.4.2.7. Adding horizontal totals
By using the expression editor, it is possible to add a column to the table with totals for each
row. In the following example, we will make a table with three months as columns as well as
a column with the totals for the three months.
We start by dragging a text label into the table header and changing its text to "Total", and
dragging a text field into the details row.
As was discussed in the section on "Text field", we have to change the properties of the new
text field so that it can display numbers. To do this, change the "Expressions Class" in the
properties panel to "java.lang.Double".
Right click the text field and choose "Edit Expression". This will bring up the "Expressions
editor". As the expression, we want to sum up all the columns. In this case we have three
value expressions we want to sum up: "September", "October 2010", "November 2010". The
name of these fields will vary depending on the crosstab dimension you have chosen in the
report table. In our case, the expression we make is "$f{September}+$f{October 2010}+
$f{November 2010}":
Each row of the table have a totals column to the right.
27.4.2.8. Groups of tables
There are cases when it can be useful to have several tables in one report. This can be done
using Report groups. Using this functionality, one can for example create a report one table
for each indicator, or one table of each organisation unit. In the following, we will go through
the steps needed to make a report with three indicators, each represented in one table. It is
important that the report table does not crosstab on indicators when we want to make groups
of tables based on indicators.
In our example, the .jrxml file downloaded from DHIS2 will by default have one column for
organisation unit and on for indicators (assuming we have chosen periods as the only crosstab
dimension). We start by removing the indicator column, since this in not needed in our case,
and realign the other fields to fit the report.
Delete column
Configure report functionality Designing Standard reports in iReport
360
Next, we create out Report group. Go to the report inspector, right click on the report name
(dpt is the default) and choose Add Report Group.
Add Report Group
A window will appear, with a report group wizard. Select a name for the group, in this case we
choose «Indicator». In the drop down menu, we can select what columns in the report table
we want the groups to be based on. So, if we wanted one table for each organisation unit,
we would choose organisation unit name as the report object to group according to. However,
since we are grouping by indicators in this example, we choose indicatorname. Then click next.
Choose grouping parameter - here, indicators
The next step is to select whether or not we want a separate Group header and Group footer
band for each report group. In this case, we choose to include both. Click Finish, and the group
bands should appear in the report.
Configure report functionality Designing Standard reports in iReport
361
Add group header/footer
If you upload and run the report, it will now create one table for each indicator. However, it
will not look very good as there will be no header row over each table - only one header at
the top of each page. Also, there is no indication as to which table is showing which indicator.
In the following, we will fix this.
Instead of having the title row in the column header, we can instead move it to the Group
header. This will make the heading show up above each individual table. Furthermore, we can
add a heading to each table with the name of the indicator.
Move the column headers from the Column header band to the Indicator group header band.
Move header row to column header
Next, add a text field to the Indicator group heading band, and edit it’s expression to display
the indicator name.
Add text field to use as heading
Configure report functionality Designing Standard reports in iReport
362
Edit text field expression to show indicator name
The report should now have three tables, one for each indicator. Each table will have a heading
with the name of the indicator, and also a table header row.
Example of finished report table
27.4.2.8.1. Sorting and grouping
When using grouping, some precautions must be taken with regards to sorting. Notably, when
adding sorting parameters, whatever parameter is used as basis for the grouping must come
first. Thus if you are grouping the report by indicator, and want sort the organisation units
alphabetically, you have to choose to sort first by indicator, then by organisation unit name as
shown below. For instructions on how to add sorting, see the sorting section above.
Sorting by indicator and organisation unit name
Configure report functionality Designing Standard reports in iReport
363
27.4.2.9. Charts
By default, a 3D bar chart is included in the .jrxml file that is downloaded from DHIS 2. This
is set up so that only data from the «parameter organisation unit» (often the parent or grand
parent) is used. Usually, this is a good solution. Since it is the default, we will start by looking
at bar charts, before looking at line charts.
27.4.2.9.1. Bar charts
Example bar chart
Bar charts are the default chart type in DHIS2. In this section, we will look at how to make a
bar charts like the one above, comparing the value of one indicator in several districts. To edit
the default chart in iReport, right click on it and choose Chart data.
Choose Edit Chart Data
A window will appear. By default, the Filter expression is filled in so that only data for the parent
organisation unit will be displayed. If for some reason you do not want this, simply delete the
text in the text box. In this case we do NOT want the filter, as we are making a chart showing
a comparison across districts. To continue, click the details tab.
Configure report functionality Designing Standard reports in iReport
364
Select the Details tab
Under details, you see the list of series for the chart. By default, one series is created per
crosstab column. In this case, we are looking at data for one indicator for the whole of 2010,
for a number of districts. The indicator is along the crosstab dimension.
Configure report functionality Designing Standard reports in iReport
365
List of data series
To make changes to a series, select it and click modify. Another window will appear where
there are four areas that can be edit. The three first are required, but it is sufficient to add an
empty quote («») in one of the first two.
The data series editor
Configure report functionality Designing Standard reports in iReport
366
The first box is a text field where the name of the series can be inserted or edited. This is the
field that will be used to fill the text in the legend box (shown below).
Chart legend
However, if you want to have the name of each bar along the x-axis of the chart instead of
using the legend, this can be done by adding whatever text you want to present in the Category
expression field, or by inserting an expression to have it filled automatically when the report
is run. In this case, we want to have one bar for each organisation unit. We therefore edit the
category expression by clicking on the button to the right.
Editing the category expression
As the expression, we chose organisationunitname, as shown below.
Choose organisation unit name.
Configure report functionality Designing Standard reports in iReport
367
When we are finished, the series editor should look like below. Click OK, then Close to close
the Chart Details window.
Series editor.
If you add a good description in the Category expression area, you can leave out the legend
box. This is done in the Report properties panel of iReport, where you can also edit many other
details of the chart.
Checkbox to show/hide chart legend
We can also add a title to the chart, for example the name of the indicator. This is also done
in the Chart properties panel, under Title expression.
Edit chart title
The Expression editor window will appear, where you can enter the title. Note that the title
must be in quotes, as shown below.
Configure report functionality Designing Standard reports in iReport
368
Expression editor
The chart is now ready.
27.4.2.9.2. Line charts
Line charts can be useful in many circumstances. However, to make line charts the report data
(report table) must be suited for it. Thus if you want to make a line chart, it is important that the
report table does not have periods in the crosstab dimension. Examples where this is useful is
if you are making a report for a single organisation unit with one or more indicators, or if you
are making a report with one indicator and one or more organisation units.
Below, we will go though the steps needed to make a report with a line chart showing the
development of three indicators over one year, for one organisation unit. We start by making
a report table with the choices shown below:
Report table - crosstab dimensions
Report table - periods and parameters
When we open the resulting .jrxml-file in iReport, the default line chart is included. Since we
want to make a line chart, we delete this chart and drag a new chart element into the report
from the Palette panel.
Configure report functionality Designing Standard reports in iReport
369
Delete the default chart
Drag in new chart element
As soon as we drag the Chart element into the report, a window will appear. We choose the
Line chart, as shown below.
Choose Line chart
Configure report functionality Designing Standard reports in iReport
370
A chart wizard will appear. Click next in the first step, then Finish in the next - we will add
the data later.
Choose Next
Choose Finish
Configure report functionality Designing Standard reports in iReport
371
Next, adjust the size and position of the chart in your report. Then, we will add one data series
for each of our three indicators. Right-click on the chart and choose Chart data. If you are
making a chart with one indicator and several organisation units, you probably want to make
a filter expression so that only data from the parameter/parent organisation unit is used in the
chart. To do this, add this line to the Filter expression area:
$F{organisation_unit_is_parent}.equals("Yes")
In our example, we only have on organisation unit, so this is not necessary. Next, click the
details tab to see a list of the series in the chart. For now, this list is empty, but we will add
one series for each of our three indicators. To add a series, click the Add button.
Choose the Details tab
Configure report functionality Designing Standard reports in iReport
372
Choose Add
In the window that appears, enter the name of the first of the indicators in the Series expression
window. Remember to put the name in quotes. In the category expression (along the x-axis)
we want the months, so we use the button next to the field to open the Expression editor and
add periodname.
Configure report functionality Designing Standard reports in iReport
373
Edit the category expression
Choose periodname as the expression
In the value expression, we add the actual data values for our first indicator. Use the Expression
editor again to do this. When we are finished, the window should look like the one below, only
with different names according to the indicator.
Configure report functionality Designing Standard reports in iReport
374
The finished category series
You can then Click OK to close the window. Follow the same steps to add a series for the other
indicators.
Configure report functionality Designing Standard reports in iReport
375
Chart details after adding three series
Close the window, and the data for the line chart should be ready. However, some additional
adjustments might be needed - most of these can be found in the Line chart properties panel.
For example, when making a month by month chart as we have in example, there is often not
enough space for the month names along the category axis. This can be fixed by rotating the
labels by for example -40 degrees, by using the property Category Axis Tick Label Rotation.
Changing the appearance of the category labels
Many other options are available to give the chart the desired look.
Configure report functionality Designing Standard reports in iReport
376
The finished line chart
27.4.2.10. Adding the Report to DHIS2
We can now switch to DHIS2 and import our report. Go to the Report Module in DHIS2, and
select "Standard Report". In the "Standard Report" screen, click "Add new", or edit an existing
one.
In the following screen, there are several actions we need to take. First, enter a name for the
new "Standard Report". Second, for design, click "Choose File" and find the .jrxml-file you have
edited in iReport. Then we select the report table that we used as a basis for the report in
iReport. Click add, and it should move to the "Selected report tables" area. Finally, click save.
Upload the file and choose the right report table
The report is now available as a "Standard Report" in DHIS2:
Configure report functionality Designing SQL based standard reports
377
The report is available as a Standard Report
27.4.2.11. Some final guidelines
Use the same version of iReport and DHIS2's version of Jasper reports. See the About page
in DHIS2 for the Jasper version in use.
Use report tables with cross tab dimensions as your data source for your report designs. This
will make it a lot easier to design reports where you need to put specific indicators, periods,
or orgunits on columns.
Learn from others, there are many DHIS2 report designs for Jasper on launchpad, see http://
bazaar.launchpad.net/~DHIS2-devs-core/DHIS2/trunk/files/head:/resources/
27.4.3. Designing SQL based standard reports
A standard report might be based on SQL queries. This is useful when you need to access
multiple tables in the DHIS2 database and do custom selects and joins.
- This step is optional, but handy when you need to debug your reports and when you have
direct access to the database you want to use. Click on the "report datasources" button, "New",
"Database JDBC connection" and click "next". In this window you can give you connection a
name and select the JDBC driver. PostgreSQL and MySQL should come included in your iReport.
Then enter the JDBC connection URL, username and password. The last three refers to your
database and can be retrieved from your DHIS2 configuration file (hibernate.properties). Click
"save". You have now connected iReport to your database.
- Go to standard reports and click "add new", then "get report template". Open this template
in iReport. This template contains a series of report parameters which can be used to create
dynamic SQL statements. These parameters will be substituted based on the report parameters
which we will later select and include in the standard report. The parameters are:
periods - string of comma-separated identifiers of the relative periods
period_name - name of the reporting period
organisationunits - identifier of the selected organisation units
organisationunit_name - name of the reporting organisation unit
organisationunit_level - level of the reporting organisation unit
organisationunit_level_column - name of the corresponding column in the _orgunitstructure
resource table
These parameters can be included in SQL statements using the $P!{periods} syntax, where
"periods" represents the parameter.
- To create a SQL query in iReport, click on the "report query" button. Write or paste your
query into the textarea. An example SQL query using parameters which will create a report
displaying raw data values at the fourth level in the org unit hierarchy is:
select district.name as district, chiefdom.name as chiefdom, ou.name as facility,
bcg.value as bcg, yellowfever.value as yellowfever, measles.value as measles
from organisationunit ou
left outer join _orgunitstructure ous
on (ou.organisationunitid=ous.organisationunitid)
left outer join organisationunit district
Configure report functionality Designing HTML based standard reports
378
on (ous.idlevel2=district.organisationunitid)
left outer join organisationunit chiefdom
on (ous.idlevel3=chiefdom.organisationunitid)
left outer join (
select sourceid, sum(cast(value as double precision)) as value
from datavalue
where dataelementid=359706
and periodid=$P!{periods}
group by sourceid) as bcg on bcg.sourceid=ou.organisationunitid
left outer join (
select sourceid, sum(cast(value as double precision)) as value
from datavalue
where dataelementid=35
and periodid=$P!{periods}
group by sourceid) as yellowfever on yellowfever.sourceid=ou.organisationunitid
where ous.level=4
and ous.$P!{organisationunit_level_column}=$P!{organisationunits}
order by district.name, chiefdom.name, ou.name;
Notice how all parameters are used in the query, along with SQL joins of resource tables in
the DHIS2 database.
- Finally, back in the add new report screen, we click on "Use JDBC data source". This enables
you to select any relative period and report parameters for your report. Relative periods are
relative to today's date. Report parameters will cause a prompt during report creation and
makes it possible to dynamically select organisation units and periods to use for your report
during runtime. For the example above, we must select "reporting month" under relative
periods and both "reporting month" and "organisation unit" under report parameters. Click
save. This will redirect you to the list of reports, where you can click the green "create" icon
next to your report to render it.
27.4.4. Designing HTML based standard reports
A standard report can be designed using purely HTML and JavaScript. This requires a little bit
of development experience in the mentioned subjects. The benefit of HTML based standard
reports is that it allows for maximum flexibility. Using HTML you can design exactly the report
you want, positioning tables, logos and values on the page according to your design needs.
You can write and save your standard report design in a regular text file. To upload your HTML
based standard report to DHIS2 do the following:
Navigate to standard reports and click "Add new".
Give the report a name.
Select "HTML report" as type.
If you want to you can download a report template by clicking on "Get HTML report template".
Select desired relative periods - these will be available in JavaScript in your report.
Select report parameters - these will be available in JavaScript in your report.
The report template, which you can download after selecting report type, is a useful starting
point for developing HTML based standard reports. It gives you the basic structure and suggests
how you can use JavaScript and CSS in the report. JavaScript and CSS can easily be included
using standard script and style tags.
If you selected relative periods when creating the standard report you can access these in
JavaScript like this:
var periods = dhis2.report.periods; // An array with period identifiers
var period = periods[0];
If you selected the organisation unit report parameter when creating the standard report you
can access the selected organisation unit in JavaScript like this:
Configure report functionality Designing HTML based standard reports
379
var orgUnit = dhis2.report.organisationUnit; // An object
var id = orgUnit.id;
var name = orgUnit.name;
var code = orgUnit.code;
When designing these reports you can utilize the analytics Web API resource in order to retrieve
aggregated data in JavaScript. Have a look in the Web API chapter in this guide for a closer
description. As a complete, minimal example you can retrieve analytics data after the report
has been loaded and use that data to set the inner text of an HTML element like this:
<script type="text/javascript">
$( document ).ready( function() {
$.get( "../api/analytics?
dimension=dx:FnYCr2EAzWS;eTDtyyaSA7f&dimension=pe:THIS_YEAR&filter=ou:ImspTQPwCqd",
function( json ) {
$( "#bcg" ).html( json.rows[0][2] );
$( "#fic" ).html( json.rows[1][2] );
} );
} );
</script>
<div>BGG coverage: <span id="bcg"></span></div>
<div>FIC coverage: <span id="fic"></span></div>
A few other tips: To include graphics you can convert an image to SVG and embed that SVG
content directly in the report - DHIS2 is based on HTML 5 where SVG tags are valid markup.
To include charts and maps in your report you can use the charts and maps resources in the
Web API. You can use the full capability of the Web API from JavaScript in your report - it may
be useful to read through the Web API chapter to get an overview of all available resources.
Import and export data and metadata Meta-data import
381
Chapter 28. Import and export data and
metadata
In a primary health system, the HMIS typically involves a distributed application, where the
same application is running in different geographical locations (PHCs,CHCs, hospitals, districts,
and state). Most of these physical locations do not have Internet connectivity, and hence they
work off-line. At some point (normally at the district level), the data needs to be synchronised
in order to have a consolidated database for the a particular geographical region. For this, it
is important to be able to export data from one location (which is working offline, say at the
health facility level) to another one say at the district level where the data would need to be
imported. This feature of exporting and importing is thus a crucial function of a HMIS. This
feature also helps us overcome the dependency on Internet to some degree, as data updates
can be transferred via USB key where there is no connectivity, or through email where there is
limited Internet connectivity. DHIS2 provides robust export-import functionality to fulfill these
needs.
To access the main Import-Export module, choose Services->Import-Export. A number of
services are available, all of which will be described in detail in respective sections below.
28.1. Meta-data import
28.1.1. Meta-data import
Meta-data objects can be easily imported by accessing Import-Export->Meta-Data import.
Select the file to import by pressing "Select" and choose the file from your local file system.
When importing XML and JSON files, the system will automatically detect which type of objects
which should be imported. When importing CSV metadata, you will need to specify the object
type. Consult the corresponding section in this manual on "CSV Metadata import" for more
specific information on how the CSV file should be created.
Import and export data and metadata Meta-data import
382
Default import screen
There are two separate options for importing data.
Dry run: This is similar to the old preview option, this will do a dry run import, and give you
information about any errors.
Strategy: There are three options here, "New and Updates", "New only", and "Update only".
New and updates tells the importer to expect both new meta-data, and updates to existing
ones. New only will only accept fresh meta-data, usually you would use this on a empty
database. Updates only will only allow the meta-data to match meta-data that is already
there (same identifiers, new name etc).
Note
It is highly recommend always using the Dry run option when importing data to
make sure you keep control over any changes to your meta-data and databases being
out of synch on data elements or organisation unit names
28.1.1.1. Dry run before importing
Before doing the import into your database, it is highly recommended that you run the import
with the dry run option set to true first. This will enabled you to have a look at how many new,
updates, and ignored meta-data there will be. After you have selected your file, set dry run to
true, you can now click the import button. After doing this, you will be greeted by this window.
Import and export data and metadata Meta-data import
383
Here you can see a short summary of what was contained in your import file. To see further
details, please click on the "Display import summary" link.
Here you can see that the import dry run was successful and the import contained 1 new
organisation unit, 1332 updated, and 4 organisation unit levels.
Below you can see another example.
Here you can see that the organisation unit "Nduvuibu MCHP" had a unknown reference to an
object with ID "aaaU6Kr7Gtpidn", which means that an object with this ID was not present in
your imported file, and it could not be found in the existing database. Its important to note that
Import and export data and metadata Import CSV meta-data
384
even if a reference could not be found, the object will still be imported, but you might have to
fix this directly in DHIS2 later, if the reference should have pointed to something else.
28.1.1.2. Matching identifiers in DXF2
The DXF2 format currently support matching for two identifiers, the internal DHIS2 identifier
(known as a UID), and also using an external identifier called called a "code". When the importer
is trying to search for references (like the one above), it will first go to the UID field, and then
to the code field. This allows you to import from legacy systems without having a UID for every
meta-data object. I.e. if you are importing facility data from a legacy system, you can leave
out the ID field completely (DHIS2 will fill this in for you) and the put the legacy systems own
identifiers in the code field, this identifier is required to be unique. This not only works for
organisation units, but for all kinds of meta-data, allowing for easy import from other systems.
28.1.2. Import CSV meta-data
To import CV meta-data go to import-export module and select CSV Meta-Data Import form
the left side menu. You must select the object type which your CSV file contains. You can only
upload one type of objects at the time. Upload your file and click update. For the CSV format,
please visit the Web API chapter > CSV meta-data import in the developer guide.
28.1.3. GML data import
The GML import function can be used to import data prepared in the Geography Markup
Language (GML). GML can be used to update the coordinates (both polygons and points). Once
you have prepared your GML file as detailed in the chapter on "Importing coordinates", you
can load the file with this function.
Importing the organisation unit hierarchy from GML is not supported. Therefore you should
create the organisation unit hierarchy separately, and then use GML to update the coordinates
once the hierarchy has been created.
28.2. Import data
The import option allows different instance of DHIS2 to receive standardised sets of data in the
absence of a networked system. The functionality can also be used to import data produced
by another system (perhaps on a regular basis) or to import legacy data which has been
transformed into a format which DHIS2 can understand. Typically, a data set is exported from
one DHIS2 instance (e.g. a district level system) to another system (e.g. a provincial level
system). DHIS2 is also capable of importing data directly from a DHIS2 1.4 Access database.
Each of these options will be discussed in the following sections.
28.2.1. XML data import
To import data in XML format, simply select Services->Import-export->XML data import.
Similar options to the XML meta-data import facility are available. Please refer to the Developer
guide > Web API > Data values chapter on XML data import for details on the XML format
which is used by DHIS2 for aggregate data import.
28.2.2. Import CSV data
DHIS2 supports import of data in the CSV (Comma Separated Values) format. This can be used
to import exchange file produced by DHIS2 itself. It also comes in handy when you want to
import data from a third-party system as CSV is widely supported in applications and is easy
to produce manually.
Import and export data and metadata Event data import
385
To import a CSV data exchange file navigate to the CSV Data Import item in the left-side menu.
Upload the exchange file and click Import. CSV files can be imported both as plain text file or
as compressed ZIP file archive.
Please refer to the Developer guide > Web API > Data values chapter on CSV data import for
a description of the CSV format to use.
28.2.3. Event data import
Event data can also be easily imported with the "Event data import" function. Refer to the
section in the WebAPI for more information on the format used for importing events. Otherwise,
the functionality is the same as the XML data import used for aggregate data.
28.2.4. Import PDF data
DHIS2 supports import of data in the PDF format. This can be used to import data produced by
off-line PDF data entry forms. Please refer to the section "Data set management" for details
on how to produce a PDF form which can be used for off-line data entry.
To import a PDF data file, navigate to the PDF Data Import item in the left-side menu. Upload
the completed PDF file and click Import.
After the import process is finished, you can follow the link to the import summary, which will
inform you about the outcome of the import process in terms of number of records imported,
updated and ignored and potential conflicts.
28.2.5. Import data from DHIS2 1.4
There are two ways to import data from a DHIS2 1.4 database; 1) through the 1.4 XML-based
export files, or 2) directly from the DHIS2 1.4 data file (.mdb). Both are accessible from the
DHIS2 1.4 Import menu under Import in the Import-Export module.
It is critical that all data integrity violations which are present in the DHIS2 1.4 database be fully
resolved before attempting an import into DHIS2. You can check the data integrity of DHIS2
1.4 through the CORE Module->Advanced->Data integrity checks. A report will be generated
of all data integrity violations which should be resolved prior to importing into DHIS2.
Warning
When data is imported from DHIS2 1.4, both the meta-data as well as data are imported.
You should therefore be exceedingly careful that the meta-data present in DHIS2 1.4 is
compatible with your DHIS2 data, otherwise during a DHIS2 1.4 data import, the meta-
data in the DHIS2 system will be potentially overwritten by the i
28.2.5.1. DHIS2 1.4 File (database) Import
This method is recommend when doing large imports from 1.4, and especially when importing
into a new DHIS2 database.
DHIS2 1.4 File Configuration
Before you can start the 1.4 file import you need to provide a few details about the 1.4
database:
Datafile(#): Here you put the full path to the DHIS2 1.4 data file you want to import from, e.g.
C:\DHIS14\DHIS_#LR_LIBERIA.mdb.
Import and export data and metadata Import data from DHIS2 1.4
386
Username: Leave blank (unless you have set up extra security measures on the file)
Password: Leave blank (unless you have set up extra security measures on the file)
Levels: Provide the number of levels in the orgunit hierarchy in your 1.4 database, e.g. 5.
Click "Save" and you will return to the DHIS2 1.4 File Import window.
Import Type:
As with other imports you have the options to Import (directly), Preview, or Analyse the import.
We recommend using the Analyse option first to check that the 1.4 database is OK and ready
to be imported.
When importing a large database into a new blank DHIS2 database we recommend using the
Import option to save time.
For smaller incremental imports the Preview is OK.
Last Updated:
If you want the full import, all the data in the 1.4 database you leave this field blank.
If you only want to do an incremental import into an already existing DHIS2 database you can
use this field to filter which data values to import. Only values added or edited after the date you
specify will be imported. This filter makes use of the LastUpdated column in the RoutineData
table in the DHIS2 1.4 data file.
Import process:
When you are done selecting Method, and LastUpdated you can begin the import by clicking on
the Import button. This process might take a long time, depending on how many data values
you are importing. On a reasonable spec. computer the import takes about 2 million records
per 30 minutes.
28.2.5.2. DHIS2 1.4 XML Import
Import though XML data from DHIS2 1.4 is also possible using the standard DHIS2 1.4 export
format. Just be sure that the DHIS2 1.4 export format has been set to "DHIS 2" as illustrated
in the screen shot below. After the data has been exported by DHIS2 1.4, you can import the
data by choosing "Services->Import-Export->DHIS 1.4 Import->DHIS2 1.4 XML Import" and
proceeding via the procedure outline in the previous section.
Import and export data and metadata Export data and meta-data
387
28.2.5.3. Limitations to DHIS2 1.4 imports
Although it is possible to import and export data between instances of DHIS2 1.4 and DHIS2,
there are significant limitations. Currently, the import of some metadata is not supported from
DHIS2 1.4 to DHIS2. This includes:
Organisational unit alternate names
Compulsory data element pairings
Custom data entry forms
Dataset data entry levels
It is also important that the aggregation operator defined in DHIS2 1.4 be set to the correct
value. Some data, such as population, should have their aggregation operator set to "Average"
in DHIS2, as this controls how the aggregation of data is handled over time (but not within the
organisational unit hierarchy).
28.3. Export data and meta-data
DHIS2 makes it possible to export various types of data in multiple data formats. You can
export your data, also referred to as measures or facts; and your meta-data, which refers to the
information describing your data. Data can be exported both in raw, non-aggregated format
and in aggregated format. It is also possible to export a combination of data and meta-data
in case you have special requirements. This chapter covers mainly how to export data and
meta-data through the user interface of the import-export DHIS2 module. Data can also be
exported programmatically through the DHIS2 Web API, and it is useful to be aware of the
various options available:
Export raw, non-aggregated data through the user interface: Covered in this chapter.
Export aggregated data programmatically through the Web API: Please refer to the Web API
chapter, section on Analytics.
Export a combination of data and meta-data: Please refer to the SQL view sections in the
Data administration chapter and Web API chapter.
Export meta-data through the user interface: Covered in this chapter.
Export meta-data programmatically through the Web API: Please refer to the Web API
chapter, section on meta data.
Data can be exported on various formats, including DXF 2 (the DHIS2 meta-data and data
exchange format based on XML), CSV, PDF, MS Excel and the DHIS2 1.4 XML format.
Another aspect of data export is the type of DHIS2 deployment. In the case of online
deployment, all data is saved into a single database only. In an offline deployment, each
instance will store data in a separate database in their local system. In an offline deployment,
after the data entry is finished, data will have to be manually sent to the next level in the
organizational hierarchy. In an on-line application this is not required, as all data is captured
over an Internet connection and stored in a central location.
28.3.1. Metadata export
Meta-data is "data about data". In the context of DHIS2, meta-data consists of definitions of
data elements, indicators, the structure and names contained in the organizational hierarchy,
and other options. Click on the "Meta-data export" link from the main "Data export" screen
in order to access this. Just select the features, format, and the compression that you want
and click "Export". This metadata file can then be transmitted just like a data file, except it
will contain information on the definitions of the various features, as opposed to the values
of the data themselves.
Import and export data and metadata Metadata export with dependencies
388
Simply choose the objects which you would like to export, and click "Export".
28.3.2. Metadata export with dependencies
Metadata export with dependencies lets you create canned exports for metadata objects. This
type of export will include the metadata objects and the metadata object's related objects,
that is the metadata which belong together with the main object.
Table28.1.Object types and their dependencies
Object type Dependencies included in export
Data set Data elements
Sections
Indicators
Indicator types
Attributes
Data entry forms
Legend sets
Legends
Category combinations
Import and export data and metadata Metadata export with dependencies
389
Object type Dependencies included in export
Categories
Category options
Category option combinations
Option sets
Program Data entry form
Tracked entity
Program stages
Program attributes
Program indicators
Program rules
Program rule actions
Program rule variables
Program attributes
Data elements
Category combinations
Categories
Category options
Category option combinations
Option sets
Category combination Category combinations
Categories
Category options
Category option combinations
Attributes
Dashboard Dashboard items
Charts
Event charts
Pivot tables
Event reports
Maps
Reports
Resources
Import and export data and metadata Data export
390
Object type Dependencies included in export
Data element group Data elements
Category combinations
Categories
Category options
Category option combinations
Option sets
Attributes
Legend sets
Legends
1. Open the Import-Export app.
2. Click Metadata dependency export.
3. Select an Object type: Data set, Program, category combo, Dashboard or Data
element group.
4. Select an Object.
5. Select a Format.
6. Select a format: XML or JSON.
7. Select Compression: Zip, Gzip or Uncompressed.
8. Click Export. The export file is downloaded to your local computer.
28.3.3. Data export
To export raw data from DHIS2, choose "Import-export->Data export". Select the organisation
unit(s), the start and end date, and dataset or data sets for which data export should be
selected. You can also select which types of identifiers which will be exported by pressing
"More options" and then selecting either UID, Code, or Name for data elements, organisation
units and category options. Once you have specified all options as required, press "Export as..."
along with the format which you would like to export the data as (XML, JSON or CSV).
Import and export data and metadata Event data export
391
A pop-up save option will appear on the displayed screen (see picture below) prompting the
saving of the exported data. You may save the export folder on your desktop or any other
folder by selecting the ‘Save to Disk’ option from the pop-up prompt.
28.3.4. Event data export
You can export event or tracker data in XML, JSON or CSV formats.
1. Open the Import-Export app.
2. Click Event Export.
3. Select an organisation unit.
4. Select a program and a program stage (if applicable).
5. Select the ID scheme to use for export: UID (default) or CODE.
If you select CODE but the object's attribute does not have code, it will not be included in
the return payload.
6. Select Start date and End date.
7. Select the Inclusion:
Selected organisation unit: Export event data only for the selected organisation unit
Include children of organisation unit: Export event data for the children of the
organisation unit as well as the selected organisation unit itself.
Import and export data and metadata Export data to other systems
392
Include descendants of organisation unit: Export event data for the descendants of
the organisation unit as well as the selected organisation unit itself.
8. Select a format: XML, JSON or CSV.
9. Select Compression: Zip, Gzip or Uncompressed.
10.Click Export. The export file is downloaded to your local computer.
28.3.5. Export data to other systems
28.3.5.1. DHIS2 1.4 Meta-data export
The DHIS2 1.4 Meta-data export functionality provides the same functionality as the standard
DHIS2 meta-data export, except that the resulting file can be used to transmit meta-data
information to DHIS2 1.4 systems.
28.3.5.2. DHIS2 1.4 Detailed Metadata Export
The DHIS2 1.4 Metadata export functionality provides the same functionality as the detailed
DHIS2 metadata export, except that the resulting file can be used to transmit meta-data
information to DHIS2 1.4 systems. Simply select the data elements and indicators that you
want and click "Export" to begin the export process.
Import and export data and metadata Export data to other systems
393
28.3.5.3. DHIS2 1.4 Data export
This service allows you to export data to a format which can easily be imported into a
compatible DHIS2 1.4 database.
28.3.5.4. XLS metadata export
Meta-data can be exported directly to the XLS format with this function. Simply click all of the
available object which you wish to export and click "Export".
Configure metadata synchronizing About data and metadata
synchronization
395
Chapter 29. Configure metadata
synchronizing
29.1. About data and metadata synchronization
You can synchronize data and metadata between different DHIS2 instances. Given two
instances in a central-local deployment strategy, metadata created at the central system
can be synchronized with the local system and the data created at local system can be
synchronized with the central system. This can be useful when you've multiple stand-alone
instances of DHIS2 and global metadata needs to be created at all the local instances.
If metadata creation and update take place at the central system and if the metadata
synchronisation task is enabled, the metadata gets synchronized down to all the local instances
which are bound to the central instance. These local instances will in turn push data values
to the central instance. Enabling or disabling versioning of metadata synchronization at local
instance, will not hinder the metadata synchronization process. This is because the metadata
synchronization interacts with versioning end points of the central instance and not with end
points of the local instance.
Each snapshot of metadata export generated is referred to a metadata version. A new
metadata version contains only the changes between the previous version and the current
version, that is it's an export between two timestamps. All metadata versions are maintained in
the DHIS2 database and are available to all local instances that connect to it. You can schedule
each of the local instances to download new metadata versions. It is recommended to keep
the metadata versions' sizes small and logical.
Don't create new metadata versions on local instances
Each instance of DHIS2, whether central or local, can create metadata versions. The
local instance is meant to synchronize metadata from a central system and not create
metadata on its own.
If a new metadata version is created on the local instance, this instance can't receive
new metadata versions from the central instance, since the content of the metadata
versions will be out of synchronization.
If you've created metadata versions on a local instance, you must manually deleted
these versions from the database before you can synchronize with the central instance.
Configure metadata synchronizing Workflow
396
Example29.1.
Assume the central and local DHIS2 instances have identical metadata snapshots until
version 10. Then the local instance creates a new snapshot called version 11. After that,
the central instance creates a new snapshot called version 11. When the local instance
attempts to synchronize metadata, version 11 is not downloaded. However, the content
of version 11 on the local instance is not identical to the content of version 11 on the
central instance.
Note
You can also use the Import-Export app to synchronize metadata manually.
29.2. Workflow
1. On the central instance, configure metadata versioning. You should do this once the central
instance contains metadata.
2. Connect local instance(s) to the central instance.
3. On local instance(s), configure automatic synchronization.
29.3. Configure metadata versioning on central instance
Note
To synchronize metadata, the user account of the central system must have the
following authority:
F_METADATA_MANAGE
Only users with this authority will then be able to create and download metadata. This
is to ensure security of the central system where the metadata is created. Instead of
giving the credentials of user having ALL authority to the field instances, you need to
create a user having this specific authority only.
1. On the central instance, open the System Settings app and click Synchronization.
2. Go to the Metadata versioning section and select Enable versioning for metadata
sync.
3. (Optional) Select Don't sync metadata if DHIS versions differ.
4. Select a type of metadata version: Best effort or Atomic.
Best effort means that if the metadata import encounters missing references (for example
missing data elements on a data element group import) it ignores the errors and continues
the import.
Atomic means all or nothing - the metadata import will fail if any of the references do
not exist.
Configure metadata synchronizing Connect local instance to central
instance
397
Note
Each metadata entity is associated with a "User" object. If this "User" reference is
missing while importing metadata version of type ATOMIC, the import will fail at the
validation phase itself. This means that the user who creates metadata also needs
to synchronize down to local instances to successfully import the metadata version
of type ATOMIC.
5. Click Create new version. The new version is added to the versioning table.
29.4. Connect local instance to central instance
To enable metadata synchronization, you must configure the connection between the local
instance and the central instance.
1. On the local instance, open the System Settings app and click Synchronization.
2. Add the central DHIS2 instance's details to the local instance:
Remote server URL
Remote server user name
Remote server password
3. Go to the Metadata versioning section and select Enable versioning for metadata
sync.
4. (Optional) Select Don't sync metadata if DHIS versions differ.
The metadata schema changes between versions of DHIS2 which could make different
metadata versions incompatible.
When enabled, this option will not allow metadata synchronization to occur if the central
and local instance(s) have different DHIS2 versions. This apply to metadata synchronization
done both via the user interface and the API.
The only time it might be valuable to disable this option is when synchronizing basic entities,
for example data elements, that have not changed across DHIS2 versions.
5. (Optional) Configure email notifications to notify users about successful or unsuccessful
metadata synchronization:
a. Open the System Settings app and click Email.
b. Enter Host name, Port, User name, Password and Email sender.
c. Click Server and enter a System notifications email address.
This email address will receive notifications about the metadata synchronization status.
Tip
When you receive email notification about a metadata synchronization failure, check
which metadata version that causes the error and resolve it. Then you avoid future
errors when the system downloads new metadata versions.
29.5. Configure automatic metadata synchronization on local instance
Once you have configured automatic metadata synchronization (scheduling) on local
instance(s), the scheduler will run at that specific time and synchronize (download and import)
the metadata from the central instance. No manual intervention is required from the users at
the local instance(s).
Configure metadata synchronizing Create a new metadata version
manually on central or local instance
398
After the scheduler has completed the metadata synchronization, the local instance will have
the metadata exactly as created on the central system.
Note
Passwords of users are not synchronized. They are nullified for security reasons. After
metadata synchronization, the Admin user must reset these passwords.
1. On the local instance, open the Data Administration app and click Scheduling.
2. In the Metadata Synchronization section, select Enabled.
3. Select a time period: Daily, Weekly, Monthly or Yearly.
4. Click Start.
29.6. Create a new metadata version manually on central or local instance
1. Open the System Settings app and click Synchronization.
2. Go to the Metadata versioning section and select Enable versioning for metadata
sync.
3. (Optional) Select Don't sync metadata if DHIS versions differ.
4. Select Best effort or Atomic.
5. Click Create new version. The new version is added to the versioning table.
Example29.2.Versioning table for a central instance
When the system is a central instance, you'll see three columns in the versioning table:
Configure metadata synchronizing Create a new metadata version
manually on central or local instance
399
Object Description
Master version The latest version in the system.
Version Name of the version. The name is
automatically generated by system.
When The timestamp of the metadata version
creation at the central instance.
Type Type of metadata version.
Example29.3.Versioning table for a local instance
When system is a local instance, you'll see four columns in the versioning table:
Configure metadata synchronizing Reference information: metadata
synchronization configuration
parameters
400
Object Description
Master version The latest version of the central instance.
Note
The master version information is the
central instance's latest version. This
is important to look at the difference
between the versions of metadata that
exist at central and at local.
Last sync attempt If the last sync attempt is a failure, this will
be displayed.
Version Name of the version. The name is
automatically generated by system.
When The timestamp of the metadata version
creation at the central instance.
Type Type of metadata version.
Last sync Timestamp of when the last sync happened
for this version in this system.
29.7. Reference information: metadata synchronization configuration
parameters
The process which performs metadata synchronization is called Metadata Sync Task. This task
performs a series of steps before syncing of metadata:
Push data (aggregate data and anonymous events data) from local instance to central
instance.
Gets the current metadata version of the local instance. Then uses this version information
as a baseline to fetch the list of metadata versions created after the baseline.
Configure metadata synchronizing Reference information: metadata
synchronization configuration
parameters
401
If there are new versions created at central instance, it performs the synchronization of
metadata versions one after the other. A mail will be sent to the configured user (if any) after
each successful synchronization of metadata version at the local instance.
Once the Metadata Sync Task has run at the scheduled time, the task can retry (if any of the
steps fail) based on the configuration of the following parameters defined in dhis.conf file:
Parameter Default value
metadata.sync.retry 3
metadata.sync.retry.time.frequency.millisec 30000
Each retry will be made after the time (in millisecond) as specified. If the steps still fail even
after all the retries, then the scheduler stops its execution and then a mail will be sent to the
configured user (if any). If no values are specified then the default values will be used.
Example29.4.Metadata synchronization configuration parameters
metadata.sync.retry = 5
metadata.sync.retry.time.frequency.millisec = 10000
Mobile DHIS2 Mobile Introduction
403
Chapter 30. Mobile
This chapter covers various mobile technologies including Web, J2ME, SMS Service and SMS
Command.
30.1. DHIS2 Mobile Introduction
DHIS2 provides a range of options to allow data entry from mobile devices, including a
dedicated GPRS/3G J2ME client and two versions of DHIS2 which have been optimized
specifically for mobile browsers. Each of these solutions will be described in detail in the
following sections. DHIS2 offers several Android clients, which are described in detail in other
sections of this guid.
Collection of data in the field can be technically challenging and expensive. Mobile phone
solutions have the potential to significantly reduce the complexity of deploying a distributed
data collection system. Using a simple Java client installed on a mobile phone or a web browser
which works on the mobile phone, field workers can report directly to the DHIS2 database
through their mobile device.
While mobile phone solutions have a great potential, there are complexities with such
deployments. Phones lack processing power and have a small display, they need to be charged,
and often such deployments make the most sense in areas with poor or intermittent network
coverage.
Each of the mobile solutions are introduced briefly below, and the discussed in separate
sections in detail:
DHIS2 Light: A mobile browser optimized data entry module for all devices
This module allows for data entry directly with the browser of the mobile device. A wide
range of devices and mobile browsers are supported including: Opera mini 3 & 4 (basic and
advanced) - Opera mini 4, Nokia S40 mobiles ,Windows Phone 7, Window Mobile 6, Palm
Pre, Blackberry (v5 and v6), Firefox mobile, iOS devices (iPhone) and Android devices. This
client does not have offline-support, and an active GPRS/3G connection is required. It does
not require a new application installation on the phone to support new features, but does
require a stable data connection for use. This solution is described in Section30.2, “Mobile
browser based data entry”
DHIS2 Smartphone client: A mobile browser optimized data entry module for Smartphone
devices
This module allows for data entry directly with the browser of a Smartphone. Offline data
entry is supported and it does not require any installation of a special client on the phone
itself.
J2ME GPRS/3G client
DHIS-mobile includes two separate J2ME clients supporting GPRS/EDGE/3G as a transport
mechanism. One clients supports facility aggregate reporting and the second client supports
name-based program tracking. These clients are split into separate applications to make
deployment easier. Some health workers may have both applications installed on their
phone. Both of these clients support offline-storage of data and work on J2ME enabled devices
(feature phones).
An active GPRS/3G connection is required in order to send data to the DHIS2 database, but
data can be entered offline and transmitted when a connection is present. This client is
intended primarily for low-end devices which support J2ME applications, although the offline-
Mobile Mobile browser based data entry
404
supports adds some memory requirements which limits the handset selection. While the
solution is primarily tested on Nokia phones, it also works on several other J2ME capable
handsets.
The facility reporting J2ME client is described in the chapter "J2ME GPRS/3G Client"
30.2. Mobile browser based data entry
30.2.1. Getting started with mobile browser data entry
This approach is for data-entry on a smart phone with a mobile browser by navigating to
the URL of the DHIS2 instance, for example: the full URL link for demo on dhis2.org http://
apps.dhis2.org/dev/mobile/index.action . And your mobile browser will automatically detect
the DHIS2 application where the server URL is given (e.g.: http://apps.dhis2.org/dev). Here
is the login form to access the application with user-name and password. Click on "Login" to
continue or "Reset" to reset:
After logging in, there are the list of functions:
- Aggregate Reporting: Entries for aggregate data with defined/assigned dataset by
organisation-units
- Tracking:
Find Person: find person based on Name, Phone Number or ID, and Organization unit.
Activity Plan: Entries data for the persons by organisation-units, persons and programs/
program-stages
Mobile Getting started with mobile browser
data entry
405
Person Registration: Registry a new person
Anonymous: Entries for anonymous person based on programs
- Messages: Manage the messages and discussions from the server. Message reply is
available. User can send feedback message in Messages.
- Reports: The output reports from the server.
- Settings: User-information (e.g.: First-name, Surname, Phone number, E-mail) and the
Interface language.
- Logout: to log out the application.
- Desktop version: navigate to the desktop version of DHIS2 for administration. This require
a lot of resources from the client mobile, for example: the sufficient memory to load the pages.
Not recommended for the normal GPRS/3G/... phones.
The list above will be explained in details:
1. Aggregate Reporting: Entries for aggregate data with defined/assigned dataset by
organisation-units.
Click on the "Aggregate Reporting", then choose an Organisation Unit from the list and the
list of the datasets will be appeared for entering aggregate data. See the below example:
Step 1: Select an Organisation Unit from the list
Step 2: Select a Dataset (entry form) from the list
Mobile Getting started with mobile browser
data entry
406
Step 3: Select a period (based on the period type of the chosen dataset) from
the list
Step 4: Entering the data
Mobile Getting started with mobile browser
data entry
407
Step 5: Save the data entered after completing the data, choose the option for
data completeness if having.
2. Tracking: Find/Add Person, Visit Schedule, Person Registration, Anonymous
2.1 Find/Add Person : find person based on Name, Phone Number or ID, and Organization
unit.
Step 1: insert Name, Phone Number or ID and select the Organization Unit, then click
Search.
Mobile Getting started with mobile browser
data entry
408
Step 2: select a person
Then all the information of that person will be displayed
Step 3: choose the next program stage for entering the data
Mobile Getting started with mobile browser
data entry
409
To view all the program stages, click on the name of that program (Child Heath Program
as the screen shot)
2.2: Visit Schedule: Choose An Organization Unit
Mobile Getting started with mobile browser
data entry
410
Current Activity Plan: the list of the beneficiaries registered, enrolled, not yet finish/
complete a/many program and there is at least a program-stage open for data-entry.
+ Step 1: Choose a Person for entry
+ Step 2: Choose a current and active program-stage for entering the data
Mobile Getting started with mobile browser
data entry
411
You can also see the person's information (ID, gender, Date of Birth, and Blood Group) by
clicking on the Details (on top of the list appeared)
The details information of the chosen person:
Mobile Getting started with mobile browser
data entry
412
All Activity Plan: the list of all beneficiaries registered, enrolled, not yet finish/complete
a/many program.
Single Event:
2.3: Person Registration: Registry a new Person
Step 1: Entry personal information
Mobile Getting started with mobile browser
data entry
413
Step 2: Enroll program for the person just been registered, then click "Enroll".
Step 3: Entry required information for the chosen program, then click "Enroll"
Mobile Getting started with mobile browser
data entry
414
Here is the result:
2.4: Anonymous: Entries for anonymous person based on specific programs
Mobile Getting started with mobile browser
data entry
415
3. Messages: Manage the messages and discussions from the server. Message reply is
available.
The number showed is the unread messages. Click on that to view the list of the messages
(the unread messages are in bold and dark blue color):
Mobile Getting started with mobile browser
data entry
416
Then you can pick up the message/topic for the discussions by leaving the reply message,
see this example:
User can create and send a feedback to server in messages section. After sending out the
new feedback, the message (feedback) will be listed under "Messages" for further following
up.
4. Reports: The output reports from the server
Mobile Getting started with mobile browser
data entry
417
(will be updated)
5. Settings: User-information (e.g.: First-name, Surname, Phone number, E-mail) and the
Interface language.
Here is the form for setting the user account/access and the interface language. Click on
"SAVE" for completing the settings, see the example below:
Mobile Getting started with mobile browser
data entry
418
6. Logout: to log out the application
7. Desktop version: navigate to the desktop version of DHIS2 for administration.
Mobile Getting started with mobile browser
data entry
419
Here is the GUI of the desktop version (which require much memory for loading), not
recommended for normal mobile. The example with DHIS2 Demo (from dhis2.org)
1.
Mobile Getting started with mobile browser
data entry
420
After clicking on the "Namebased Data Entry", the next will guiding to the selections in the
following steps:
Step 1: Choose an Organisation Unit
Step 2: Choose the Activity Type
(the screen-shot with an example with "Current Activity Plan" option)
There will be normally these two type of Activity:
+ "Current Activity Plan": the list of the beneficiaries registered, enrolled, not yet finish/
complete a/many program and there is at least a program-stage open for data-entry.
+ "All Activity Plan": the list of all beneficiaries registered, enrolled, not yet finish/complete
a/many program.
Step 3: Choose a Beneficiary for entry
Mobile Getting started with mobile browser
data entry
421
(the screen-shot with an example with "Hybia Welde" option)
Step 4: Choose a current and active program-stage for entering the data
(the screen-shot with an example with "16-24 months after birth" option)
You can also see the beneficiary's information (ID, gender, Date of Birth, and Blood Group)
by clicking on the Details (on top of the list appeared)
Mobile Getting started with mobile browser
data entry
422
The details information of the chosen beneficiary:
2. Beneficiary Registration: Registry a new beneficiary
Mobile Getting started with mobile browser
data entry
423
Step 1: Choose an OrganisationUnit
Step 2: Fill in the Beneficiary Registration form
Mobile Getting started with mobile browser
data entry
424
There necessary information: Full Name, Gender, Date of Birth (and Blood Group).
Click on "SAVE" to register a new beneficiary.
A message "Successfully Saved" will appear when the beneficiary is created/registered
successfully.
3. Beneficiary Enrollment: Enroll a beneficiary to one or many programs
Mobile Getting started with mobile browser
data entry
425
Before enrolling a beneficiary to a program, the search function for a beneficiary is provided:
If the beneficiary is found, the result will be listed. The simply click on the beneficiary name
for navigating to the programs in which the beneficiary enrolled:
The below screen-shot example describes the beneficiary named "Nguyen Van A":
- Has not enrolled any programs before
Mobile Getting started with mobile browser
data entry
426
- There is one program: "Child Health Program" available for enrollment
The list of the available programs for enrollment will be listed. Just click on the program for
enrollment by specifying the date of enrollment and the date of incident. See the example:
After clicking on the "ENROLL" button, if successful, the program enrolled will be listed under
"Enrolled Programs for" + <Name of the beneficiary>, see the example:
4. Messages: Manage the messages and discussions from the server. Message reply is
available.
Mobile Getting started with mobile browser
data entry
427
The number showed is the unread messages. Click on that to view the list of the messages
(the unread messages are in bold and dark blue color):
Then you can pick up the message/topic for the discussions by leaving the reply message,
see this example:
Mobile Getting started with mobile browser
data entry
428
5. Reports: The output reports from the server
(will be updated)
6. Settings: User-information (e.g.: First-name, Surname, Phone number, E-mail) and the
Interface language.
Mobile Getting started with mobile browser
data entry
429
Here is the form for setting the user account/access and the interface language. Click on
"SAVE" for completing the settings, see the example below:
7. Feedback: the extra function for creating a new message to send to the server. The new
created feedback from this will be listed under "Messages"
Mobile Getting started with mobile browser
data entry
430
After clicking on the "Feedback", there will be a form for editing/sending out a new message/
discussion. See the example below:
After sending out the new feedback, the message (feedback) will be listed under "Messages"
for further following up.
Mobile Getting started with mobile browser
data entry
431
8. Logout: to log out the application
9. Desktop version: navigate to the desktop version of DHIS2 for administration.
Mobile J2ME GPRS/3G Client
432
Here is the GUI of the desktop version (which require much memory for loading), not
recommended for normal mobile. The example with DHIS2 Demo (from dhis2.org)
30.3. J2ME GPRS/3G Client
The DHIS2 GPRS/3G mobile module provides a mechanism for remote clients using mobile
phones to enter data directly into the DHIS2 system. There are two functions of the client,
namely:
The solution relies on the mobile phone having a data connection available (i.e. GPRS, Edge,
3G), over which it communicates with a DHIS2 instance which must be publicly available on
the internet, as any other web server. The client application on the phone downloads the data
entry forms to the phone from the server, and the forms can therefore be updated without
installing a new application. This is also a crucial feature for community reporting, which relies
on regularly downloading activity plans from the server.
Facility reporting, for data entry and reporting of regular DHIS2 aggregate data,
Activity reporting, for supporting individual activity reporting with the Community module.
30.3.1. Data connection availability
Data connection availability can be a problem in many of the contexts where DHIS2 mobile
reporting would otherwise be a good solution for getting data directly into DHIS2. If that is
the case for you, you might want to consider trying the SMS based solution described in a
separate document. Keep in mind that even though a data connection is currently required for
communication between the server and the mobile phone, it is only required when initializing
Mobile J2ME GPRS 3G facility reporting client
433
or updating the mobile application and when sending reports to the server. The phone stores
all entered data locally, so it can work fine with only temporary access to a data connection
on a regular basis.
30.3.2. J2ME GPRS 3G facility reporting client
The server side component of the web based solution is included in the general build of DHIS2.
In order to configure the DHIS2 web-based mobile reporting, you should follow the following
steps.
Set the "Available for Mobile Reporting" flag for the data sets you want reported: Under
Maintenance->DataSet->Edit mark the “Available for Mobile Reporting” check box and save.
Create a user role for the mobile user. Select Maintenance->Users->User Role->Add new.
Add a user role name and description. Add the desired data sets for the role. The mobile user
role will need to have at least privileges for DHIS2 Web API. Save the user role by clicking
"Save".
Create a user which will be used by the client to login from Maintenance->Users->User -
>Add new. Fill in all of the required details, keeping in mind that the password must be at
least 8 digits long, contain one capital letter,and one digit. Assign the desired user role to
the user which was created in the previous step.
Important
Assign the user to exactly one organisation unit. Each mobile reporting client will need
their own user name and password.
30.3.3. Detailed configuration of data sets and reporting forms
Though the previous steps is all that should be needed for testing the solution more detail
configuration of the datasets may be required and are described in the following sections.
30.3.3.1. The mapping of data sets to form layout on the phone
By default, a data set is mapped to a single form on the phone. If the data set is divided
into sections, each section is displayed as a separate page on the phone. If a data element
has more than one category option combo it will be displayed as a heading with the category
combination options following.
Table30.1.
Form design element DHIS2 Metadata Metadata element
Form title Data set Short Name if it exists,
otherwise Name
Page tile Section Section name (or form name
if no sections)
Question Data element Alternative name if it exists,
otherwise Name
Question name if combos Category option combo name
30.3.3.2. Sorting of forms
By default, data elements will be sorted according to the global sorting assigned in DHIS2.
If sections are used, their section specific sorting order will be used. In some cases, when
Mobile Mobile application setup
434
sections are not used, a data element might be used in multiple data sets, and conflict in the
way it should be sorted in individual data sets. A work around for this situation is to wrap the
whole dataset in one section (note that this will only work if the data elements have the same
category option combo)
30.3.3.3. Versioning of data sets
To make it possible to compare and update the data sets on the mobile phone with the version
on the server, data sets are automatically versioned when you edit the data set structure.
Some changes which occur on the DHIS2 server, will cause the mobile client to update its forms
with a new version.
Changes that currently trigger a new data set version
Create DataSet
Edit DataSet
Create/edit/delete Section in DataSet
Sort Section Order
Update DataElement (affect many related DataSets)
Delete DataElement (affect many related DataSets)
Edit DataElement Category
Edit DataElement Category Combo
30.3.3.4. Language support
Multi-language support is available.
DataSet and DataElement are translated through web-based function. Default language on
server is used on mobile in cases requested language from mobile is not available.
30.3.4. Mobile application setup
30.3.4.1. Installation and initialization
30.3.4.1.1. Installation
Download the jar packages from the DHIS2 homepage: www.dhis2.org/downloads
30.3.4.1.2. Initialization
Initialization should be performed before the phones are delivered end-users. Given the large
variation in possible phone configurations, it is impossible to describe the exact steps which
are required in order to enable the client on the phone. However, for most phones, simply
copying the DHIS2 Web Mobile client "JAR" file to the phone with a USB cable or via Bluetooth
is sufficient. Of course, GPRS/3G connectivity must be enabled. Contact your mobile service
provider for exact details on the configuration of the phones and networks.
Mobile Mobile application setup
435
Once the client has been installed on the phone, an initialization process must occur by
providing a user name, password and server URL.
1. Logging into the server for the first time.
The first time the client logins to the server, or if the client is reinitialized, the username,
password and server URL must be entered.
If the client is unable to login, there could be several possible error messages which you see.
Connection Not Found: The specified server URL is not correct. Check the server address,
ensure that the server is actually reachable, and try again.
Invalid User Name Or Password: the username or password is incorrect
Application not authorized to access restricted APIs : The server can be contacted, but the
user does not have the necessary permissions to access the mobile reporting module
2. Setting the PIN number: After the initial login process, a PIN number can be entered by the
user. This will make the login process much easier, as the user only has to remember the
four digit pin number, as opposed to typing in the user name and password each time. The
PIN number can be preset if the phone is initialized prior to delivery, or it can be set by the
users themselves if they have been provided with usernames and passwords.
After entering the PIN, press (Menu)->Next.
3. Download all forms: After the PIN has been specified, all forms will be downloaded from the
server and stored locally on the phone..
If the user has been configured to report on aggregate datasets, a list of appropriate datasets
will be displayed. If the user is responsible for community based reporting, the list of assigned
activities is displayed.
Notes: If the Health Worker is responsible for both Facility Reporting and Community
Reporting, DHIS2 server will send all forms of both Facility Reporting and Community
Reporting to mobile and on mobile, there will be a screen to choose whether displaying
Facility Reporting or Community Reporting.
Errors:
Mobile Mobile application setup
436
30.3.4.2. Logging in (for regular use)
After starting the application, the PIN form is displayed.
PIN: Enter the four digit number PIN.
Reinitialize Command: this function will clear all data on mobile and we start from the login
screen with username and password.
Errors: Invalid PIN: If the user has entered an invalid PIN, they will need to enter the correct
PIN, or reinitialize the application with the correct username and password.
30.3.4.3. Facility Reporting Module
30.3.4.3.1. Entering data
After selecting an aggregate dataset from the "Select report form" window, the user will need
to select an appropriate time period. A list of available time periods is automatically generated.
1. After the user has entered their PIN, they can select from a list of available datasets. Select
the appropriate dataset and press "Next".
2. Choosing periods: A list of available periods will be automatically displayed to the user. They
can select the appropriate period from the list.
Mobile Mobile application setup
437
3. Fill in values: After choosing the period, the form can be displayed in two modes, depending
on the
Form with sections
Each form section is displayed in a single screen with the name of the section in the title
window.
To navigate from screen to screen, push "Next".
Forms without section (Datasets without sections)
All fields are displayed on one screen with the title that is the name of DataSet
The user simply fills in each data element with the appropriate value.
Mobile Mobile application setup
438
4. Save and Complete:
After finishing data entry, the user can choose to save the data locally on the phone or to
upload the data directly to the DHIS2 server.
Mobile Mobile application setup
439
If the user saves the data form, they can edit the form at a later point in time if they need
to. When selecting a period once again, the period will be marked as "Saved' as seen in the
next screen shot.
If the user selects "Complete", and the data entry form is not complete, the user will be
asked if they are certain they wish to submit the form as incomplete. Once the form has
been submitted, a message should be displayed informing the user that the transmission
was successful.
30.3.4.3.2. Notes
1. Period list:
Periods marked with an asterisk (*) is the period that is completed or saved, depending on
the status of the data entry.
All periods that are not in period list are considered old and will be deleted automatically.
2. Storing values duration
The number of saved forms on mobile are limited only by the effective amount of storage
of the mobile device.
Forms are saved for limited period only, depending on the frequency of collection of the
particular dataset.
Daily Forms: 2 months (current and previous month)
Weekly Forms: 4 weeks (current and 3 previous week)
Mobile Mobile application setup
440
Monthly Forms: 2 months (current and previous month)
Quarterly Forms: 2 quarters (current and previous quarter)
Yearly Forms: 2 years (current and previous year)
3. Completed forms - Uneditable forms
If the form has been completed, the user can view the form on their phone, but they cannot
make any subsequent edits to the form. Each field is greyed out and inactive for editing.
4. Re-Edit completed forms
If the user wishes to edit data which has already been submitted to the server, they can do
so by pressing the "Edit" button. They are allowed to do this assuming that the dataset has
not been locked for the period in question. If they attempt to upload the data, the user will
be informed that the dataset has been locked, and it is not possible to upload the data.
5. Update Forms:
This function is used to synchronize the forms on mobile and on server. The process is
automatically triggered after entering PIN number.
Note: Checking and downloading updated forms process run in background. After finished,
prompt is displayed to ask user whether refresh form list or stay where they are.
6. Multi-Language Support:
This function help user to choose language of mobile's GUI (graphical user interface) and
content's language (Forms).
The forms must be translated on server, otherwise, default language is used.
Default language of first login is English. Change language in Setting menu will affect both
interface and content.
Mobile Mobile application setup
441
Mobile SMS Command
442
Multi-Language Interface: In Setting menu, there are list of supported language (downloaded
from server). Language of GUI is only changed after restart application.
Multi-Language Content (forms): Form's language is change after click "Save". In case there
are many forms, it take several minutes to save setting.
30.3.4.3.3. Troubleshooting
Data has been entered on the phone but does not appear on the server
This usually occurs when users enter data on the phone, but cannot send it to the server.
This may be because of the configuration of the phone, lack of credit on the phone, or lack
of coverage. Usually an error message is displayed as shown below.
Users should be informed that if they see this error, then it means that their data has not
been transmitted.
30.4. SMS Command
SMS command feature helps DHIS2 system receiving SMS from users, patients, or even
anonymous. A SMS command is an object containing the configurations for each SMS form:
reporting data from phones or j2me apps, alerting users, registering patient or user, etc.
Mobile Set up SMS command
443
30.4.1. Set up SMS command
This is where you can create a new SMS command
Usually each SMS command has it own property, then the setting up process may be different
from each other. Currently, we have 4 types of SMS command:
With KEY_VALUE_PARSER and J2ME_PARSER, the SMS command will have dataset because
those are used for reporting data. If data is reported for a Period which is already approved then
SMS response will be sent back containing information about approval status of the period.
With ALERT_PARSER and UNREGISTERED_PARSER, the SMS command will have user group
because those are used for sending message such as SMS, DHIS2 conversation, email.
There are certain parameters which are common to all SMS Command types. These parameters
have default values configured in the system, if user does provide any value to these
parameters then those default ones will be used. Here is the list of those parameters
Table30.2.Common Parameters
Parameter Type Description
Code
Value
Separator
String To provide custom code value separator. Default is "="
Mobile SMS Command Type
444
Parameter Type Description
Field
Separator
String To provide custom field separator. Default is "|"
Reply
message
if no
codes are
sent (only
the
command)
String To provide message if no code is found in SMS text input. Default
is "Parameter missing"
Wrong
format
message
String To provide message if command is not formatted correctly.
Command should be fomatted as per code value separator. This
message will also be sent back if any mandatory parameter is
missing.
No user
message
String To provide message if sending phone number is not registered in
DHIS 2.
User
belong to
more
than one
OrgUnit
message
String Certain SMS command types require user ( retrived from sending
phone number ) to be associated with only one organization unit.
This message can be configured to be sent back in case that
requirement is not fullfilled.
Success
Message
String To provide message that will be sent upon successful completion
of the process.
30.4.2. SMS Command Type
The SMS command is basically defined by its parser type. In other word, each SMS command
has one unique parser to parse the plain text SMS, then the result will be used for the purpose
of that SMS command.
30.4.2.1. SMS Command for Reporting Data
In order to report data for example data set (aggregation), we use SMS commands which have
KEY_VALUE_PARSER (for phone's plain text), or J2ME_PARSER (for j2me apps)
If the command has name "report", and a list of data element with code like above. The
format should be: [command's name] [code][value] [code][value] [code][value]....,the [value]
of course might be changed depends on real data, so you have to preapre a SMS text like this
example: report vo2 vn5 a2 b6 z3 x1
In case the command has a separator for instance ".", the SMS text should be:
report vo.2.vn.5.a.2.b.6.z.3.x.1
or report vo.2|vn.5|a.2|b.6|z.3|x.1
Mobile SMS Command Type
445
Moreover in SMS text input, orgUnit can be specified like this org orgUnitCode If no orgUnit
is specified in SMS then user is retrieved first from the sending phoneNumber and then orgUnit
from that user. As far as PeriodType is concerned it should be specified in this format "ddMM"
for example 3108, but in case its not specified then PeriodType will be retrieved from DataSet
attached to SMSCommand
With the J2ME_PARSER, you don't need to prepare those SMS text, because the J2ME will do
this job
User can set the custom response message for "Wrong format message", "No User Message",
"User belong to more than one OrgUnit message" and "Success message". If no custom
message is being set, system will use the default message.
30.4.2.2. SMS Command for Entity Enrollment
TRACKED_ENTITY_REGISTRATION_PARSER can be used to enroll tracked entity into the system.
Command name will be followed by tracked entity attributes pertaining to specific program
which this command is associated with. Program selection will be done while creating this
command.
Default text pattern ( if field separator and codevalue separator is not provided ) for this parser
would look like this. childProgram fn=xmen|ln=xmen2|age=4
In case field separator is for example "," then text would look like this. childProgram
fn=xmen,ln=xmen2,age=4
Rest of the behavior is same as for other commands. If user does not provide those parameters
then default ones will be used.
30.4.2.3. SMS Command for Program Stage Data Entry
PROGRAM_STAGE_DATAENTRY_PARSER can be used to enter program stage related data for
a specific tracked entity instance.
Mobile SMS Command Type
446
Command name will be followed by data elements pertaining to specific program stage which
this command is associated with. Program and program stage selection will be done while
creating this command.
Default text pattern ( if field separator and codevalue separator is not provided ) for this parser
would look like this. programstage bcgd=1|opvd=2|wght=34
In case field separator is for example "," then text would look like this. programstage
bcgd=1,opvd=2,wght=34
Rest of the behavior is same as for other commands. If user does not provide those parameters
then default ones will be used.
30.4.2.4. SMS Command for Alerting, Registering
In order to alert users, we use SMS commands which have ALERT_PARSER (for phone's plain
text), or UNREGISTERED_PARSER (for j2me apps). UNREGISTERED_PARSER can also be used
for registering IDSR rumour.
The format of those command will be: [command's name] [text], for example:
alert one emergency case in A town
Commands which has ALERT_PARSER will be received from users only
30.4.2.5. SMS Command for Event Registration
Event Registration can be used to register anonymous event into the system based on
the data collected through SMS. This command type is associated with Programs of type
WITHOUT_REGISTRATION. For example Birth events can be tracked using this parser.
Mobile SMS Service
447
The format of those command will be: [command's name] [code][separator][value], for
example:
birth A=1,B=2,G=Male
Code/Value separator is configurable. Pipe "|" is by default taken as field separator. Commands
which has EVENT_REGISTRATION_PARSER will be received from DHIS2 users only. Once
command is successfully received then data received in SMS will be parsed and event will be
registered in DHIS2.
30.5. SMS Service
SMS Service is a generic service used for sending/receiving SMS. Any other DHIS2 module can
include this service and utilize it to send and receive SMS from users or workers in the field.
30.5.1. Setting up SMS service
There are few pre-requisites in order to make this service functional. There are two ways to
complete these steps. One way is to configure gateway from the GUI in Mobile Configuration
Module. The other way is to use SMS Web Api.
Configure SMS Gateway
30.5.1.1. Configure SMS Gateway
There are five different types of Gateways supported by SMS Service. SMS can be sent if any
one of the gateway is configured. If more than one gateways are present, then they will be
used in round-robin fashion for load balancing. There are different parameters for different
type of gateway. The Gateway can be configured in GUI in Mobile Configuration Module as
shown in the figure. More information about parameters needed to configure gateway can be
found in Gateway Configuraitons
30.5.1.2. Configure GenericHttp Gateway
Many DHIS2 instances are using GenericHttpGateway to connect to their local gateways. These
local gateways provides HTTP APIs for sending SMS. In new GenericHttpGateway it is now
possible to configure url parameters provided in their APIs. For example http://gateway.com/
sendMessage?username=AA&password=xxxxx&message=testing&msisdn=9999. In this url username,
password, message, msisdn are parameters that are required by external gateways. Now in
GenericHttp these parameters are configurable which was not possible in previous releases.
Making is configurable will help DHIS2 to interact with other gateways which have different
url formats.
Mobile Gateway Configurations
448
30.5.2. Gateway Configurations
Below table shows the parameters required for configuring gateway.
Table30.3.Gateway Configuration Parameters
Parameter BulkSMS
Gateway
Clickatell
Gateway
Generic HTTP
Gateway
Description
Gateway Name Optional Optional Optional Used as
gateway
identity. Default
name will be
stored in case
this parameter
is not
configured. Its
use is
recommended
User Name Required Optional (if
token is used)
Required Used for API
authentication
Password Required Optional (if
token is used)
Required Used for API
authentication
Auth-Token N/A Optional (if
password is
used)
N/A Used for API
authentication
MessageParameterN/A N/A Required Message query
parameter. For
example http://
gateway.com?message=Hi
RecipientParameterN/A N/A Required Recipient query
parameter. For
example http://
gateway.com?phoneNumber=47XXXXX
URL Template N/A N/A Required Url Tempalte is
only required
in case of
GenericHttpGateway .
For example
"http://
smsgatewa1.com"
Headers N/A N/A Optional Header option
can be checked
to send selected
parameter as
Mobile Gateway Configurations
449
Parameter BulkSMS
Gateway
Clickatell
Gateway
Generic HTTP
Gateway
Description
http header.
For example
username/
password/token
can be sent in
http header.
DHIS2 Tutorials Create Scorecards using the Pivot Table
app
451
Chapter 31. DHIS2 Tutorials
31.1. Create Scorecards using the Pivot Table app
Scorecards definition: In public health settings such as Ministries of Health, scorecards
offer a useful and standardized method for combining related indicators into one table. A
scorecard gives an overall view of the performance of a health program such as a vaccination
program, highlighting successes, weaknesses, and areas for improvement Here's what a typical
scorecard looks like:
This tutorial explains how to create a scorecard in the DHIS2 Pivot Table app. There are several
advantages to using the Pivot Table to create a scorecard, such as:
You can save the scorecard on the dashboard and use it offline.
You can share the scorecard with other DHIS2 users.
Let's get started!
31.1.1. Create a legend for your scorecard
First, we’ll create a 3-color “traffic light” legend for the scorecard. With three basic colors, the
scorecard is easy to scan and easy to understand.
1. Open the Maintenance app. Click the menu in the top right corner and select Maintenance
from the list of apps. You can also type the first letters of the word maintenance in the search
field to find the app.
2. In the Maintenance app, scroll to the bottom of the page right down to the Other section.
3. Go to Legend and click the +.
DHIS2 Tutorials Create a scorecard in the Pivot Table
app
452
4. In the Legend Management page, scroll to the bottom of the page and create a new legend
by clicking the blue + button.
5. Enter a name for the legend such as “Traffic light”, a start value and an end value in the
fields. The values you enter here depend on the performance ratings you wish to set for
the scorecard.
6. Change Number of legend items to 3 to display three colors in the scorecard. To change
the legend item colors, click the blue + button and then edit the colors.
31.1.2. Create a scorecard in the Pivot Table app
1. Open the Pivot Table app from the top right menu of the dashboard. You can also enter
the first letters of Pivot Table in the search field.
2. Go to Data in the pane on the left side and select Indicators in the list.
3. Select an Indicator group such as “ANC” in the second list.
4. Using the arrows, select the type of indicators you want to see in your scorecard.
5. Click Update. This button is in the menu at the top of the workspace
DHIS2 Tutorials Create a scorecard in the Pivot Table
app
453
6. Go to Periods and select a period for which you want to display data. In this “traffic light”
example, we’ll use the relative period section. In Quarters, select This quarter and Last
quarter. Clear any other checkboxes and click Update.
7. Go to Organisation Units in the same left side pane, and click the arrow next to the gear
button.
8. Select Select levels.
9. Select District from the list (next to the gear button). Click Update.
DHIS2 Tutorials Organise the layout and display of your
scorecard
454
As you can see, the scorecard is starting to take shape in the workspace. Now it’s time to fine-
tune the look and feel.
31.1.3. Organise the layout and display of your scorecard
1. In the workspace, click Layout.
2. In Table layout, drag Organisation units down to the Row dimensions section.
3. Drag Data to the Column dimensions section.
4. In the Column dimensions pane, drag Periods below Data, and click Update.
5. In the workspace, click Options.
DHIS2 Tutorials Save and share your scorecard
455
6. Go to Data and clear all the checkboxes.
7. Go to Style > Legend set and from the list, select the legend you created in the
Maintenance app. In this example, we called it Traffic light.
8. Go to Style > Legend display style and select Background color.
9. Click Update.
The Scorecard is ready!
31.1.4. Save and share your scorecard
1. In the workspace, go to the Favorites menu.
2. Click Save as. Enter a name for your Scorecard.
3. To share your Scorecard, select Favorites.
4. Enter the name of a user group name, and click Save. Your scorecard can be viewed by
people that you share a dashboard with.
DHIS2 Tutorials Working with TextPattern
456
31.2. Working with TextPattern
TextPattern was introduced in DHIS2 version 2.29, as a way of defining a pattern that includes
variables, generated values and raw text, which then could be generated into a text value.
The current use-case for TextPattern is automatically generated attributes for tracked entities,
where you want to generate for example unique ids based on a specific pattern.
This guide will cover both basic and advanced topics for working with TextPattern, but is mainly
focused on how you can define TextPatterns and which limitations and caveats exists.
31.2.1. TextPattern syntax
A TextPattern is a sequence of segments, joined together by the "+" character. A segment has
a specific notation and in most cases a parameter format, which allows for further manipulation
of the value.
Table31.1.TextPattern segments
Segment
notation
Description Paramenter
(format)
Example (segment
input value → result)
"Plain text" The plain text segment will
remain unchanged in all
generated values. This special
segment is defined by wrapping
text between two double
quotes. If your pattern should
include separation symbols like
a dash, you should use this "-".
None "Hello world" None
Hello world
CURRENT_DATE(format)Current date segment will be
generated by the server at the
time of generation. This is useful
if you want your patterns to
have a time-constraint that is
disconnected from the context.
You should not use this if you
need to control which date is
injected into the pattern.
Date
format
CURRENT_DATE(yyyy)
01-01-2018 → 2018
ORG_UNIT_CODE(format)This segment represents
the organisation unit code
associated with the generation.
Text
format
ORG_UNIT_CODE(…)
OSLO → OSL
RANDOM(format) Random segments will be
replaced by a value randomly
generated by the server based
on the format. Generated
segments, like Random, bases
its uniqueness on the rest of the
pattern. That means a random
value can appear twice, as
long as the rest of the pattern
is different, which means the
generated text as a whole will be
unique.
Generation
format
RANDOM(X####)
None → A1234
SEQUENTIAL(format)Sequential segments will be
replaced by a number, based
on a counting value on the
Generation
format
"A"+SEQUENTIAL(###)
None → A001
DHIS2 Tutorials TextPattern syntax
457
Segment
notation
Description Paramenter
(format)
Example (segment
input value → result)
server. Sequential segments
will start at the value 1,
and for each generated value
count up until no more values
are available, based on the
format. Like Random segments,
uniqueness is based on the
rest of the pattern, so each
possible version of the pattern
will have it's own sequential
counter starting from 1.
"A"-SEQUENTIAL(###)
None → A002
"B"-SEQUENTIAL(###)
None → B001
"B"-SEQUENTIAL(###)
None → B002
Most segments has a paramter format, except for the plain text segment. The following table
lists the available formats, how they are used and example notations using them.
Table31.2.Parameter formats
Format Description Example
Date
format
This format is based directly on the java
SimpleDateFormat, which means any pattern
valid for SimpleDateFormat, will be valid as a
date format in TextPattern
CURRENT_DATE(dd-MM-yyyy)
→ 31-12-2018
CURRENT_DATE(MM-yyyy)
12-2018
Text
format
The text format allows for some basic text
manipulation. Leaving the format empty will
return the value unmodified, but using "^", "."
and "$", you can modify the value before it
is returned. Each "." represents a character,
while "^" represents the start of the text nd "$"
represents the end. When using formats, the
input value must be at least the same length
as the format.
ORG_UNIT_CODE(….) → OSLO
ORG_UNIT_CODE(..) → OS
ORG_UNIT_CODE(..$) → LO
ORG_UNIT_CODE(^...$)
OSLO
^.…$ will require the input
value to be exactly 4
characters.
Generation
format
The generation format accepts a combination
of one or more of he following characters: "#",
"X", "x" and "*". They respectively represent
a number(0-9), an uppercase letter (A-Z), a
lowercase letter(a-z) or any of the above(0-9,a-
z,A-Z). The SEQUENTIAL segment only accepts
"#", since it will only generate numbers. The
number of characters in the format decides the
size of the value generated. Using just one "#"
will in other words only allow for 10 values
(0-9), while "###" will allow for 1000 values
(000-999). SEQUENTIAL generated values have
leading zeroes, so the length of the generated
value will always match the format length.
RANDOM(X###) → A123
RANDOM(****) → 1AbC
SEQUENTIAL(###) → 001
SEQUENTIAL(######)
000001
A few important things to note regarding the formats:
Date format is very versatile, but be aware of which date or time components you are using.
Using components smaller than a day (For example hours or seconds) is not reccomended,
even though available.
DHIS2 Tutorials Designing TextPattern for generating ids
458
Text format allows for marking both the start and end of the input value, but "^..." and "…"
will in reality give exactly the same results. The only time you would want to use "^" is when
you want to enforce the length of the input value. For example, "^....$" will accept OSLO,
since its 4 characters between the start and end, but PARIS will be rejected, since it has 5
characters.
When text format is used for unique values, like organisation unit code, make sure that
the format doesnt break the uniqueness. (Example: ORG_UNIT_CODE(..) for "PARIS" and
"PANAMA CITY" would both return PA, which means these two organisation units would in
reality share generated values)
Generation format is the primary way to understanding the capacity of your pattern. Make
sure the format is long enough to cover more values than you need.
To finish off the syntax section of the tutorial, here is a couple of example TextPattern:
ORG_UNIT_CODE(…) + "-" + CURRENT_DATE(yyyyww) + "-" + SEQUENTIAL(#####)
This pattern will have 99999 possible values (based on SEQUENTIAL. 00000 is never used since
we start at 1). In addition, the remaining pattern will change for each different organisation unit
generating values (ORG_UNIT_CODE) and for each week (CURRENT_DATE(yyyyww) represents
year and week). That effectively means every new week, each organisation unit will have
99999 new values they can use.
"ABC_" + RANDOM(****)
The plain text segment of this pattern, will make no difference in the total capacity of the
pattern, however the generated segment (RANDOM) will allow for 14776336 possible values.
The reason for this is that * can be any one character of the 62 characters available (0-9, a-z,
A-Z). You can read more about understanding pattern capacity further down in the tutorial.
31.2.2. Designing TextPattern for generating ids
One use-case for TextPattern is to generate unique ids. In this section we will present guidelines
and common issues related to desining TextPatterns used for ids.
An id should never contain sensitive information, or information that in combination can identify
an individual. TextPattern does not currently support segments that uses these kind of values,
but might do so in the future.
The following list highlights some of the TextPattern specific restrictions you need to consider
when designing a TextPattern for ids:
Make sure the capacity (number of possible values) of the TextPattern covers your use-
case. It's better to have more values than needed than less. Tracked entity attributes using
TextPattern will require that a single generated segment is present in the TextPattern.
A TextPattern is unique in the entire system, but only for the object using it. In other words, if
you have a single tracked entity attribute with TextPattern, used by multiple Tracked entities
(Not to be mistaken for tracked entity instances), all values generated will be shared between
all traced entities using the attribute. This also means that if you have two tracked entity
attributes with the same TextPattern syntax, each attribute will be able to generate the same
value as the other, since uniqueness is based on the attribute.
SEQUENTIAL segments are in the implementation numbers starting from 1, increasing by 1
for each value, sequentially until no more values are available. However, in reality you will
most likely end up with gaps when users generate and reserve values that is never used, or
if a user sends in a value where the SEQUENTIAL segment has a higher value than recorded
on the server.
The current implementation relies on the user-client to send in the values contained in the
TextPattern when storing a new value. That means generating a correct id is depending on
the user, and user-client, to provide the correct data.
DHIS2 Tutorials Understanding TextPattern capacity
459
31.2.3. Understanding TextPattern capacity
The most important thing to keep in mind when designing a TextPattern, is the capacity - that
means the total number of potential values a TextPattern can yield.
With the current implementation of TextPattern, there are three main factors that decides the
capacity:
1. Capacity of the generated segment in the TextPattern
2. The presence of a CURRENT_DATE segment
3. The presence of a ORG_UNIT_CODE segment
The presence of a date segment (like CURRENT_DATE) will effectively reset the capacity each
time the segment changes. Depending on the date format, it can change anywhere to yearly
to daily. Important: If your date format don't contain a year, the pattern will resolve
to the same value every year. That means values will already be used. For example, if your
TextPattern looks like this:
CURRENT_DATE(ww) + "-" + RANDOM(#)
This pattern will give you up to 10 unique values for each week, but after 1 year,
CURRENT_DATE(ww) will be the same as last year, and you will have no new values available.
If you use "yyyy-ww" instead, it will be unique for every year, every week.
Organisation unit codes will make your values unique for each different organisation unit, which
means if you have a text pattern like this:
ORG_UNIT_CODE() + "-" + RANDOM(#)
This pattern will give you 10 unique values for each different organisation unit.
31.2.3.1. Calculating capacity for generated segments
Understanding how to calculate the capacity of a TextPattern is critical when designing
TextPatterns. The generated segments will be the main component of any TextPattern in terms
of capacity, then increased based on the presence of ORG_UNIT_CODE or CURRENT_DATE.
Let's start with SEQUENTIAL segments. Each "#" in the format represents a number between
0 and 9. To calculate the total capacity, you multiply the number of possible values for each
"#". Since it's always 10 (0-9) the math is quite straight forward:
SEQUENTIAL(#) = 10 = 10
SEQUENTIAL(###) = 10 * 10 * 10 = 1000
SEQUENTIAL(#####) = 10 * 10 * 10 * 10 * 10 = 100000
Since SEQUENTIAL counters on the server start at 1 and not 0, the actual capacity is 999, but
that's insignificant in most cases.
As soon as we involve RANDOM, the calculation becomes a bit more complicated. Similar to
SEQUENTIAL, a "#" has 10 possible values, in addition we have "X" and "x" with 26 possible
values each, as well as "*" which can be any of the previous, which means 62 (10+26+26)
possible values.
To calculate the capacity, you need to take each character in your format and replace with the
number of possible values, then multiply them all together like we did for SEQUENTIAL:
RANDOM(#) = 10 = 10
RANDOM(X) = 26 = 26
RANDOM(*) = 62 = 62
RANDOM(X##) = 26 * 10 * 10 = 2600
RANDOM(XXxx) = 26 * 26 * 26 * 26 = 456976
DHIS2 Tutorials Random segments and why you should
avoid it
460
RANDOM(***) = 62 * 62 * 62 = 238328
As you can see, the math gets a bit more complicated when, but by following this recipe you
can see the number of potential values.
31.2.4. Random segments and why you should avoid it
There is a hidden cost of using the random segment in TextPattern in the long run, but that
does not mean you should never use it. This section will highlight the problems of using the
random segment and suggest when it might be more appropriate to use it.
This section is motivated by an issue with the previous generation strategy, where you only
had random generation. After while, instances using this feature would actually be unable to
generate and reserve new values, since it was taking to long to find available values. This
section looks at some of the problems with random generation that created this situation.
31.2.4.1. Generating random values
Before using the RANDOM segment in your TextPattern, you should consider the following
problems connected to the use of RANDOM:
Generating values from a TextPattern with a RANDOM segment will be more complex than
other TextPatterns
31.2.5. Data entry for TextPattern based metadata
As previously mentioned, the only metadata currently supporting TextPattern is the tracked
entity attributes. In this section, we will describe the different ways data entry for TextPattern
works, especially for tracked entity attributes.
31.2.5.1. Validation of values using TextPattern
By default, all values sent to the server for metadata using TextPattern, will be validated.
Validation can be skipped if needed, but you should always validate input under normal
circumstances. The validation will be based on the TextPattern you have defined and will be
as strict as possible:
Date segments must match the same format as specified in the segment parameter
Plain text segments must match exactly
Text segments values must be at least as long as the format string. If both "^" and "$" is
present, the value must match the exact length.
Generated segment values must match the format exactly, character by character.
When using the server to first generate and reserve values, the server will modify the values
used in the TextPattern before injecting them, meaning you will always get a valid value when
generating it on the server.
A final exception to TextPattern validation is made for a special case: If you change a
TextPattern after reserving values for the original pattern, values sent to the server that are
invalid according to the new TextPattern, will still be accepted if it was already reserved.
31.2.5.2. Different data entry flows for TextPattern
There is currently 2 ways a client can store values for TextPattern metadata:
1. Generating and reserving values (Apps should do this for you)
2. Storing a custom value
DHIS2 Tutorials Data entry for TextPattern based
metadata
461
The preferred way, is to generate and reserve the needed values (The number of values
generated and reserved is handled by the app). That means each time you are seeing and
storing a value, it has been generated and reserved by the server, and will be valid.
The other way might be useful in specific cases. The user will supply the value themselves and
as long as the value supplied is valid for the TextPattern, they can put anything they want. The
caveat of doing it this way, is that you might use values that was reserved by someone else
and if you have a SEQUENTIAL segment, the counter will not be updated.
About demo server, live package and
database design
Using the DHIS2 demo server
463
Chapter 32. About demo server, live
package and database design
32.1. Using the DHIS2 demo server
The DHIS2 team maintains a demonstration server at https://play.dhis2.org/demo. This is by
far the easiest way to try out DHIS2. Simply open the link in your web browser and login with
username = admin and password = district.
Note
All changes on this server are deleted each night, so do not save any important work on
this server. It is strictly for demonstration purposes on only!
32.2. Using the DHIS2 live package
32.2.1. Starting the DHIS2 Live package
The DHIS2 Live package is the easiest way to get started with DHIS2 on your local computer.
DHIS2 Live is appropriate for a stand-alone installation and demos. Simply download the
application from here. Once the file is downloaded, you can simply double-click the downloaded
file, and get started using DHIS2.
32.2.1.1. Prerequisites for DHIS2 Live
You must be sure that you have a current version of the Java Runtime installed on your machine.
Depending on your operating system, there are different ways of installing Java. The reader is
referred to this website for detailed information on getting Java installed.
32.2.1.2. Starting up with a blank database
The live package comes with a demo database just like what you see on the online demo (which
is based on the national Sierra Leone HMIS), and if you want to start with a blank system/
database and build up your own system then you need to do the following:
1) Stop DHIS2 live if it is already running. Right click on the tray icon and select Exit. The tray
icon is the green symbol on the bottom right of your screen (on Windows) which should say'
DHIS2 Server running' when you hover your mouse pointer over the icon.
2) Open the folder where the DHIS2 live package is installed and locate the folder called "conf".
3) In conf/ open the file called 'hibernate.properties' in a text editor (notepad or similar) and do
the following modification: locate the string 'jdbc:h2:./database/dhis2' and replace the 'dhis2'
part with any name that you want to give to your database (e.g. dhis2_test).
4) Save and close the hibernate.properties file.
5) Start DHIS2 Live by double-clicking on the file dhis2-live.exe in the DHIS2 Live installation
folder or by using a desktop shortcut or menu link that you might have set up.
6) Wait for the browser window to open and the login screen to show, and then log in with
username: admin and password: district
About demo server, live package and
database design
Downloading and installing the server
version
464
7) Now you will see a completely empty DHIS2 system and you should start by adding your
users, organisational hierarchy, data elements, and datasets etc. Please refer to the other
sections of the user manual for instructions on how to do this.
32.2.2. Downloading and installing the server version
The latest stable server version can be downloaded from this website. For detailed information
on how to install it please refer to the installation chapter in the implementation manual.
32.3. Logging on to DHIS2
Regardless of whether you have installed the server version of the desktop Live version, you
will use a web-browser to log on to the application. DHIS2 should be compatible with most
modern web-browsers, although you will need to ensure that Java Script is enabled.
To log on to the application just enter http://localhost:8080/dhis if you are using the DHIS2
live package, or replace localhost with the name or IP address of the server where the server
version is installed.
Once you have started DHIS2, either on-line or off-line, the displayed screen will prompt you to
enter your registered user-name and password. After entering the required information click
on log-in button to log into the application. The default user name and password are 'admin'
and 'district'. They should be changed immediately upon logging on the first time.
You can select the language which you wish to display DHIS2 in from the "Change language"
dialog box at the bottom of the screen. Not all languages may be available.
Should you have forgotten your password, you can click on the "Forgot password?" link. You
must have informed DHIS2 of your email address and the server must be properly configured
to send emails.
If you want to create your own account (and the server administrator allows this), simply click
"Create an account" and follow the directions provided.
Once you have logged into DHIS2, refer to the specific sections in this manual for the different
functionality which is available.
32.4. Logging out of DHIS2
Just click on the Profile and the click "Log out" the top-right corner of the DHIS2 menu.
About demo server, live package and
database design
Quick intro to designing a DHIS2
database
465
32.5. Quick intro to designing a DHIS2 database
DHIS2 provides a powerful set of tools for data collection, validation, reporting and analysis,
but the contents of the database, e.g. what to collect, who should collect it and on what format
will depend on the context of use. However, in order to do anything with DHIS2, you must first
create meta-data. Meta-data, or data about the data, describes what should be collected (data
elements and categories), where it should be collected (organisation units) and how frequently
it should be collected (periods). This meta-data needs to be created in the DHIS2 database
before it can be used. This can be done through the user interface and requires no programming
or in-depth technical skills of the software, but does require a good understanding of the
processes which you are trying to collect data form.
This section will provide a very quick and brief introduction to DHIS2 database design and
mainly explain the various steps needed to prepare a new DHIS2 system for use. How to do
each step is explained in other chapters, and best practices on design choices will be explained
in the implementers manual. Here are the steps to follow:
1. Set up an organisational hierarchy
2. Define data elements
3. Define data sets and data entry forms
4. Define validation rules
5. Define indicators
6. Define report tables and design reports
7. Set up the GIS module
8. Design charts and customise the dashboard
32.5.1. The organisational hierarchy
The organisational hierarchy defines the organisation using the DHIS2, the health facilities,
administrative areas and other geographical areas used in data collection and data analysis.
This dimension to the data is defined as a hierarchy with one root unit (e.g. Ministry of
Health) and any number of levels and nodes below. Each node in this hierarchy is called an
organisational unit in DHIS2.
The design of this hierarchy will determine the geographical units of analysis available to the
users as data is collected and aggregated in this structure. There can only be one organisational
hierarchy at the same time so its structure needs careful consideration. Additional hierarchies
(e.g. parallel administrative groupings such as "Facility ownership") can be modelled using
organisational groups and group sets, however the organisational hierarchy is the main
vehicle for data aggregation on the geographical dimension. Typically national organisational
hierarchies in public health have 4-6 levels, but any number of levels is supported. The
hierarchy is built up of parent-child relations, e.g. a Country or MoH unit (the root) might have
e.g. 8 parent units (provinces), and each province again ( at level 2) might have 10-15 districts
as their children. Normally the health facilities will be located at the lowest level, but they can
also be located at higher levels, e.g. national or provincial hospitals, so skewed organisational
trees are supported (e.g. a leaf node can be positioned at level 2 while most other leaf nodes
are at level 5).
Typically there is a geographical hierarchy defined by the health system. e.g. where the
administrative offices are located (e.g. MoH, province, district), but often there are other
administrative boundaries in the country that might or might not be added, depending on how
its boundaries will improve data analysis. When designing the hierarchy the number of children
for any organisational unit may indicate the usefulness of the structure, e.g. having one or
About demo server, live package and
database design
Data Elements
466
more 1-1 relationships between two levels is not very useful as the values will be the same
for the child and the parent level. On the other extreme a very high number of children in the
middle of the hierarchy (e.g. 50 districts in a province) might call for an extra level to be added
in between to increase the usefulness of data analysis. The lowest level, the health facilities will
often have a large number of children (10-60), but for other levels higher up in the hierarchy
approx. 5-20 children is recommended. Too few or too many children might indicate that a
level should be removed or added.
Note that it is quite easy to make changes to the upper levels of the hierarchy at a later
stage, the only problem is changing organisational units that collect data (the leaf nodes), e.g.
splitting or merging health facilities. Aggregation up the hierarchy is done based on the current
hierarchy at any time and will always reflect the most recent changes to the organisational
structure. Refer to the chapter on Organisation Units to learn how to create organisational
units and to build up the hierarchy.
32.5.2. Data Elements
The Data Element is perhaps the most important building block of a DHIS2 database. It
represents the "WHAT" dimension, it explains what is being collected or analysed. In some
contexts this is referred to an indicator, but in DHIS2 we call this unit of collection and analysis a
data element. The data element often represents a count of something, and its name describes
what is being counted, e.g. "BCG doses given" or "Malaria cases". When data is collected,
validated, analysed, reported or presented it is the data elements or expressions built upon
data elements that describes the WHAT of the data. As such the data elements become
important for all aspects of the system and they decide not only how data is collected, but
more importantly how the data values are represented in the database, which again decides
how data can be analysed and presented.
It is possible to add more details to this "WHAT" dimension through the disaggregation
dimension called data element categories. Some common categories are Age and Gender, but
any category can be added by the user and linked to specific data elements. The combination
of a data element's name and its assigned category defines the smallest unit of collection
and analysis available in the system, and hence describes the raw data in the database.
Aggregations can be done when zooming out of this dimension, but no further drill-down is
possible, so designing data elements and categories define the detail of the analysis available
to the system (on the WHAT dimension). Changes to data elements and categories at a later
stage in the process might be complicated as these will change the meaning of the data values
already captured in the database (if any). So this step is one of the more decisive and careful
steps in the database design process.
One best practice when designing data elements is to think of data elements as a unit of data
analysis and not just as a field in the data collection form. Each data element lives on its own
in the database, completely detached from the collection form, and reports and other outputs
are based on data elements and expressions/formulas composed of data elements and not the
data collection forms. So the data analysis needs should drive the process, and not the look an
feel of the data collection forms. A simple rule of thumb is that the name of the data element
must be able to stand on its own and describe the data value also outside the context of its
collection form. E.g. a data element name like "Total referrals" makes sense when looking at
it in either the "RCH" form or the "OPD" form, but on its own it does not uniquely describe
the phenomena (who are being referred?), and should in stead be called "Total referrals from
Maternity" or "Total referrals from OPD". Two different data elements with different meanings,
although the field on the paper form might only say "Total referrals" since the user of the
form will always know where these referrals come from. In a database or a repository of data
elements this context is no longer valid and therefore the names of the data elements become
so important in describing the data.
Common properties of data elements can be modelled through what is called data element
groups. The groups are completely flexible in the sense that they are defined by the user,
About demo server, live package and
database design
Datasets and data entry forms
467
both their names and their memberships. Groups are useful both for browsing and presenting
related data, but can also be used to aggregate data elements together. Groups are loosely
coupled to data elements and not tied directly to the data values which means they can be
modified and added at any point in time without interfering with the raw data.
32.5.3. Datasets and data entry forms
All data entry in DHIS2 is organised through the use of Datasets. A Dataset is a collection
of data elements grouped together for data collection, and in the case of distributed installs
they also define chunks of data for export and import between instances of DHIS2 (e.g. from
a district office local installation to a national server). Datasets are not linked directly to the
data values, only through their data elements and frequencies, and as such a dataset can be
modified, deleted or added at any point in time without affecting the raw data already captured
in the system, but such changes will of course affect how new data will be collected.
A dataset has a period type which controls the data collection frequency, which can be daily,
weekly, monthly, quarterly, six-monthly, or yearly. Both which data elements to include in the
dataset and the period type is defined by the user, together with a name, short name, and code.
In order to use a dataset to collect data for a specific orgunit you must assign the orgunit to
the dataset, and this mechanism controls which orgunits that can use which datasets, and at
the same time defines the target values for data completeness (e.g. how many health facilities
in a district expected to submit RCH data every month).
A data element can belong to multiple datasets, but this requires careful thinking as it may
lead to overlapping and inconstant data being collected if e.g. the datasets are given different
frequencies and are used by the same orgunits.
32.5.3.1. Data entry forms
Once you have assigned a dataset to an orgunit that dataset will be made available in Data
Entry (under Services) for the orgunits you have assigned it to and for the valid periods
according to the dataset's period type. A default data entry form will then be shown, which is
simply a list of the data elements belonging to the dataset together with a column for inputting
the values. If your dataset contains data elements with categories such as age groups or
gender, then additional columns will be automatically generated in the default form based
on the categories. In addition to the default list-based data entry form there are two more
alternatives, the section-based form and the custom form.
32.5.3.1.1. Section forms
Section forms allow for a bit more flexibility when it comes to using tabular forms and are quick
and simple to design. Often your data entry form will need multiple tables with subheadings,
and sometimes you need to disable (grey out) a few fields in the table (e.g. some categories do
not apply to all data elements), both of these functions are supported in section forms. After
defining a dataset you can define it's sections with subsets of dataelements, a heading and
possible grey fields i the section's table. The order of sections in a dataset can also be defined.
In Data Entry you can now start using the Section form (should appear automatically when
sections are available for the selected dataset). You can switch between default and section
forms in the top right corner of the data entry screen. Most tabular data entry forms should be
possible to do with sections forms, and the more you can utilise the section forms (or default
forms) the easier it is for you. If these two types of forms are not meeting your requirements
then the third option is the completely flexible, although more time-consuming, custom data
entry forms.
32.5.3.1.2. Custom Forms
When the form you want to design is too complicated for the default or section forms then
your last option is to use a custom form. This takes more time, but gives you full flexibility in
About demo server, live package and
database design
Validation rules
468
term of the design. In DHIS2 there is a built in HTML editor (FcK Editor) for the form designer
and you can either design the form in the UI or paste in your HTML directly using the Source
window in the editor. In the custom form you can insert static text or data fields (linked to data
elements + category) in any position on the form and you have complete freedom to design
the layout of the form. Once a custom form has been added to a dataset it will be available in
data entry and used automatically. You can switch back to default and section (if exists) forms
in the top right corner of the data entry screen.
32.5.4. Validation rules
Once you have set up the data entry part of the system and started to collect data then there is
time to define data quality checks that help to improve the quality of the data being collected.
You can add as many validation rules as you like and these are composed of left and right
side expressions that again are composed of data elements, with an operator between the two
sides. Typical rules are comparing subtotals to totals of something. E.g. if you have two data
elements "HIV tests taken" and "HIV test result positive" then you know that in the same form
(for the same period and organisational unit) the total number of tests must always be equal
or higher than the number of positive tests. These rules should be absolute rules meaning
that they are mathematically correct and not just assumptions or "most of the time correct".
The rules can be run in data entry, after filling each form, or as a more batch like process on
multiple forms at the same time, e.g. for all facilities for the previous reporting month. The
results of the tests will list all violations and the detailed values for each side of the expression
where the violation occurred to make it easy to go back to data entry and correct the values.
32.5.5. Indicators
Indicators represent perhaps the most powerful data analysis feature of the DHIS2. While data
elements represent the raw data (counts) being collected the indicators represent formulas
providing coverage rates, incidence rates, ratios and other formula-based units of analysis. An
indicator is made up of a factor (e.g. 1, 100, 100, 100 000), a numerator and a denominator,
the two latter are both expressions based on one or more data elements. E.g. the indicator
"BCG coverage <1 year" is defined a formula with a factor 100, a numerator ("BCG doses
given to children under 1 year") and a denominator ("Target population under 1 year"). The
indicator "DPT1 to DPT3 drop out rate" is a formula of 100 % x ("DPT1 doses given"- "DPT3
doses given") / ("DPT1 doses given").
Most report modules in DHIS2 support both data elements and indicators and you can also
combine these in custom reports, but the important difference and strength of indicators
versus raw data (data element's data values) is the ability to compare data across different
geographical areas (e.g. highly populated vs rural areas) as the target population can be used
in the denominator.
Indicators can be added, modified and deleted at any point in time without interfering with the
data values in the database.
32.5.6. Report tables and reports
Standard reports in DHIS2 are a very flexible way of presenting the data that has been
collected. Data can be aggregated by any organisational unit or orgunit level, by data element,
by indicators, as well as over time (e.g. monthly, quarterly, yearly). The report tables are
custom data sources for the standard reports and can be flexibly defined in the user interface
and later accessed in external report designers such as iReport or through custom HTML
reports. These report designs can then be set up as easily accessible one-click reports with
parameters so that the users can run the same reports e.g. every month when new data is
entered, and also be relevant to users at all levels as the organisational unit can be selected
at the time of running the report.
About demo server, live package and
database design
GIS
469
32.5.7. GIS
In the integrated GIS module you can easily display your data on maps, both on polygons
(areas) and as points (health facilities), and either as data elements or indicators. By providing
the coordinates of your organisational units to the system you can quickly get up to speed with
this module. See the GIS section for details on how to get started.
32.5.8. Charts and dashboard
On of the easiest way to display your indicator data is through charts. An easy to use chart
dialogue will guide you through the creation of various types of charts with data on indicators,
organisational units and periods of your choice. These charts can easily be added to one of the
four chart sections on your dashboard and there be made easily available right after log in.
Make sure to set the dashboard module as the start module in user settings.
About data dimensions in DHIS2 Data dimensions: Core building blocks in
DHIS2
471
Chapter 33. About data dimensions in
DHIS2
33.1. Data dimensions: Core building blocks in DHIS2
A data value in DHIS2 is described by at least three dimensions: 1) data element, 2)
organisation unit, and 3) period. These dimensions form the core building blocks of the data
model.
As an example, if you want to know how many children that were immunised for measles
in Gerehun CHC in December 2014, the three dimensions which describe that value are the
Data Element "Measles doses given", the Organisation Unit "Gerehun CHC", and the Period
"Dececmber 2014". All data values have at least these three dimensions describing What,
Where and When.
About data dimensions in DHIS2 Data elements: The What dimension
472
In addition to the organisation unit, period and data element dimensions, data values may
also be associated with a custom dimension consisting of attributes. A common use of this
dimension is to describe data values which are reported by multiple partners in the same
location for the same data element and time period. In principle, it can be used as a "free-
form" dimension, to describe multiple observations of the same phenomena at the same place
and time.
Table33.1.
Organisation Unit Data Element Period Value
Gerehun CHC Measles doses given Dec-09 22
Tugbebu CHP Measles doses given Dec-09 18
33.2. Data elements: The What dimension
33.2.1. Data element categories
The data element mentioned above ,"Measles doses given", can be further disaggregated into
by combinations of data element categories. Each system administrator of DHIS2 is free to
define any data element category dimensions for data elements. There are however, certain
best practices which should generally be followed.
Given the example of Measles vaccination, if you want to know whether these vaccines were
given at the facility (fixed) or out in the community as part of the outreach services then you
could add a dimension called e.g. "Place of service" with the two possible options "Fixed" and
"Outreach". Then all data collected on measles immunisation would have to be disaggregated
along these to options. In addition to this you might be interested in knowing how many of these
children who were under 1 year or above 1 year of age. If so you can add an Age dimension to
the data element with the two possible options "<1 y" and ">1 y". This implies further detail
on the data collection process. You can also apply both categories "Place of service" and "Age"
and combine these into a data element category combination e.g. called "EPI disaggregation".
You would then be able to look at four different more detailed values in stead of only one as in
the example above for the data element "Measles doses given": 1) "Fixed and <1 y, 2) Fixed
and >1 y, 3) Outreach and <1 y, and 4) Outreach and >1 y. This adds complexity to how data is
collected by the health facilities, but at the same time opens up for new possibilities of detailed
data analysis of Measles immunisation.
Table33.2. Example of detailed storage of data values when using data element
categories "Place of Service" and "Age" (simplified for readability compared to the
actual database table)
Organisation
Unit
Data
Element
Place of
service
Age Period Value
Gerehun
CHC
Measles
doses given
Fixed <1 y Dec-09 12
Gerehun
CHC
Measles
doses given
Outreach <1 y Dec-09 4
Gerehun
CHC
Measles
doses given
Fixed >1 y Dec-09 4
Gerehun
CHC
Measles
doses given
Outreach >1 y Dec-09 2
Tugbebu
CHP
Measles
doses given
Fixed <1 y Dec-09 10
About data dimensions in DHIS2 Data element group sets
473
Organisation
Unit
Data
Element
Place of
service
Age Period Value
Tugbebu
CHP
Measles
doses given
Outreach <1 y Dec-09 4
Tugbebu
CHP
Measles
doses given
Fixed >1 y Dec-09 3
Tugbebu
CHP
Measles
doses given
Outreach >1 y Dec-09 1
33.2.2. Data element group sets
While the data element categories and their options described above provide the level of detail
(disaggregation) at the point of data collection and how data values get stored in the database,
the data element group sets and groups can be used to add more information to data elements
after data collection. As an example, if you are analyzing many data elements at the same
time in a report, you would want to group these based on some criteria. Instead of looking at
all the data captured in a form for immunisation and nutrition, you might want to separate or
group data elements along a programme dimension (known as a data element group set in
DHIS2) where "Immunisation" (or EPI) and "Nutrition" would be the two groups.
Expanding the report to include data from other programs or larger themes of health data
would mean more groups to such a group set dimension, like "Malaria", "Reproductive
Health", "Stocks". For this example, you would create a data element group set called
"Programme" (or whatever name you find appropriate), and to represent the different
programmes in this dimension you would define data elements groups called "EPI", "Nutrition",
"Malaria", "Reproductive health" and so on, and add all these groups to the "Programme" group
set. To link or tag the data element "Measles doses given" to such a dimension you must (in our
example) add it to the "EPI" group. Which groups you add "Measles doses given" to does not
affect how health facilities collect the data, but adds more possibilities to your data analysis.
So for the group set dimensions there are three levels; the group set (e.g. "Programme"), the
group (e.g. "EPI"), and the data element (e.g. "Measles doses given").
Indicators can be grouped into indicator groups and further into indicator group sets
(dimensions) in exactly the same way as data elements.
Table33.3.
Organisation
Unit
Data Element Programme Period Value
Gerehun CHC Measles doses
given
EPI Dec-09 22
Gerehun CHC Vitamin A given Nutrition Dec-09 16
Tugbebu CHP Measles doses
given
EPI Dec-09 18
Tugbebu CHP Vitamin A given Nutrition Dec-09 12
Gerehun CHC Malaria new
cases
Malaria Dec-09 32
Tugbebu CHP Malaria new
cases
Malaria Dec-09 23
About data dimensions in DHIS2 The organisation unit dimension
474
33.3. The organisation unit dimension
Organisation units in DHIS2 should typically represent a location, such as a Community Health
Centre or referral hospitals, or an administrative unit like "MoHS Sierra Leone", "Bo District" or
"Baoma Chiefdom". In non-health sector applications, they could be "schools" or "water points".
Orgunits are represented in a default hierarchy, usually the default administrative hierarchy of
a country or region, and are therefore assigned an organisational level. As an example, Sierra
Leone has four organisation unit levels; National, District, Chiefdom, and PHU, and all orgunits
are linked to one of these levels. An orgunit hierarchy in DHIS2 can have any number of levels.
Normally data is collected at the lowest level, at the health facility, but can be collected at any
level within the hiearchy, such as both the districts as well as the facility level.
When designing reports at higher levels with data aggregated at the district or province level,
DHIS2 will use the hierarchy structure to aggregate all the health facilities' data for any given
unit at any level. The organisation unit level capturing the data always represents the lowest
level of detail that is possible to use in data analysis, and the organisational levels define the
available levels of aggregation along a geographical dimension.
33.3.1. Organisation unit group sets and groups
While facility level is typically the lowest geographical level for disaggregation in DHIS2, there
are ways to flexibly group organisation units into any number of dimensions by using the
organisation unit groups and group set functionality. As an example, if all facilities are given
an official type like "Community health center" or "District Hospital, it is possible to create
an organisation unit group set called "Type" and add groups with the names of the types
mentioned above. In order for the group sets to function properly in analysis, each organisation
unit should be a member of a single group (compulsory and exclusive) within a group set.
Stated somewhat differently, a facility should not be both a "Community health center" as well
as a "District hospital".
33.3.1.1. Inherit the values of an organisation unit group set
You can improve the completeness of your aggregated data by inheriting the settings of a
"parent" organisation unit in your organisation unit hierarchy. This is particularly helpful if
you are aggregating the data of more than 100 organisation units. See the Maintenance app
documentation for more details.
33.3.1.2. Alternative organisation unit hierarchies - advanced use of group sets and
groups
A more advanced use of organisation unit group sets is to create alternative hierarchies e.g. use
administrative borders from other ministries. In Sierra Leone that could mean an alternative
hierarchy of 1:MoHS, 2:Districts, and 3: Local councils, instead of the four-level hierarchy with
chiefdoms and PHUs. For instance, if all PHUs are linked to a specific local council, it would be
possible to look at data aggregated by local council instead of chiefdom. Then you would first
need to create a group set called "Local council" and then create one organisation unit group
for every local council, and finally link all PHUs to their corresponding local council group.
Table33.4.
District OrgUnit Type Data Element Period Value
Bo CHC Measles doses
given
Dec-09 121
Bo CHP Measles doses
given
Dec-09 98
Bo MCHP Measles doses
given
Dec-09 87
About data dimensions in DHIS2 Best practice on the use of group sets
and groups
475
District OrgUnit Type Data Element Period Value
Bombali CHC Measles doses
given
Dec-09 110
Bombali CHP Measles doses
given
Dec-09 67
Bombali MCHP Measles doses
given
Dec-09 59
33.3.2. Best practice on the use of group sets and groups
As mentioned above, all organisation units should be a member of a single group within a
group set. If an organisation unit is not present in any group or is present in multiple group
members in a group set, this can lead to unexpected results in the analysis modules. DHIS2
has integrity checks to identify organisation units which are not present in any organisation
unit group set member, or which is present in multiple groups.
33.4. The period dimension in DHIS2
The period dimension becomes an important factor when analysing data over time e.g. when
looking at cumulative data, when creating quarterly or annual aggregated reports, or when
doing analysis that combines data with different characteristics like monthly routine data,
annual census/population data or six-monthly staff data.
33.4.1. Period types
In DHIS2, periods are organised according to a set of fixed period types described below. The
following list is for the default ISO 8601 calendar type.
1. Daily
2. Weekly: The system supports various weekly period types, with Monday, Wednesday,
Thursday, Saturday and Sunday as the first day of the week. You collect data through data
sets configured to use the desired weekly period type. The analytics engine will attribute
weekly data to the month which contains four days or more of the week.
3. Monthly: Refers to standard calendar months.
4. BiMonthly: Two-month periods beginning in January.
5. Quarterly: Standard ISO quarters, beginning in January.
6. SixMonthly: Six-month periods beginning in January
7. Yearly: This refers to a calendar year.
8. Financial April: Financial year period beginning on April 1st and ending on March 31st of the
calendar next year
9. Financial July: Financial year period beginning on July 1st and ending on June 31st of the
calendar next year
10.Financial Oct: Financial year period beginning on October 1st and ending on September 31st
of the calendar next year
11.Six-monthly April: Six-month periods beginning on April 1st with a duration of six calendar
months.
As a general rule, all organisation units should collect the same data using the same frequency
or periodicity. A data entry form therefore is associated with a single period type to make sure
data is always collected according to the correct and same periodicity across the country.
It is possible however to collect the same data elements using different period types by
assigning the same data elements to multiple data sets with different period types, however
About data dimensions in DHIS2 Relative periods
476
then it becomes crucial to make sure no organisation unit is collecting data using both data
sets/period types as that would create overlap and duplication of data values. If configured
correctly the aggregation service in DHIS2 will aggregate the data together, e.g. the monthly
data from one part of the country with quarterly data from another part of the country into a
national quarterly report. For simplicity and to avoid data duplication it is advised to use the
same period type for all organisation units for the same data elements when possible.
33.4.2. Relative periods
In addition to the fixed period types described in the previous section, DHIS2 also support
relative periods for use in the analysis modules.
When creating analytical resources within DHIS2 it is possible to make use of the relative
periods functionality. The simplest scenario is when you want to design a monthly report
that can be reused every month without having to make changes to the report template to
accommodate for the changes in period. The relative period called "Last month" allows for
this, and the user can at the time of report generation through a report parameter select the
month to use in the report.
A slightly more advanced use case is when you want to make a monthly summary report for
immunisation and want to look at the data from the current (reporting) month together with
a cumulative value for the year so far. The relative period called "This year" provides such
a cumulative value relative to the reporting month selecting when running the report. Other
relative periods are the last 3,6, or 12 months periods which are cumulative values calculated
back from the selected reporting month. If you want to create a report with data aggregated
by quarters (the ones that have passed so far in the year) you can select "Last four quarters".
Other relative periods are described under the reporting table section of the manual.
Table33.5.
Organisation
Unit
Data Element Reporting
month
So far this
year
Reporting
month name
Gerehun CHC Measles doses
given
15 167 Oct-09
Tugbebu CHP Measles doses
given
17 155 Oct-09
33.4.3. Aggregation of periods
While data needs to be collected on a given frequency to standardise data collection and
management, this does not put limitations on the period types that can be used in data
analysis and reports. Just like data gets aggregated up the organisational hierarchy, data is also
aggregated according to a period hierarchy, so you can create quarterly and annual reports
based on data that is being collected on a Monthly basis. The defined period type for a data
entry form (data set) defines the lowest level of period detail possible in a report.
33.4.3.1. Sum and average aggregation along the period dimension
When aggregating data on the period dimension there are two options for how the calculation
is done, namely sum or averge. This otion is specified on a per data element in DHIS2 through
the use of the 'aggregation operator' attribute in the Add/Edit Data Elements dialog.
Most of the data collected on a routinely basis should be aggregated by summing up the months
or weeks, for instance to create a quarterly report on Measles immunisation one would sum
up the three monthly values for "Measles doses given".
Other types of data that are more permanently valid over time like "Number of staff in the
PHU" or an annual population estimate of "Population under 1 year" need to be aggregated
About data dimensions in DHIS2 Data collection vs. data analysis
477
differently. These values are static for all months as long as there are valid data. For example,
the "Estimated population under 1", calculated from the census data ,is the same for all months
of a given year, or the number of nurses working in a given facility is the same for every month
in the 6 months period the number is reported for.
This difference becomes important when calculating an annual value for the indicator morbidity
service burden for a facility. The monthly head-counts are summed up for the 12 months to
get the annual headcount, while the number of staff for the PHU is calculated as the average
of the two 6-monthly values reported through the 6-monthly staff report. So in this example
the data element "OPD headcount" would have the aggregation operator "SUM" and the data
element "Number of staff" would have it set to "AVERAGE".
Another important feature of average data elements is the validity period concept. Average
data values are standing values for any period type within the borders of the period they are
registered for. For example, an annual population estimate following the calendar year, will
have the same value for any period that falls within that year no matter what the period type.
If the population under 1 for a given facility is 250 for the year of 2015 that means that the
value will be 250 for Jan-15, for Q3-15, for Week 12 of 2015 and for any period within 2015.
This has implications for how coverage indicators are calculated, as the full annual population
will be used as denominator value even when doing monthly reports. If you want to look at an
estimated annual coverage value for a given month, then you will have the option of setting
the indicator to "Annualised" which means that a monthly coverage value will be multiplied
by a factor of 12, a quarterly value by 4, in order to generate an effective yearly total. The
annualised indicator feature can therefore be used to mimic the use of monthly population
estimates.
33.5. Data collection vs. data analysis
33.5.1. Data collection and storage
Datasets determine what raw data that is available in the system, as they describe how data
is collected in terms of periodicity as well as spaital exten. Data sets define the building blocks
of the data to be captured and stored in DHIS2. For each data dimension we decide what level
of detail the data should be collected at namely 1) the data element (e.g. diagnosis, vaccine,
or any event taking place) and its categories (e.g. age and gender), 2) the period/frequency
dimension, and 3) the organisation unit dimension. For any report or data analysis you can
never retrieve more detailed data than what is defined in the data sets, so the design of the
datasets and their corresponding data entry forms (the data collection tools) dictate what kind
of data analysis will be possible.
33.5.2. Input does not equal Output
It is important to understand that the data entry forms or datasets themselves are not
intrinsically linked to the underlying data value and that the meaning of data is only described
by the data element (and its categories). This makes it perfectly safe to modify datasets and
forms without altering the data (as long as the data elements stay the same). This loose
coupling between forms and data makes DHIS2 flexible when it comes to designing and
changing new forms and in providing exactly the form the users want.
Another benefit of only linking data to data elements and not to forms, is the flexibility of
creating indicators and validation rules based on data elements, and also in providing any kind
of output report (in pivot tables, charts, maps etc) that can combine data individually or across
forms, e.g. to correlate data from different health programs. Due to this flexibility of enabling
integration of data from various programs (forms) and sources (routine and semi permanent
(population, staff, equipment)) a DHIS2 database is used as an integrated data repository
About data dimensions in DHIS2 Extended examples of data elements
and forms
478
for many or all parts of the aggregated data in a larger HIS. The figure below illustrates this
flexibility.
In this example, we see that data elements from multiple forms can be combined to create a
given indicator. As a more concrete example, one might collect "Population under one year of
age" in an annual data set by district, and then collect a data element like "Fully immunized
children" by month at the facility level. By annualizing the population, we can generate an
approximation of the effective monthly population, and combining this with the aggregate
total of the number of fully immunized children by month, it would be possible to generate an
inidicator "Fully immunized coverage", consisting of the aggregated total of children who are
fully immunized, divided by the effective monthly population.
33.6. Extended examples of data elements and forms
The table below combines data element the two group sets Diagnosis (all the diseases) and
Morbidity/Mortality (New cases, Follow-ups, Referrals, Deaths) with the data element category
PHU/Community. Deaths are captured in a separate form with other dimensions (e.g. the PHU/
Community) than morbidity.
This output table combines the two data element categories HIV_Age and Gender with the
data element group set ART Group. The group enables subtotals for staging and entry points
About data dimensions in DHIS2 How this works in pivot tables
479
summing up the data elements in that group. Subtotals for either age groups and gender would
be other possible columns to easily include here.
DHIS2 Login screen
33.7. How this works in pivot tables
When doing data analysis in Excel pivot tables or any other OLAP based tool the dimensions
become extremely powerful in providing many different views into the data. Each data element
category or group set become a pivot field, and the options or groups become values within
each of these fields. In fact categories and groupsets are treated exactly the same way in pivot
tables, and so are orgunits, periods, and data elements. All these become dimensions to the
data value that can be used to rearrange, pivot, filter, and to drill down into the data. Here we
will show some examples of how the data dimensions are used in pivot tables.
Using the example of morbidity and mortality data, a pivot table can show how the dimensions
can be used to view data for different aggregation levels.
The completely aggregated number is viewed when none of the pivot fields are arranged in
the table area, as column or row fields, but are listed above the table itself as page field (filter).
Here we have selected to look at the Morbidity total. The various data elements on morbidity
have been ordered into the main_de_groups Morbidity (we will get back to Mortality later). The
fields above the table itself are all set to "All", meaning that the totals in the table will contain
data from all Countries, Districts, Chiefdom, ou_type, year, months, the various categories as
listed in the red fields, and all data elements in the Morbidity group.
About data dimensions in DHIS2 How this works in pivot tables
480
As we have seen, this is not a very useful representation, as Morbidity is organized into new
cases, follow-ups, referrals, and then again in age groups. Also, we do not see the various
diagnoses. The first step is to include the diagnoses field (which is a group set), which is done
by dragging the "diagnosis" field down to be a row field, as shown in the figure below, and to
add the group set called "morbiditymortality" in the column field to display new cases, follow-
up, and referrals.
DHIS2 Login screen
Contrast this figure above to the one below.
They both show the same data (some of the rows have been cut in the screenshot due to image
size), albeit in a different way.
The "dataelement" field, used in the bottom figure, displays each diagnosis as three
elements; one follow-up, one new, and one referrals. This is the way the data elements have
been defined in DHIS, as this makes sense for aggregation. You would not like to aggregate
follow-ups and new, thus these have not been made as categories, the whole point of is to
ease aggregation and disaggregation.
The "diagnosis" group set has instead been made to lump these three (follow-up, new,
referrals) together, which can then be split with another group set, namely the one called
"morbiditymortality". This allows us to organize the data as in the first of the two figures,
where we have the single diagnosis per row, and the groups new, follow-up, referrals as rows.
The idea of using group sets is that you can combine, in any set, different data elements. Thus,
if we add the mortality data (by checking it from the drop-down menu of the main_de_groups
field, and moving this field out of the table) we can see also the deaths, since the mortality
data elements have been included as a "death" group in the "morbiditymortality" group set.
The result is shown below.
About data dimensions in DHIS2 How this works in pivot tables
481
DHIS2 Login screen
The result is a much more user-friendly pivot table. Now, another figure shows the relationship
between the group sets and elements (these are fake data values).
This small detail of the pivot table show how the actual data elements link to the group sets:
The four data elements, as defined in DHIS, are Measles death, Measles follow-up, Measles
new, and Measles referrals
They all belong to the group set "diagnosis", where they have been lumped together in the
group Measles
The group set "morbiditymortality" contains the groups New cases, Follow-up, Referrals, and
Deaths.
Only the data element Measles deaths has data related to the group Deaths, thus this is
where the data value (20) is shown, at the upper right corner. The same for Measles new;
the value (224) is shown at the intersection of the data element Measles new and the group
New cases (in the group set morbiditymortality)
All the intersections where the data element does not link with the groups in
morbiditymortality are left blank. Thus in this case we would get a nice table if we excluded
the dataelement from the table, and just had diagnosis and the group set morbiditymortality,
as in the figure shown earlier
Now lets see how the data element categories can be used. In the data entry form for Morbidity
the new cases and follow-ups use one age category, the referral data another,, and the
mortality data a third age breakup, so these are available as three individual age group fields in
the pivot tables called morbidity_age, referrals_age and mortality_age. It doesn't make sense
to use these while looking at these data together (as in the examples above), but e.g. if we
only want to look at the only the new cases we can put the MobidityMortalityGroups field back
up as a page field and there select the New cases group as a filter. Then we can drag the
Morbidity_age field down to the column area and we get the following view:
About data dimensions in DHIS2 How this works in pivot tables
482
The following table illustrates the benefits of reusing data element categories across datasets
and categorycombinations. The VCCT, ART and PMTCT data are collected in three different
datasets, the first two with both gender and age breakdown, and the PMTCT only age (gender
is given). All three share the same age groups and therefore it is possible to view data elements
from all these three datasets in the same table and use the age dimension. In the previous
example with morbidity and mortality data this was not possible since new cases, referrals and
deaths all have different age groups.
In the table below PMTCT data has been removed from the table and the gender category
added to the column area so that you can analyse the data for VCCT and ART by age and
gender. An optional subtotal for gender has also been added, as well as a grand total for all
age and gender.
About data dimensions in DHIS2 Case study: From paper forms to
multidimensional datasets - lessons
learned
483
33.8. Case study: From paper forms to multidimensional datasets -
lessons learned
Typically the design of a DHIS2 dataset is based on some requirements from a paper form that
is already in use. The logic of paper forms are not the same as the data element and data set
model of DHIS, e.g. often a field in a tabular paper form is described both by column headings
and text on each row, and sometimes also with some introductory table heading that provides
more context. In the database this is captured in one atomic data element with no reference
to a position in a visual table format, so it is important to make sure the data element with
the optional data element categories capture the full meaning of each individual field in the
paper form.
Another important thing to have in mind while designing datasets is that the dataset and the
corresponding data entry form (which is a dataset with layout) is a data collection tool and
not a report or analysis tool. There are other far more sophisticated tools for data output
and reporting in DHIS2 than the data entry forms. Paper forms are often designed with both
data collection and reporting in mind and therefore you might see things such as cumulative
values (in addition to the monthly values), repetition of annual data (the same population data
reported every month) or even indicator values such as coverage rates in the same form as
the monthly raw data. When you store the raw data in DHIS2 every month and have all the
processing power you need within the computerised tool there is no need (in fact it would be
stupid and most likely cause inconsistency) to register manually calculated values such as the
ones mentioned above. You only want to capture the raw data in your datasets/forms and leave
the calculations to the computer, and presentation of such values to the reporting tools in DHIS.
33.8.1. From tables to category combinations - designing multi-dimensional
data sets
As we have seen in the examples above, data element categories and category options are
helpful in representing tabular data, when adding dimensions to a field in a paper form. We
have also seen how the data element is one of the required dimensions which describe data
in DHIS2. As we will see in the example below there are often more than one way to represent
a paper form in DHIS2 , and it can be difficult to know which dimension to represent with a
data element name and which to represent as categories, or even as groups as we have seen
above. Here are some general lessons learned from working with data element and category
combinations:
Design your dimensions with data use in mind, not data collection. This means that
disaggregation of data values at collection time should be easily aggregated up along the
various dimensions, as in adding up to a meaningful total.
About data dimensions in DHIS2 From tables to category combinations -
designing multi-dimensional data sets
484
Reuse dimensions as much as possible as this increases the ability to compare disaggregated
data (e.g. age groups, fixed/outreach, gender).
Disaggregation dimensions should add up to a total. In certain cases, data elements may be
collected a subsets of each other. In this case, use of categories to disaggregate the data
element should not be used. As an example, we might collect "Number of confirmed malaria
cases" and disaggregate this by "Under 5" and "Over 5". A third data element "Number of
confirmed malaria cases under 1" might also exist on the form. It would seem reasonable then
to create three age groups : Under 1, Under 5 and Over 5, to describe the disaggregation.
However, the Under 1 is actually a subset of the Under 5 group, and when totaled, would
result in duplication. Thus, categories should be generally be composed of mutually exclusive
category options, such that the sum of individual category options results in a coherent total.
Different levels of dimensions; 1) disaggregation and 2) grouping. Disaggregation
dimensions dictate how you collect and how detailed you store your data, so plan these
carefully. The group dimension is more flexible and can be changed and added to even after
data collection (think of it as tagging).
It is best to think of how the data would be used in an integrated data repository and not
how it will actually be collected on forms or by programs when designing the meta-data
model. Ideally, the same type of disaggregation should be used across forms and datasets for
data elements which will be analysed together, or used to build indicators. Reuse definitions
so that the database can integrate even though the forms themselves might be duplicated
(which in practice, is often the case).
In order to better explain the approach and the possibilities we present an example paper form
and will walk through it step by step and design data elements, categories, category options
and category combinations.
About data dimensions in DHIS2 From tables to category combinations -
designing multi-dimensional data sets
485
This form has many tables and each of them potentially represent a data element category
combination (from now on referred to as a catcombo). As such there is no restriction on a
dataset to only have one set of dimensions or catcombo, it can have many and as we see
above this is necessary as the dimensions are very different from table to table. In the following
paragraphs, we will analyze how to break down this form into its compoenent pieces and
suggest an implementation pathway in DHIS2.
ANC table. This table in the top left corner is one the simpler ones in this form. It has two
dimensions, the first column with the ANC activity or service (1st visit, IPT 2nd dose etc) and
the second and third column which represent the place where the service was given with the
two options "Fixed" and "Outreach". Since the ANC service is the key phenomena to analyse
here, and often there is a need for looking at the total of "ANC 1st visits" no matter where
they actually took placed, it makes a lot of sense to use this dimension as the data element
dimension.
Thus, all items on the first column from "1st ANC" visit to "2nd IPT dose given by TBA" are
represented as individual data elements. The "where" dimension is represented as a data
element category (from now on referred to as category) with the name "fixed/outreach" with
the two data element category options (from now on catoptions) "fixed" and "outreach". There
is no other dimension here so we add a new catcombo with the name "Fixed/Outreach" with
one category "Fixed/Outreach". Strictly speaking there is another dimension in this table, and
that is the at PHU or by TBA dimension which is repeated for the two doses of IPT, but since
none of the other ANC services listed have this dimension it does not seem like a good idea
to separate out two data elements from this table and give them another catcombo with both
fixed/outreach and at PHU/by TBA. reusing the same catcombo for all the ANC services makes
more sense since it will be easier to look at these together in reports etc. and also the fact that
there is not much to lose by repeating the at PHU or by TBA information as part of the data
element name when it is only for four data elements in a table of eleven data elements.
DELIVERY table. This table is more tricky as it has a lot of information and you can see that
not all the rows have the same columns (some columns are merged and a one field is grayed
out/disabled.). If we start by looking at the first column "Deliveries assisted by" that seems
to be one dimension, but only down to the "Untrained TBA" row, as the remaining three rows
are not related to who assisted the delivery at all. Another dimension is the place of delivery,
either In PHU or in Community as stated on the top column headings. These deliveries are
further split into the outcome of the delivery, whether it is a live or still birth, which seems to
be another dimension. So if we disregard the three bottom rows for a moment there seems to
be 3 dimensions here, 1) assisted by, 2) place of delivery, and 3) delivery outcome. The key
decision to make is what to use as the data element, the main dimension, the total that you
will most often use and want easily available in reports and data analysis.
In this case, the outcome dimension as "Total live births" is a very commonly used value in
many indicators (maternal mortality ratio, births attended by skilled health personnel etc.). In
this case the "Assisted By" dimension could also have been used without any problem, but the
added value of easily getting the total live births information was the decisive point for us.
This means that from this table (or sub-table of row 1 to 6) there are only two data elements;
"Live births" and "Still births".
Next, there are two more dimensions, the "PHU/Community" with its two options and a
"Births attended by" with options ("MCH Aides", "SECHN", "Midwives", "CHO", "Trained TBA",
"Untrained TBA"). These two categories make up the catcombo "Births" which is assigned
to the two data elements "Live births" and "Still births". Considering the final three rows of
the delivery table we can see that "Complicated Deliveries" does not have the assisted by
dimension, but has the place and the outcome. "Low birth weight" also does not have the
assisted by dimension and not the outcome either. The LLITN given after delivery does not
have any additional dimension at all. Since not any of the three rows can share catcombo with
any other row we decided to represent these fields as so called flat data elements, meaning
data elements with no categories at all, and simply adding the additional information from the
column headings to the data element name, and therefore ended up with the following data
About data dimensions in DHIS2 From tables to category combinations -
designing multi-dimensional data sets
486
elements with the default (same as none) catcombo; "Complicated deliveries in PHU live birth",
"Complicated deliveries in PHU still births", "Complicated deliveries in community live birth",
"Complicated deliveries in community still births", "Low birth weight in PHU", "Low birth weight
in community", and "LLITN given after delivery".
POST-NATAL CARE table This table is simple and we used the same approach as for the ANC
table. 3 data elements listed in the first column and then link these to the catcombo called
"fixed/outreach". Reusing the same category fixed/outreach for these data elements enables
analysis on fixed/outreach together with ANC data and other data using the same category.
TT table This table is somewhat more complex than the previous examples.We decided to
use "TT1", "TT2" ... "TT5" as data elements which makes it easy to get the total of each one of
these. There is fixed/outreach dimension here, but there is also the "In school place" that is only
applied to the Non-Pregnant, or more correctly to any of the two as the school immunisation is
done whether the girls are pregnant or not. We consulted the program people behind the form
and found out that it would be OK to register all school TT immunisations as non-pregnant,
which simplifies the model a bit since we can reuse the "TT1" to "TT5" data elements. So
we ended up with a new category called "TT place" with the three options (Fixed, Outreach,
In School), and another category called "Pregnant/Non-pregnant" with two options. The new
catcombo "TT" is then a combination of these two and applied to the 5 TT data elements.
Since we agreed to put all In Schools immunisations under Non-pregnant in means that the
combination of options (Pregnant+In School) will never be used in any data entry form, and
hence become a possible optioncombo, which is OK. As long as the form is custom designed
then you can choose which combinations of options to use or not, and therefore it is not a
problem to have such passive or unused catoptions. Having school as one option in the TT place
category simplifies the model and therefore we thought it was worth it. The alternative would
be to create 5 more data elements for "TT1 in school" ... "TT5 in school", but then it would be
a bit confusing to add these together with the "TT1" ..."TT5" plus TT catcombo. Having school
as a place in the TT place category makes it a lot easier to get the total of TT1.. TT5 vaccines
given, which are the most important numbers and most often used values for data analysis.
Complications of early and late pregnancy and labour tables We treat these two
tables as one, and will explain why. These two tables are a bit confusing and not the best
design. The most important data coming out of these tables are the pregnancy complications
and the maternal deaths. These data elements contain further detail on the cause of the
complication or death (the first column in both tables), as well as a place of death (in PHU or
community), and an outcome of the complication (when its not a death) that can be either
"Managed at PHU" or " Referred". We decided to create two data elements for these two
tables; "Pregnancy complications", and "Maternal Deaths", and two category combinations,
one for each of the data elements. For the Pregnancy Complications data element there are
two additional dimensions, the cause of the complication (the combined list of the first column
in the two tables) and the outcome (managed at PHU or Referred), so these are the categories
and options that make up that category combination. For the "Maternal deaths" data element
the same category with the different causes are used and then another category for the place
of death (in PHU or In community). This way the two data elements can share one category
and it will be easy to derive the total number of pregnancy complications and maternal deaths.
While the list of complications on the paper form is divided into two (early and late/labour) you
can see that e.g. the malaria in 2nd and 3rd trimester are listed under early, but in fact are for
a later phase of the pregnancy. There is no clear divide between early and late complications
in the form, and therefore we gave up trying to make this distinction in the database.
Family Planning Services table This table has 2 dimensions, the family planning method
(contraceptive) and whether the client is new or continuing. We ended up with one data
element only "Family planning clients" and then added two categories "FP method" with all
the contraceptives as options, and another category "FP client type" with new or continuing
as options. This way it will be easy to get the total number of family planning clients which is
the major value to look at in data analysis, and from there you can easily get the details on
method or how many new clients there are.
About data dimensions in DHIS2 Step-by-step approach to designing
datasets
487
33.8.2. Step-by-step approach to designing datasets
1. Identify the different tables (or sub datasets) in the paper form that share the same
dimensions
2. For each table identify the dimensions that describe the data fields
3. Identify the key dimension, the one that makes most sense to look at in isolation (when the
others are collapsed, summed up). This is your data element dimension, the starting point
and core of your multidimensional model (sub dataset). The data element dimension can be
a merger of two or more dimensions if that makes more sense for data analysis. The key is
to identify which total that makes most sense to look at alone when the other dimensions
are collapsed.
4. For all other/additional dimensions identify their options, and come up with explanatory
names for dimensions and their options.
5. Each of these additional dimensions will be a data element category and their options will
be category options.
6. Combine all categories for each sub dataset into one category combination and assign this
to all the data elements in your table (or sub dataset if you like).
7. 7. When you are done with all the tables (sub datasets), create a new dataset and add all
the data elements you have identified (in the whole paper form) to that dataset.
8. 8. Your dataset will then consist of a set of data elements that are linked to one or more
category combinations.
DHIS2 Frequently Asked Questions
489
Chapter 34. DHIS2 Frequently Asked
Questions
34.1. I have entered data into a data entry form, but I cannot see the data in any reports (pivot
tables, charts, maps). Why does data which is entered not show up immediately in my
graphs in DHIS2?
Data which is entered into DHIS2 must first be processed with the "analytics". This means
that data is not immediately available in the analytics resources (such as reports, pivot
tables, data visualizer, GIS, etc) after it has been entered. If scheduling is active, the
analytics process will run automatically at midnight each day. After that, new data which
was entered since the last time the analytics process ran, will become visible.
You can trigger the analytics process manually by selecting Reports->Analytics from
the main menu and pressing the "Start export" button. Note, the process may take a
significant amount of time depending on the amount of data in your database.
Other factors which can affect the visibility of data are:
Data approval: If data has not been approved to a level which corresponds to your
users level, the data may not be visible to you.
Sharing of meta-data objects: If certain meta-data objects have not been shared with
a user group which you are a member of, the data may not be visible to you.
Caching of analytics: In many cases, server administrators cache analytical objects
(such as pivot tables, maps, graphs) on the server. If you have entered data, re-run
analytics, and you are still not seeing any (updated) data, be sure that your data is
not being cached by the server.
34.2. I have downloaded DHIS 2 from https://www.dhis2.org/downloads but when i try to enter
the system it needs a username and password. Which should I use?
By default, the username will be "admin" and the password "district". Usernames and
passwords are case sensitive.
Release and upgrade notes
491
Chapter 35. Release and upgrade notes
Table35.1.DHIS2 releases
Version Release date Release notes Upgrade notes
2.28 2017-10-11
2.27 2017-06-02
2.26 2017-02-01
2.25 2016-10-13
2.24 2016-07-04
2.23 2016-04-25
2.22 2016-01-15
2.21 2015-10-21
2.20 2015-07-20
2.19 2015-05-15
2.18 2015-01-22
2.17 2014-11-21
2.16 2014-07-25
2.15 2014-05-10
User authorities
493
Appendix A. User authorities
TableA.1.
Accept data at lower levels F_ACCEPT_DATA_LOWER_LEVELS
Access my data mart F_MYDATAMART_VIEW
Add Facility F_FRED_CREATE
Add Locale F_LOCALE_ADD
Add Option Set F_OPTIONSET_ADD
Add Organisation Unit Group Set F_ORGUNITGROUPSET_ADD
Add Program Rule F_PROGRAM_RULE_ADD
Add Public Map F_MAP_PUBLIC_ADD
Add Relationship Type F_RELATIONSHIPTYPE_ADD
Add/Remove Members In Read-Only User
Groups
F_USER_GROUPS_READ_ONLY_ADD_MEMBERS
Add SQL View F_SQLVIEW_ADD
Add Tracked Entities F_TRACKED_ENTITY_ADD
Add Tracked Entity Attribute Value F_TRACKED_ENTITY_ATTRIBUTEVALUE_ADD
Add Tracked Entity Form F_TRACKED_ENTITY_FORM_ADD
Add Tracked Entity Instance Comment F_TRACKED_ENTITY_COMMENT_ADD
Add Tracked Entity Relationship F_RELATIONSHIP_ADD
Add/Update Attribute F_ATTRIBUTE_ADD
Add/Update Chart F_CHART_ADD
Add/Update Concept F_CONCEPT_ADD
Add/Update Constant F_CONSTANT_ADD
Add/Update Data Value F_DATAVALUE_ADD
Add/Update Indicator Type F_INDICATORTYPE_ADD
Add/Update Min/max rule F_DATAELEMENT_MINMAX_ADD
Add/Update Organisation Unit F_ORGANISATIONUNIT_ADD
Add/Update Private Category Option Group F_CATEGORY_OPTION_GROUP_PRIVATE_ADD
Add/Update Private Category Option Group
Set
F_CATEGORY_OPTION_GROUP_SET_PRIVATE_ADD
Add/Update Private Data Element F_DATAELEMENT_PRIVATE_ADD
Add/Update Private Data Element Category F_CATEGORY_PRIVATE_ADD
Add/Update Private Data Element Category
Combo
F_CATEGORY_COMBO_PRIVATE_ADD
Add/Update Private Data Element Category
Option
F_CATEGORY_OPTION_PRIVATE_ADD
Add/Update Private Data Element Category
Option Combo
F_CATEGORY_OPTION_COMBO_PRIVATE_ADD
Add/Update Private Data Element Groups F_DATAELEMENTGROUP_PRIVATE_ADD
Add/Update Private Data Element Group Sets F_DATAELEMENTGROUPSET_PRIVATE_ADD
Add/Update Private Data Set F_DATASET_PRIVATE_ADD
User authorities
494
Add/Update Private Document F_DOCUMENT_PRIVATE_ADD
Add/Update Private Indicator F_INDICATOR_PRIVATE_ADD
Add/Update Private Indicator Group F_INDICATORGROUP_PRIVATE_ADD
Add/Update Private Indicator Group Sets F_INDICATORGROUPSET_PRIVATE_ADD
Add/Update Private Option Set F_OPTIONSET_PRIVATE_ADD
Add/Update Private Organisation Unit Group F_ORGUNITGROUP_PRIVATE_ADD
Add/Update Private Organisation Unit Group
Set
F_ORGUNITGROUPSET_PRIVATE_ADD
Add/Update Private Program F_PROGRAM_PRIVATE_ADD
Add/Update Private Report F_REPORT_PRIVATE_ADD
Add/Update Private SQL View F_SQLVIEW_PRIVATE_ADD
Add/Update Private Tracked Entity Attribute F_TRACKED_ENTITY_ATTRIBUTE_PRIVATE_ADD
Add/Update Private User Group F_USERGROUP_PRIVATE_ADD
Add/Update Private User Role F_USERROLE_PRIVATE_ADD
Add/Update Private Validation Rule Group F_VALIDATIONRULEGROUP_PRIVATE_ADD
Add/Update Program Attribute F_PROGRAM_ATTRIBUTE_ADD
Add/Update Program Indicator F_ADD_PROGRAM_INDICATOR
Add/Update Program Stage F_PROGRAMSTAGE_ADD
Add/Update Program Stage Section F_PROGRAMSTAGE_SECTION_ADD
Add/Update Public Category Option Group F_CATEGORY_OPTION_GROUP_PUBLIC_ADD
Add/Update Public Category Option Group
Set
F_CATEGORY_OPTION_GROUP_SET_PUBLIC_ADD
Add/Update Public Chart F_CHART_PUBLIC_ADD
Add/Update Public Dashboard F_DASHBOARD_PUBLIC_ADD
Add/Update Public Data Element F_DATAELEMENT_PUBLIC_ADD
Add/Update Public Data Element Category F_CATEGORY_PUBLIC_ADD
Add/Update Public Data Element Category
Combo
F_CATEGORY_COMBO_PUBLIC_ADD
Add/Update Public Data Element Category
Option
F_CATEGORY_OPTION_PUBLIC_ADD
Add/Update Public Data Element Category
Option
F_CATEGORY_OPTION_DELETE
Add/Update Public Data Element Category
Option Combo
F_CATEGORY_OPTION_COMBO_PUBLIC_ADD
Add/Update Public Data Element Groups F_DATAELEMENTGROUP_PUBLIC_ADD
Add/Update Public Data Element Group Sets F_DATAELEMENTGROUPSET_PUBLIC_ADD
Add/Update Public Data Set F_DATASET_PUBLIC_ADD
Add/Update Public Document F_DOCUMENT_PUBLIC_ADD
Add/Update Public Indicator F_INDICATOR_PUBLIC_ADD
Add/Update Public Indicator Group F_INDICATORGROUP_PUBLIC_ADD
Add/Update Public Indicator Group Sets F_INDICATORGROUPSET_PUBLIC_ADD
Add/Update Public Option Set F_OPTIONSET_PUBLIC_ADD
User authorities
495
Add/Update Public Organisation Unit Group F_ORGUNITGROUP_PUBLIC_ADD
Add/Update Public Organisation Unit Group
Set
F_ORGUNITGROUPSET_PUBLIC_ADD
Add/Update Public Program F_PROGRAM_PUBLIC_ADD
Add/Update Public Report F_REPORT_PUBLIC_ADD
Add/Update Public Report Table F_REPORTTABLE_PUBLIC_ADD
Add/Update Public SQL View F_SQLVIEW_PUBLIC_ADD
Add/Update Public Tracked Entity Attribute F_TRACKED_ENTITY_ATTRIBUTE_PUBLIC_ADD
Add/Update Public User Group F_USERGROUP_PUBLIC_ADD
Add/Update Public User Role F_USERROLE_PUBLIC_ADD
Add/Update Public Validation Rule Group F_VALIDATIONRULEGROUP_PUBLIC_ADD
Add/Update Section F_SECTION_ADD
Add/Update Tracked Entity F_TRACKED_ENTITY_ADD
Add/Update Tracked Entity Attributes F_ALLOW_EDIT_TRACKED_ENTITY_ATTRIBUTES
Add/Update Tracked Entity Data Value F_TRACKED_ENTITY_DATAVALUE_ADD
Add/Update Tracked Entity Instance F_TRACKED_ENTITY_INSTANCE_ADD
Add/Update User F_USER_ADD
Add/Update User Group Managing
Relationships
F_USERGROUP_MANAGING_RELATIONSHIPS_ADD
Add/Update User Within Managed Group F_USER_ADD_WITHIN_MANAGED_GROUP
Add/Update Validation Criteria F_VALIDATIONCRITERIA_ADD
Add/Update Validation Rule F_VALIDATIONRULE_ADD
Add Validation Rule Groups F_VALIDATIONRULEGROUP_ADD
Administrate data mart F_DATAMART_ADMIN
Administrate data mart F_DATA_MART_ADMIN
Administrate data vizualiser F_DV_ADMIN
Administrate GIS F_GIS_ADMIN
Approve data F_APPROVE_DATA
Approve data at lower levels F_APPROVE_DATA_LOWER_LEVELS
Archive data F_ARCHIVE_DATA
Change GIS Configuration F_GIS_CONFIGURATION_UPDATE
Change Location of Tracked Entity Instance F_TRACKED_ENTITY_INSTANCE_CHANGE_LOCATION
Change order in Data Set F_DATASET_ORDER_CHANGE
Change system settings F_SYSTEM_SETTING
Change Tracked Entity Instance Location F_TRACKED_ENTITY_CHANGE_LOCATION
Chart External Access F_CHART_EXTERNAL
Concept Management F_CONCEPT_MANAGEMENT
Constant Management F_CONSTANT_MANAGEMENT
Copy Excel Item F_COPY_EXCEL_ITEM_ADMINISTRATION
Create and download backup F_DASHBOARD_DOWNLOAD_BACKUP
Data Admin Locking F_DATAADMIN_LOCK
User authorities
496
Data Admin UnLocking F_DATAADMIN_UNLOCK
Delete Attribute F_ATTRIBUTE_DELETE
Delete Category Option Group F_CATEGORY_OPTION_GROUP_DELETE
Delete Category Option Group Set F_CATEGORY_OPTION_GROUP_SET_DELETE
Delete Chart F_CHART_DELETE
Delete Concept F_CONCEPT_DELETE
Delete Constant F_CONSTANT_DELETE
Delete Data Element F_DATAELEMENT_DELETE
Delete Data Element Category F_CATEGORY_DELETE
Delete Data Element Category Combo F_CATEGORY_COMBO_DELETE
Delete Data Element Groups F_DATAELEMENTGROUP_DELETE
Delete Data Element Group Sets F_DATAELEMENTGROUPSET_DELETE
Delete Data Set F_DATASET_DELETE
Delete Data Value F_DATAVALUE_DELETE
Delete Document F_DOCUMENT_DELETE
Delete Excel Template F_EXCEL_TEMPLATE_MANAGEMENT_DELETE
Delete Facility F_FRED_DELETE
Delete Indicator F_INDICATOR_DELETE
Delete Indicator Group F_INDICATORGROUP_DELETE
Delete Indicator Group Sets F_INDICATORGROUPSET_DELETE
Delete Indicator Type F_INDICATORTYPE_DELETE
Delete Locale F_LOCALE_DELETE
Delete Min/max rule F_DATAELEMENT_MINMAX_DELETE
Delete Option Set F_OPTIONSET_DELETE
Delete Organisation Unit F_ORGANISATIONUNIT_DELETE
Delete Organisation Unit Group F_ORGUNITGROUP_DELETE
Delete Organisation Unit Group Set F_ORGUNITGROUPSET_DELETE
Delete Program F_PROGRAM_DELETE
Delete Program Attribute F_PROGRAM_ATTRIBUTE_DELETE
Delete Program Enrollment F_PROGRAM_INSTANCE_DELETE
Delete Program Stage F_PROGRAMSTAGE_DELETE
Delete Program Stage Section F_PROGRAMSTAGE_SECTION_DELETE
Delete Relationship Type F_RELATIONSHIPTYPE_DELETE
Delete Report F_REPORT_DELETE
Delete Report Table F_REPORTTABLE_DELETE
Delete Section F_SECTION_DELETE
Delete SMS F_MOBILE_DELETE_SMS
Delete SQL View F_SQLVIEW_DELETE
Delete Tracked Entity F_TRACKED_ENTITY_DELETE
Delete Tracked Entity Attribute F_TRACKED_ENTITY_ATTRIBUTE_DELETE
User authorities
497
Delete Tracked Entity Attribute Value F_TRACKED_ENTITY_ATTRIBUTEVALUE_DELETE
Delete Tracked Entity Data Value F_TRACKED_ENTITY_DATAVALUE_DELETE
Delete Tracked Entity Form F_TRACKED_ENTITY_FORM_DELETE
Delete Tracked Entity Instance F_TRACKED_ENTITY_INSTANCE_DELETE
Delete Tracked Entity Instance Comment F_TRACKED_ENTITY_COMMENT_DELETE
Delete Tracked Entity Instance Visit F_PROGRAM_STAGE_INSTANCE_DELETE
Delete Tracked Entity Relationship F_RELATIONSHIP_DELETE
Delete User F_USER_DELETE
Delete User Group F_USERGROUP_DELETE
Delete User Role F_USERROLE_DELETE
Delete User Within Managed Group F_USER_DELETE_WITHIN_MANAGED_GROUP
Delete Validation Criteria F_VALIDATIONCRITERIA_DELETE
Delete Validation Rule F_VALIDATIONRULE_DELETE
Delete Validation Rule Group F_VALIDATIONRULEGROUP_DELETE
Eliminate duplicate data elements F_ELIMINATE_DUPLICATE_DATA_ELEMENTS
Excel Reporting Administration F_EXCEL_REPORT_ADMINISTRATION
Execute SQL View F_SQLVIEW_EXECUTE
Export Activity Plan to XLS file F_ACTIVITY_PLAN_EXPORT
Export data F_EXPORT_DATA
Export events F_EXPORT_EVENTS
Export meta-Data F_METADATA_EXPORT
Generate Activity Plans F_GENERATE_ACTIVITY_PLANS
Generate min-max values F_GENERATE_MIN_MAX_VALUES
Generate Program Statistics Report F_GENERATE_STATISTICAL_PROGRAM_REPORT
Generate Program Summary Report F_GENERATE_PROGRAM_SUMMARY_REPORT
Generate Tracked Entity Tabular report F_GENERATE_BENEFICIARY_TABULAR_REPORT
Import data F_IMPORT_DATA
Import events F_IMPORT_EVENTS
Import from other systems F_IMPORT_OTHER_SYSTEMS
Import GML F_IMPORT_GML
Import meta-Data F_METADATA_IMPORT
Insert custom Java script and CSS F_INSERT_CUSTOM_JS_CSS
List Excel Template F_EXCEL_TEMPLATE_MANAGEMENT_LIST
List Tracked Entity Instance F_TRACKED_ENTITY_INSTANCE_LIST
List User Groups F_USERGROUP_LIST
List User Roles F_USERROLE_LIST
Load event reminder messages F_PROGRAM_STAGE_INSTANCE_REMINDER
Load Tracked Entity Instance History F_TRACKED_ENTITY_INSTANCE_HISTORY
Lock Data Set F_DATASET_LOCK
Manage integration routes F_MANAGE_INTEGRATION_ROUTES
User authorities
498
Manage Program Indicators F_PROGRAM_INDICATOR_MANAGEMENT
Manage Program Rule F_PROGRAM_RULE_MANAGEMENT
Manage Tracked Entities F_TRACKED_ENTITY_MANAGEMENT
Manage Tracked Entity Instance Reminders F_TRACKED_ENTITY_INSTANCE_REMINDER_MANAGEMENT
Map External Access F_MAP_EXTERNAL
Merge organisation units F_MERGE_ORGANISATION_UNITS
Move Organisation Unit F_ORGANISATIONUNIT_MOVE
Multiple Individual Data Entry F_NAME_BASED_DATA_ENTRY
Option Set Management F_OPTIONSET_MANAGEMENT
Organisation Unit Registration F_ORGANISATION_REGISTRATION
Perform maintenance tasks F_PERFORM_MAINTENANCE
Program Enrollment F_PROGRAM_ENROLLMENT
Program Event Management F_PROGRAM_INSTANCE_MANAGEMENT
Program Stage Section Management F_PROGRAMSTAGE_SECTION_MANAGEMENT
Program Tracking Management F_PROGRAM_TRACKING_MANAGEMENT
Program Un-enrollment F_PROGRAM_UNENROLLMENT
Prune organisation units F_PRUNE_ORGANISATION_UNITS
Remove Empty Tracked Entity Events F_TRACKED_ENTITY_REMOVE_EMPTY_EVENTS
Rename Excel Template file F_EXCEL_TEMPLATE_MANAGEMENT_RENAME
Report Table External Access F_REPORTTABLE_EXTERNAL
Run validation F_RUN_VALIDATION
Scheduling Administration F_SCHEDULING_ADMIN
Scheduling case aggregate query builder F_SCHEDULING_CASE_AGGREGATE_QUERY_BUILDER
Scheduling send messages F_SCHEDULING_SEND_MESSAGE
Search Activity Plan F_ACTIVITY_PLAN
Search events without registration F_PROGRAM_STAGE_INSTANCE_SEARCH
Search events with registration F_PROGRAM_TRACKING_SEARCH
Search Tracked Entity Instance F_TRACKED_ENTITY_INSTANCE_SEARCH
Search Tracked Entity Instance in All Org
Units
F_TRACKED_ENTITY_INSTANCE_SEARCH_IN_ALL_ORGUNITS
See API Module M_dhis-web-api
See Apps Maintenance module M_dhis-web-maintenance-appmanager
See Browser Cache Cleaner module M_dhis-web-cache-cleaner
See Dashboard integration module M_dhis-web-dashboard-integration
See Dashboard module M_dhis-web-dashboard
See Data Administration module M_dhis-web-maintenance-dataadmin
See Data Elements and Indicators
Maintenance module
M_dhis-web-maintenance-datadictionary
See Data Entry module M_dhis-web-dataentry
See Data Mart module M_dhis-web-datamart
See Data Set Maintenance module M_dhis-web-maintenance-dataset
User authorities
499
See Data Visualizer module M_dhis-web-visualizer
See Event Capture module M_dhis-web-event-capture
See Event Reports module M_dhis-web-event-reports
See Event Visualizer module M_dhis-web-event-visualizer
See Excel Report module M_dhis-web-excel-reporting
See Export Data Mart Module M_dhis-web-exportdatamart
See FRED API Module M_dhis-web-api-fred
See GIS module M_dhis-web-gis
See GIS module M_dhis-web-mapping
See Import-Export module M_dhis-web-importexport
See Individual Records M_dhis-web-caseentry
See Light module M_dhis-web-light
See Line-listing DataEntry module M_dhis-web-dataentry-national
See Mobile Maintenance module M_dhis-web-maintenance-mobile
See NRHM Reports module M_dhis-web-reports
See Organisation Unit Maintenance module M_dhis-web-maintenance-organisationunit
See Pivot Table module M_dhis-web-pivot
See Report module M_dhis-web-reporting
See Settings Maintenance module M_dhis-web-maintenance-settings
See Smartphone module M_dhis-web-mobile
See SMS module M_dhis-web-sms
See Tracked Entity And Programs module M_dhis-web-maintenance-program
See Tracker Capture module M_dhis-web-tracker-capture
See User Maintenance module M_dhis-web-maintenance-user
See Validation Analysis module M_dhis-web-validationrule-local-in
See Validation Rule module M_dhis-web-validationrule
Send message F_SEND_MESSAGE
Send SMS F_MOBILE_SENDSMS
Set mobile settings F_MOBILE_SETTINGS
Single Event Without Registration Data Entry F_ANONYMOUS_DATA_ENTRY
Single Event With Registration Data Entry F_SINGLE_EVENT_DATA_ENTRY
Sql View External Access F_SQLVIEW_EXTERNAL
Sql View Management F_SQLVIEW_MANAGEMENT
Tracked Entity Aggregation F_TRACKED_ENTITY_AGGREGATION
Tracked Entity Form Management F_TRACKED_ENTITY_FORM_MANAGEMENT
Tracked Entity Instance Dashboard F_TRACKED_ENTITY_INSTANCE_DASHBOARD
Tracked Entity Instance Management F_TRACKED_ENTITY_INSTANCE_MANAGEMENT
Tracked Entity Relationship Management F_RELATIONSHIP_MANAGEMENT
Update Facility F_FRED_UPDATE
Update Organisation Unit Level F_ORGANISATIONUNITLEVEL_UPDATE
User authorities
500
Update Program Rule F_PROGRAM_RULE_UPDATE
Update Relationship Type F_RELATIONSHIPTYPE_UPDATE
Update Tracked Entities F_TRACKED_ENTITY_UPDATE
Update Tracked Entity Attribute F_TRACKED_ENTITY_ATTRIBUTE_EDIT
Upload Excel Template F_EXCEL_TEMPLATE_MAMAGEMENT_UPLOAD
View and Search Tracked Entity Attributes
and Identifiers
F_ACCESS_TRACKED_ENTITY_ATTRIBUTES
View data browser F_VIEW_DATABROWSER
View Program Stage Completeness Report F_PROGRAM_STAGE_COMPLETENESS
View program tracking F_PROGRAM_TRACKING_LIST
View Report F_REPORT_VIEW
View Tracked Entity Attribute F_TRACKED_ENTITY_ATTRIBUTE_VIEW
View unapproved data F_VIEW_UNAPPROVED_DATA
View User F_USER_VIEW
View User Group Managing Relationships F_USERGROUP_MANAGING_RELATIONSHIPS_VIEW
View User Within Managed Group F_USER_VIEW_WITHIN_MANAGED_GROUP
System settings General settings
501
Appendix B. System settings
B.1. General settings
TableB.1.General settings
Setting Description
Maximum number of analytics records Increase this number to provide more
records from the analytics.
The default value is 50,000.
Warning
Use the setting Unlimited carefully, it
might result in a very high load on your
server.
Infrastructural indicators Defines an indicator group where the
member indicators should describe data
about the organisation units' infrastructure.
You can view the infrastructural data in the
GIS app: right-click a facility and click Show
information.
Infrastructural data elements Defines a data element group where the
member data elements should describe data
about the organisation units' infrastructure.
ExampleB.1.
Infrastructural data elements can be
population, doctors, beds, Internet
connectivity and climate.
You can view the infrastructural data in the
GIS app: right-click a facility and click Show
information.
Infrastructural period type Sets the frequency for which the data
elements in the infrastructural data
elements group are captured.
This will typically be yearly. When viewing
the infrastructural data you will be able to
select the time period of the data source.
You can view the infrastructural data in the
GIS app: right-click a facility and click Show
information.
Default relative period for analysis Setting this value will determine which
relative period is selected as the default in
the analytics apps.
Feedback recipients Defines a user group where the members will
receive all messages sent via the feedback
function in the Dashboard app.
System settings Analytics settings
502
Setting Description
This will typically be members of the super
user team who are able to support and
answer questions coming from end-users.
Max offline organisation unit levels Defines how many levels in the organisation
unit hierarchy will be available offline in the
organisation unit tree widget.
Under normal circumstances you can leave
this on the lowest level, which is default is
the default setting.
It can be useful to set it to a higher level to
reduce initial load time in cases where you
have a large number of organisation units,
typically more than 30 000.
Data analysis std dev factor Sets the number of standard deviations used
in the outlier analysis performed on the
captured data in the Data Entry app.
The default value is 2. A high value will catch
less outlier values than a low value.
Phone number area code The area code for the area in which your
deployment is located.
Used for sending and receiving SMS.
Typically, this is a country code.
ExampleB.2.
+260 (country code for Zambia)
Enable multi-organisation unit forms Enables support to enter data forms for
multiple organisation units at the same time
in the Data Entry app.
If you've enabled this setting, you can in
the Data Entry app, click on the parent
organisation unit for the children that you
want to enter data for, and the data set list
will include data sets that are assigned to the
children of that parent.
Acceptance required before approval When this setting is selected, acceptance of
data will be required first before submission
to the next approval level is possible.
B.2. Analytics settings
TableB.2.Analytics settings
Setting Description
Default relative period for analysis Defines the relative period to use by default
in analytics app: Data Visualizer, Event
Reports, Event Visualizer, GIS and Pivot
Table apps. The relative period will be
System settings Analytics settings
503
Setting Description
automatically selected when you open these
apps.
Recommended setting: the most commonly
used relative period among your users.
Financial year relative start month Defines which month (April, July or October)
the the relative financial year in the analytics
apps should begin on.
Cacheability Sets whether analytics data responses
should be served with public or private
visibility.
Private: Any node or server between the
DHIS2 server and the end user which has
the ability to cache can NOT cache the web
page. This is useful if the page served can or
do contain sensitive information. This means
that each time you want a web page, either
you get a new page from the DHIS2 server, or
the DHIS2 server caches the page. No other
server than the DHIS2 server are allowed to
cache the page.
Public: Any node or server between the
DHIS2 server and the end user which has the
ability to cache can cache the web page. This
relives the traffic to the DHIS2 server and
potentially speeds up the subsequent page
loading speed.
Cache strategy Decides for how long reports analytics
responses should be cached.
If you use the scheduled, nightly analytics
update, select Cache until 6 AM
tomorrow. This is because data in reports
change at that time, and you can safely
cache data up to the moment when the
analytics tables are updated.
If you are loading data continuously into the
analytics tables, select No cache.
Max number of years to hide
unapproved data in analytics
Sets whether and for how long back in
time analytics should respect the approval
level of the data. Typically, data which is
several years old would be considered to be
approved by default. In order to speed up
analytics requests, you can choose to ignore
the actual approval level of historical data.
Never check approval: no data will be
hidden, irrespective of its data approval
status.
Check approval for all data: approval
status will always be checked.
System settings Server settings
504
Setting Description
Other options, for example Last 3 years:
approval status will be checked for data
which is newer than 3 years old; older data
will not be checked.
Threshold for analytics data caching Sets whether to enable caching data older
than the specified number of years only.
This allows for returning the most recent
data directly with no caching, while serving
cached version of older data for performance
concerns.
Respect category option start and end
date in analytics table export
This setting constrols whether analytics
should filter data which is assocciated with
a category option with a start and end
date, but which is not associated with a
period within the category options interval of
validity.
Put analytics in maintenance mode Places the analytics and web API of DHIS2
in maintenance mode. This means that "503
Service Unavailable" will be returned for all
requests.
This is useful when you need to perform
maintenance on the server, for example
rebuilding indexes while the server is
running in production, in order to reduce
load and more efficiently carry out the
maintenance.
B.3. Server settings
TableB.3.Server settings
Setting Description
Number of database server CPUs Sets the number of CPU cores of your
database server.
This allows the system to perform optimally
when the database is hosted on a different
server than the application server, since
analytics in DHIS2 scales linearly with the
number of available cores.
System notifications email address Defines the email address which will receive
system notifications.
Notifications about failures in processes
such as analytics table generation will be
sent here. This is useful for application
monitoring.
Server base URL Defines the full, externally accessible base
URL for your server.
System settings Appearance settings
505
Setting Description
The URL is used to provide links to your
server from external locations such as emails
sent from the system.
Note
If you don't specify a server base URL,
emails sent from the DHIS2 messaging
system will not contain a reply link.
ExampleB.3.
https://apps.dhis2.org/demo is the server
base URL for the DHIS2 demo server.
Google Analytics (Universal Analytics)
key
Sets the Google UA key to provide usage
analytics for your DHIS2 instance through
the Google Analytics platform. It should
be noted that currently, not all apps in
DHIS2 support Google Analytics, so certain
activity of your users may not appear in this
platform.
You can read more about Google Analytics at
http://google.com/analytics.
B.4. Appearance settings
TableB.4.Appearance settings
Setting Description
Select language Sets the language for which you can then
enter translations of the following settings:
Application introduction
Application title
Application notification
Application left-side footer
Application right-side footer
Application title Sets the application title on the top menu.
Application introduction Sets an introduction of the system which will
be visible on the top-left part of the login
page.
Application notification Sets a notification which will be visible on the
front page under the login area.
Application left-side footer Sets a text in the left-side footer area of the
login page.
Application right-side footer Sets a text in the right-side footer area of the
login page.
Style Sets the style (look-and-feel) of the system.
The user can override this setting in the
Settings app: User settings > Style.
System settings Appearance settings
506
Setting Description
Note
Due to technical reasons, it's not
possible to change the color of the
newest version of the header bar. The
apps with the newest header bar will
retain the blue header bar.
Start page Sets the page or app which the user will be
redirected to after log in.
Recommended setting: the Dashboard app.
Help page link Defines the URL which users will see when
they click Profile >Help.
Flag Sets the flag which is displayed in the left
menu of the Dashboard app.
Interface language Sets the language used in the user interface.
The user can override this setting in the
Settings app: User settings > Interface
language.
Database language Sets the language used in the database.
The user can override this setting in the
Settings app: User settings > Database
language.
Property to display in analysis modules Sets whether you want to display the
metadata objects' names or short names in
the analytics apps: Data Visualizer, Event
Reports, Event Visualizer, GIS and Pivot
Table apps.
The user can override this setting in the
Settings app: User settings > Property
to display in analysis modules.
Default digit group separator to display
in analysis modules
Sets the default digit group separator in
the analytics apps: Data Visualizer, Event
Reports, Event Visualizer, GIS and Pivot
Table apps.
Require authority to add to view object
lists
If you select this option, you'll hide menu and
index page items and links to lists of objects
if the current user doesn't have the authority
to create the type of objects (privately or
publicly).
Custom login page logo Select this option and upload an image to
add your logo to the login page.
Custom top menu logo Select this option and upload an image to
add your logo to the left in the top menu.
System settings Email settings
507
B.5. Email settings
TableB.5.Email settings
Setting Description
Host name Sets the host name of the SMTP server.
ExampleB.4.
When you use Google SMTP services, the
host name should be smtp.gmail.com.
Port Sets the port to connect to the SMTP server.
User name The user name of the user account with the
SMTP server.
ExampleB.5.
mail@dhis2.org
Password The password of the user account with the
SMTP server.
TLS Select this option if the SMPT server requires
TLS for connections.
Email sender The email address to use as sender when
sending out emails.
Send me a test email Sends a test email to the current user logged
into DHIS2.
B.6. Messaging settings
TableB.6.
Setting Description
Enable message email notifications Defines whether DHIS 2 user messages
should be delivered to the email address
associated with the user by default. This
setting can be overridden by user settings.
Enable message SMS notifications Defines whether DHIS 2 user messages
should be delivered as SMS to the mobile
phone number associated with the user by
default. This setting can be overridden by
user settings.
B.7. Access settings
TableB.7.Access settings
Setting Description
Self registration account user role Defines which user role should be given to
self-registered user accounts.
To enable self-registration of users: select
any user role from the list. A link to the self-
System settings Access settings
508
Setting Description
registration form will be displayed on the
login page.
Note
To enable self-registration, you must
also select a Self registration
account organisation unit.
To disable self-registration of users: select
Disable self registration.
Self registration account organisation
unit
Defines which organisation unit should be
associated with self-registered users.
Note
To enable self-registration, you must
also select a Self registration
account user role.
Do not require reCAPTCHA for self
registration
Defines whether you want to use reCAPTCHA
for user self-registration. This is enabled by
default.
Enable user account recovery Defines whether users can restore their own
passwords.
When this setting is enabled, a link to the
account recovery form will be displayed on
the front page.
Note
User account recovery requires that
you have configured email settings
(SMTP).
Lock user account temporarily after
multiple failed login attempts
Defines whether the system should lock user
accounts after five successive failed login
attempts over a timespan of 15 minutes.
The account will be locked for 15 minutes,
then the user can attempt to log in again.
Allow users to grant own user roles Defines whether users can grant user roles
which they have themselves to others when
creating new users.
Allow assigning object to related
objects during add or update
Defines whether users should be allowed to
assign an object to a related object when
they create or edit metadata objects.
ExampleB.6.
You can allow users to assign an organisation
unit to data sets and organisation unit
group sets when creating or editing the
organisation unit.
System settings Calendar settings
509
Setting Description
Require user account password change Defines whether users should be forced to
change their passwords every 3, 6 or 12
months.
If you don't want to force users to change
password, select Never.
Enable password expiry alerts When set, users will receive a notification
when their password is about to expire.
Minimum characters in password Defines the minimum number of characters
users must have in their passwords.
You can select 8 (default), 10, 12 or 14.
OpenID provider Defines the OpenID provider.
OpenID provider label Defines the label to display for the specified
OpenID provider.
CORS whitelist Whitelists a set of URLs which can access
the DHIS 2 API from another domain. Each
URL should be entered on separate lines.
Cross-origin resource sharing (CORS) is a
mechanism that allows restricted resources
(e.g. javascript files) on a web page to be
requested from another domain outside the
domain from which the first resource was
served.
Mapzen search API key Defines the API key for the Mapzen API.
This API is used to search addresses globally
within DHIS 2.
Google Maps API key Defines the API key for the Google Maps API.
This is used to display maps within DHIS 2.
B.8. Calendar settings
TableB.8.Calendar settings
Setting Description
Calendar Defines which calendar the system will use.
The system supports the following calendars:
Coptic, Ethiopian, Gregorian, Islamic (Lunar
Hijri), ISO 8601, Julian, Nepali, Persian (Solar
Hijri) and Thai.
Note
This is a s system wide setting. It is not
possible to have multiple calendars
within a single DHIS2 instance.
Date format Defines which date format the system will
use.
System settings Data import settings
510
B.9. Data import settings
The data import settings apply to extra controls which can be enabled to validate aggregate
data which is imported through the web API. They provide optional constraints on what should
be considered a conflict during import. The constraints are applied to each individual data
value in the import.
TableB.9.Data import settings
Setting Description
Require periods to match period type of
data set
Require period of data value to be of the
same period type as the data sets for which
the data element of data value is assigned to.
Require category option combos to
match category combo of data element
Require category option combination of data
value to be part of the category combination
of the data element of the data value.
Require organisation units to match
assignment of data set
Require organisation unit of data value to
be assigned to one or more of the data
sets which the data element of data value is
assigned to.
Require attribute option combos to
match category combo of data set
Require attribute option combination of data
value to be part of the category combination
of the data set which the data element of
data value is assigned to.
Require category option combo to be
specified
Require category option combination of data
value to be specified.
By default it will fall back to default category
option combination if not specified.
Require attribute option combo to be
specified
Require attribute option combination of data
value to be specified.
By default it will fall back to default attribute
option combination if not specified.
B.10. Synchronization settings
The following settings are used for both data and metadata synchronization.
Note
For more information about how you configure metadata synchronization, refer to
Configure metadata synchronizing
TableB.10.Synchronization settings
Setting Description
Remote server URL Defines the URL of the remote server running
DHIS2 to upload data values to.
It is recommended to use of SSL/HTTPS since
user name and password are sent with the
request (using basic authentication).
System settings Synchronization settings
511
Setting Description
The system will attempt to synchronize data
once every minute.
The system will use this setting for metadata
synchronization too.
Note
To enable data and metadata
synchronization, you must also
enable Data synchronization and
Metadata synchronization in the
Data administration app >
Scheduling.
Remote server user name The user name of the DHIS2 user account
on the remote server to use for data
synchronization.
Note
If you've enabled metadata
versioning, you must make sure that
the configured user has the authority
"F_METADATA_MANAGE".
Remote server password The password of the DHIS2 user account
on the remote server. The password will be
stored encrypted.
Enable versioning for metadata sync Defines whether to create versions of
metadata when you synchronize metadata
between central and local instances.
Don't sync metadata if DHIS versions
differ
The metadata schema changes between
versions of DHIS2 which could make different
metadata versions incompatible.
When enabled, this option will not allow
metadata synchronization to occur if the
central and local instance(s) have different
DHIS2 versions. This apply to metadata
synchronization done both via the user
interface and the API.
The only time it might be valuable to disable
this option is when synchronizing basic
entities, for example data elements, that
have not changed across DHIS2 versions.
Best effort A type of metadata version which decides
how the importer on local instance(s) will
handle the metadata version.
Best effort means that if the metadata import
encounters missing references (for example
missing data elements on a data element
group import) it ignores the errors and
continues the import.
System settings OAuth2 clients
512
Setting Description
Atomic A type of metadata version which decides
how the importer on local instance(s) will
handle the metadata version.
Atomic means all or nothing - the metadata
import will fail if any of the references do not
exist.
B.11. OAuth2 clients
You create, edit and delete OAuth2 clients in the System Settings app.
1. Open the System Settings apps and click OAuth2 clients.
2. Click the add button.
3. Enter Name, Client ID and Client secret.
4. Select Grant types.
Grant type Description
Password TBA
Refresh token TBA
Authorization code TBA
5. Enter Redirect URIs. If you've multiple URIs, separate them with a line.
DHIS2 Glossary
513
DHIS2 Glossary
A
Aggregation In the context of DHIS2, aggregation refers to how data elements are
combined within a particular hierarchical relationship. As an example,
all the health facilities in a particular district would contribute to the
total value for the particular district in question. Different aggregation
operators are supported within DHIS2, such as SUM, AVERAGE, and
COUNT.
Ananlytics Analytics refers to the process which processes and prepares data
which has been entered into DHIS2 into a format which is more
suitable for retreiving indicators and aggregated data. When data is
entered into DHIS2, it is stored in a format which is optimized for
writing the data. However, when data needs to be processed into
indicators or aggregated (e.g from months to quarters), it is more
efficent to transform and store this data in a different format which is
optimized for read-only operations. The analytics system of DHIS2 is
used extensively by the anaytics apps (GIS, Pivot Table, Event reports,
etc).
It is important to keep in mind that because the data which has been
entered into DHIS2 must be processed into the analytics format, the
data which appears in the analytics apps only represents the data
which was present in the system the last time analytics was run. If data
has been entered after that, analytics will need to be run again for this
data to appear in the analytics apps.
Aggregate data In the context of DHIS2, aggregate data refers to either data elements
or indicators that have been derived from other hierarchical data
sources. For instance, aggregate facility data would result from the
aggregate totals of all patients that have attended that facility for
a particular service. Aggregate district data would result from the
aggregate totals of all facilities contained with a particular district.
Application programming
interface
An application programming interface is a specification of how
different software components should interact with each other. The
DHIS2 API (or WebAPI) can be used to interface DHIS2 with other
software, to build reports or custom data entry forms.
Approvals Approvals can be used to control the visibility and editibility of data.
When data is submitted from the lowest reporting level, it can be
approved by the next higher level. This approval has two effects:
1. Data is no longer able to be edited in the data entry screens at the
lower level.
2. Depending on the system settings which have been enabled, the
data will become visibile at the approval level.
As an example, data is entered at the facility level, and the submitted
for approval. Once the data has been approved at the district level,
the data will become locked in the data entry screens for the facility
level. It will also become visible in the analytics apps to district users.
DHIS2 Glossary
514
B
Bi-monthly Refers to a two-month period, such as January 1st to February 28th.
C
Category Categories are groups of category options. The are used in
combinations to disaggregate data elements. Categories are typically
a single type of concept, such as "Age" or "Gender".
Category combinations Category combinations are used to disaggregate data elements.
As an example, the data element "Number of confirmed cases of
malaria" could be disaggregated subdivided into to categories: "Age"
and "Gender". In turn each of these categories, would consist of
several category options, such as "Male" and "Female" for the gender
category. Category combinations may consist of one or several
categories.
Category combination
options
Category combination options are dynamically composed of all of the
different combinations of category options which compose a category
combination. As an example, two categories "Gender" and "Age",
might have options such as "Male"/"Female" and "<5 years"/">5
years". The category combination options would then consist of:
(Male/<5 years)
(Male/>5 years)
(Female/<5 years)
(Female/>5 years)
Category option Category options are atomic elements that are grouped into
categories.
Comma separated values Comma separated values are series of tabular data stored in a plain-
text format. They are commonly used with DHIS2 to export and import
data values.
D
Data dictionary A collection of data elements and indicators, which can be exchanged
with other DHIS2 systems. Typically used to define a set of data
elements and indicators when setting up the DHIS2 system.
Data exchange format In the context of DHIS2, the "data exchange format" refers to a
XML schema that enables the transportation of data and meta-data
between disconnected DHIS2 instances, as well as between different
applications that support the DXF schema.
Datamart A set of database tables in DHIS2 that contains processed data
elements and indicator values that is generated based on aggregation
rules and calculated data element and indicator formulae. Datamart
tables are used for analysis and report production. Typically, users
should not work directly with unaggregated data values, but rather
with values that have resulted from a datamart export for analysis.
Data element A data element is the fundamental building block of DHIS2. It is an
atomic unit of data with well-defined meaning. Essentially it is a data
value that has been actually observed or recorded which is further
DHIS2 Glossary
515
characterized by a number of dimensions. As an example the data
element "Number of fully immunized children" would refer to the
number of children that received this particular service. Data elements
are always linked to a period as well as an organizational unit. They
optionally may be linked to other dimensions.
Data element group Data element groups are used to categorize multiple data elements
according to a common theme, such as "Immunization" or "ART".
Typically, they are used during reporting and analysis to allow related
data elements to be analyzed together.
Data element group sets Data element groups are used to categorize multiple data element
groups into a common theme.
Dimension A dimension is used to categorize data elements during analysis.
Dimensions provide a mechanism to group and filter data based
on common characteristics. Typically, related data elements may be
aggregated or filtered during analysis with the use of dimensions.
Dimensions may be a member of a hierarchy. For instance the "Period"
dimension may be broken down into "Day->Month->Quarter->Year".
DXF See Data exchange format.
H
Health management
information system
Typically, an electronic database system that is used to record
aggregated data on service delivery, disease incidence, human
resource data and other information used to evaluate the performance
of delivery of health services. Typically, an HMIS does not contain the
highly detailed data of electronic medical record systems or individual
patient data.
I
Indicator The divisor of an indicator. Can be composed of multiple data elements
with the use of an indicator formula.
(1)
This is obviously a very generalized example. The numerator and
indicator themselves can be composed of various data elements,
factors, and the four basic operands (addition, multiplication, division
and subtraction).
N
Numerator The dividend of a indicator. Can be composed of multiple data
elements and factors with the use of indicator formulas.
O
Organisational unit An organisational unit is usually a geographical unit, which exists
within a hierarchy. As an example, in the United States, "Georgia"
DHIS2 Glossary
516
would be considered an organisational unit with in the orgunit
level of "State". Organizational units can also be used to specify
an administrative unit, such as a ward within a hospital. The
organisational unit dimension specifies essentially "where" a particular
data value occurs.
Organisational unit level Refers to a level within an organizational hierarchy. Typically, countries
are administered at different levels, such as 1) Country 2) States 3)
Counties 4) Health facilities. In the context of DHIS2, health facilities
typically are the lowest orgunit level. Data is aggregated upwards from
the lowest orgunit level to the highest.
P
Period A period is a specific time interval which consists of a start date and
end date. For instance "January 2011" would refer to the time interval
of January 1st 2011-January 31st 2011.
U
Unique identifier A unique identifier (UID) is a semi-random series of letters and
numbers used by DHIS2 to identify specific resources. UIDs begin with
a letter, and are followed by exactly 10 letters or digits.
Bibliography
517
Bibliography
[AlSaid2010] Said Salah Eldin Al Said. The health information system in Sudan. The University of
Oslo. 2010. http://urn.nb.no/URN:NBN:no-27062.
[Berg2007] Eivind Anders Berg. The challenges of implementing a health information system in
Vietnam. The University of Oslo. 2007. http://urn.nb.no/URN:NBN:no-15021.
[BraaHedeberg2002] Jørn Braa and Calle Hedberg. “The Struggle for District-Based Health
Information Systems in South Africa”. Information Society. 18. 113-127. 2002. http://
search.ebscohost.com/login.aspx?direct=true&db=aph&AN=6705438&site=ehost-live.
[BraaNetworksAction2004] Eric; Braa Jørn; Monteiro and Sundeep Sahay. “Networks of Action:
Sustainable Health Information Systems Across Developing Countries”. MIS Quarterly. 28.
3. 2004. http://aisel.aisnet.org/misq/vol28/iss3/3/.
[Brucker2007] Øyvind F Brucker. Internationalization and localization - A case study from HISP. The
University of Oslo. 2007. http://urn.nb.no/URN:NBN:no-15774.
[Damitew2005] Hirut Gebrekidan Damitew and Netsanet Haile Gebreyesus. Sustainability and
optimal use of Health Information Systems. The University of Oslo. 2005. http://urn.nb.no/
URN:NBN:no-11506.
[Jacucci06exploringtensions] Ved Anfinsen Edoardo Jacucci Cover Inger S. “EXPLORING TENSIONS
IN INFORMATION SYSTEMS STANDARDIZATION Two Case Studies from Healthcare in Norway
and South Africa”. 2006. http://folk.uio.no/edoardo/MatNatAvh_Jacucci_rettet.pdf.
[Gjendem2008] Anders Gjendem. Recruitment, training, communication and Open Source. The
University of Oslo. 2008. http://urn.nb.no/URN:NBN:no-19821.
[Gjerull2006] Nils Fredrik Gjerull. Open Source Software Development in Developing Countries. The
University of Oslo. 2006. http://urn.nb.no/URN:NBN:no-13117.
[Heldre2006] Thor Helge Heldre. Study of a Health Information System pilot project in Tanzania.
The University of Oslo. 2006. http://urn.nb.no/URN:NBN:no-12362.
[Jacobsen2006] Petter Jacobsen. Design and development of a global reporting solution for DHIS.
The University of Oslo. 2006. http://urn.nb.no/URN:NBN:no-12659.
[BraaStandards2007] Arthur Heywood Woishet Mohammed Vincent Shaw Jørn Braa Ole Hanseth.
“DEVELOPING HEALTH INFORMATION SYSTEMS IN DEVELOPING COUNTRIES: THE FLEXIBLE
STANDARDS STRATEGY”. MIS Q. 31. 1. 2007. http://heim.ifi.uio.no/~vshaw/Files/Published
%20Papers%20included%20in%20Kappa/4_Braa_Flexible%20standards.pdf.
[BraaSahayPowerToUsers] Sundeep Sahay Jørn Braa. “Integrated Health Information Architecture -
Power to the Users”. Matrix Publishers. 384. 2012.
[Lewis2005] John Lewis. Design and development of spatial GIS application for primary healthcare
sector. The University of Oslo. 2005. http://urn.nb.no/URN:NBN:no-11504.
[Mangset2005] Lars Mangset. DHIS-2 - A Globally Distributed Development Process. The University
of Oslo. 2005. http://urn.nb.no/URN:NBN:no-10640.
[Ngoma2007] Caroline Ngoma. Cultivation Strategies in the Implementation of Health Management
Information System in Zanzibar. The University of Oslo. 2007. http://urn.nb.no/
URN:NBN:no-16911.
[Nguyen2007] Thanh Ngoc Nguyen. OSS For Health Care in Developing Countries. The University
of Oslo. 2007. http://urn.nb.no/URN:NBN:no-17859.
Bibliography
518
[Saeb2009] E.K. Golly-Kobrissa R.T. Titlestad O. Braa J. Saeb J. Kossi. “Integrating health information
systems in Sierra Leone”. 379 - 391. 2009.
[ShawComplexityInspried2009] Vincent Shaw. “A complexity inspired approach
to co-evolutionary hospital management information systems development”.
2009. http://folk.uio.no/vshaw/Files/VShaw%20Kappa%20Final%20Version/2_V_Shaw
%20Intro%20Chapter_no%20annex.pdf.
[Staring_Titlestad_2008] Knut Staring and O H Titlestad. “Development as a Free Software:
Extending Commons Based Peer Production to the South”. ICIS 2008 Proceedings. 50. 2008.
http://aisel.aisnet.org/icis2008/50.
[Store2007] Margrethe Store. Explore the challenges of providing documentation in open source
projects. The University of Oslo. 2007. http://urn.nb.no/URN:NBN:no-15782.
[Storset2010] Leif Arne Storset. Integration of Health Management Information Systems. The
University of Oslo. 2010. http://urn.nb.no/URN:NBN:no-25666.
[ShawScaling2007] Jorn Braa Vincent Shaw Shegaw Anagaw Mengiste. “Scaling
of Health Information Systems in Nigeria and Ethiopia- Considering the
Options”. 2007. http://heim.ifi.uio.no/~vshaw/Files/Published%20Papers%20included%20in
%20Kappa/6_Shaw_IFP9.4%20Scaling%20of%20HIS_Considering%20the%20Options.pdf.
[Vo2009] Kim Anh Thi Vo. Challenges of Health Information Systems Programs in Developing
Countries: SUCCESS and FAILURE. The University of Oslo. 2009. http://urn.nb.no/
URN:NBN:no-23652.
[Overland2010] Jan Henrik Øverland. An Open Source Approach to Improving GIS Implementations
in Developing Countries. The University of Oslo. 2010. http://urn.nb.no/URN:NBN:no-24751.
[Overland2006] Lars Helge Øverland. Global Software Development and Local Capacity Building.
University of Oslo. 2006. http://urn.nb.no/URN:NBN:no-13609.
Index
519
Index

Navigation menu