← Back to the hackathon home
Topic 7 of 18

DHIS2 Data Entry Form Design

Step by step guide to shaping the data entry form with sections and data set settings, without writing any code.

How to use this guide: Complete Topics 1 to 3 first, so the data set and its data elements exist. This guide shapes the form with what DHIS2 gives you, with no code anywhere.
Step 1: Choose the Form Type

DHIS2 gives a data set three ways of showing itself in data entry. Start with the simplest one that does the job.

Form typeWhat it looks likeWhen to use it
DefaultOne long list of every data elementVery short data sets, or while testing
SectionGrouped tables with headings, built by DHIS2Almost every routine monthly form, including this one
CustomA page you design yourself in HTMLOnly when the section form cannot express the layout
This guide uses the Section form, which needs no code at all and is what almost every routine form should use.
Step 2: Check the Data Set Settings That Shape the Form

Open the data set for editing. A few settings change how the form is drawn, before you touch the sections.

Click: Maintenance app → DATA SET tab → row menu → Edit
The data set edit form with the options that change the layout of the form
Figure 1. The layout settings of the data set. This picture was drawn for the guide to show what the screen looks like. Your screen will show your own names and dates.
  1. 1Period type. Monthly, so the form opens one month at a time.
  2. 2Render sections as tabs. Off gives one long page. On gives a tab per section, which suits long forms.
  3. 3Render horizontally. Off keeps one data element per row, which is easier to read.
  4. 4Data element decoration. On shows the description of a data element as a small help icon in the form.
  5. 5SAVE. Saves the settings.
Step 3: Build the Sections

Sections are the headings of the form. They were created in Topic 3, and this is where you shape them.

Click: Maintenance app → DATA SET tab → row menu → Manage sections → blue plus button
The Add section window with the name and code filled in
Figure 2. The Add section window. The data element names in this picture were changed to the ten you created, so the guide stays consistent.
  1. 1Name. The heading users read, such as Malaria Testing. Keep it short.
  2. 2Code. Optional, useful when other systems refer to the section.
  3. 3Description. Optional. It appears under the heading in some versions.
  4. 4Category combo filter. Leave it as No filter unless the section should show only one breakdown.
  5. 5Search. Shortens the list of data elements below.
  6. 6Data elements. The fields of this section, in the order you move them across.
Step 4: Turn On Totals Where They Help

The same window carries three display options. They cost nothing and save the user arithmetic.

OptionWhat it doesUse it when
Show row totalsAdds a Total column at the end of each rowA field is split by sex or age and the total matters
Show column totalsAdds a Total row under the sectionThe section counts the same thing in several rows
Disable automatic groupingStops DHIS2 grouping fields by category combinationRarely. Leave it off for this form
The data entry form with a total column and a total row
Figure 3. The same section with row and column totals switched on. This picture was drawn for the guide to show what the screen looks like. Your screen will show your own names and dates.
  1. 1Total column. From Show row totals. Male plus Female for that field.
  2. 2Total row. From Show column totals. The sum of the rows in that section.
  3. 3Typed values. Only the white and green boxes are typed. The grey totals are worked out.
Step 5: Put the Sections in the Right Order

The order of the sections is the order of the form. Follow the register, not the alphabet.

The section list with a row menu offering move up and move down
Figure 4. Reordering the sections. This picture was drawn for the guide to show what the screen looks like. Your screen will show your own names and dates.
  1. 1The sections. Shown in the order they appear in the form.
  2. 2Row menu. The three dots of a section.
  3. 3Move up. Moves the section one place earlier.
  4. 4Move down. Moves it one place later. Repeat until the order matches the register.
Step 6: Order the Fields Inside a Section

Inside a section, the fields follow the order of the right hand list. Move one at a time, and use the arrows to fix the order.

The data elements picker of a section, with the up and down arrows
Figure 5. The order of the fields in the section. The data element names in this picture were changed to the ten you created, so the guide stays consistent.
  1. 1Available fields. Everything in the data set that is not in this section.
  2. 2Arrow buttons. Move one field at a time, so the order stays under your control.
  3. 3Selected fields. The section, in form order.
  4. 4Up and down. Move the highlighted field to fix the order.
  5. 5SAVE. Saves the section.
Step 7: Give a Field a Short Label

Long data element names make a form hard to read. The Form name of a data element is what the form shows, and it can be much shorter than the full name.

Click: Maintenance app → DATA ELEMENT tab → open the data element → Form name
The data element form, with the name and the form name field
Figure 6. Name and form name of a data element.
  1. 1Name. The full, unique name used everywhere in DHIS2.
  2. 2Form name. What the data entry form shows. For example Suspected cases instead of Malaria Suspected Cases JT.
Rule of thumb: keep the full name precise, and the form name short.
Step 8: Decide Between One Page and Tabs

A long form is easier to work through as tabs. The setting is on the data set, from Step 2.

The form with one tab per section
Figure 7. The same form with sections as tabs. This picture was drawn for the guide to show what the screen looks like. Your screen will show your own names and dates.
  1. 1The open tab. One section at a time, with an orange underline.
  2. 2The other sections. One click away, so the page stays short.
  3. 3The fields. Exactly the same fields as the long page.
Rule of thumb: one page up to about four short sections, tabs beyond that.
Step 9: Open the Form in Data Entry

Open the Data Entry app, choose the facility, the data set and the month, and read the form as a user would.

The section form in the data entry app
Figure 8. The finished section form. This picture was drawn for the guide to show what the screen looks like. Your screen will show your own names and dates.
  1. 1Section heading. Grey bar with the section name.
  2. 2Male and Female. The columns come from the category combination, not from the form design.
  3. 3A saved value. A box turns green as soon as DHIS2 stores the number.
Expected result: A clear grouped form, with no code written anywhere.
The whole section form with its four sections and the buttons at the bottom
Figure 9. The whole form on one page. This picture was drawn for the guide to show what the screen looks like. Your screen will show your own names and dates.
  1. 1First section. The order of the sections is the order you set in Step 5.
  2. 2Later sections. Each one keeps its own heading and its own columns.
  3. 3RUN VALIDATION. Checks the values against the rules from Topic 3.
  4. 4COMPLETE. Marks the report finished for this facility and month.
Step 10: Check the Form, Then Decide

Go through the list below with someone who will use the form.

  • Sections follow the order of the register.
  • Field labels are short and unambiguous.
  • Totals appear only where they help.
  • The form fits a small laptop screen without sideways scrolling.
  • Compulsory fields are the ones the programme really insists on.
Then hand it over: when the list above is clear, the form is ready for the people who will use it every month.