← Back to the hackathon home
Topic 4 of 18

DHIS2 Data Elements

Step by Step Guide: Logging In and Creating the Data Elements for an Aggregate Form

Purpose of this guide

This guide covers the first part of building an aggregate form in DHIS2: logging in to the demo and creating the data elements. Follow each step in order. The numbered screenshots show what your screen should look like at each point.

Step 1: The DHIS2 Interface and Login

For this hackathon we all work on the public DHIS2 demo for Sierra Leone. It runs DHIS2 version 2.40 and anyone can log in, so every participant starts from the same system with the same data.

Get to know the login screen

Before you log in, look at what the screen shows. The numbers on the picture match the list below it.

The DHIS2 demo login screen for Sierra Leone, with empty Username and Password boxes
Screenshot 1. The login screen as it first opens, with the cursor waiting in the Username box.
  1. 1Address bar. The web address of the DHIS2 instance. Check it every time, because it tells you which system you are working in.
  2. 2Instance name. The flag and the title confirm that this is the Sierra Leone demo.
  3. 3Username. The name of the account you log in with.
  4. 4Password. The characters you type appear as dots, so nobody can read them over your shoulder.
  5. 5Log in button. Sends your username and password to DHIS2.
  6. 6Demo note. Gives the login for the demo and explains that the system is reset every night.
  7. 7Language. Changes the language of the interface before you log in.

Log in

Click in the Username box and type the username. Then click in the Password box, type the password and click Log in.

Usernameadmin
Passworddistrict
The DHIS2 login screen with admin typed as the username and the password hidden as dots
Screenshot 2. The username admin is typed in box 3 and the password shows as dots in box 4. Click the Log in button, number 5.
Action: Type admin in Username → type district in Password → click Log in

What to check

  • The address bar shows play.im.dhis2.org/dev-2-40.
  • The title at the top reads DHIS 2 Demo, Sierra Leone.
  • After you log in, the apps menu gives you access to the Maintenance app, which we use from Step 2 onwards.
Expected result: The DHIS2 home page opens, with the header bar and the apps menu at the top.
Remember: the demo is reset every night, so anything you create today is gone tomorrow. Finish each exercise in one session and take your screenshots as you go. If the login fails, check that the username and password are in lower case.
Step 2: Open the Maintenance App and Find Data Elements

All the building blocks of a form, such as data elements, categories and data sets, are created in the Maintenance app. In this step you open it and go to the Data Element section.

Open the Maintenance app

After logging in you land on the home dashboard. Click the apps menu at the top right, type Maintenance in the search box and click the Maintenance app when it appears.

The DHIS2 home dashboard with the apps menu open and Maintenance typed in the search box
Screenshot 3. The apps menu is open on the home dashboard, and typing Maintenance leaves only the Maintenance app.
  1. 1Home dashboard. The title bar shows DHIS 2 Demo, Sierra Leone, Dashboard, which confirms that the login worked.
  2. 2Apps menu. The square of nine dots opens the list of every app you can use.
  3. 3Search box. Type the name of the app you want, so you do not have to scroll through the whole list.
  4. 4Maintenance app. The orange icon. Click it to open the Maintenance app.
Click: Apps menu → type Maintenance → click Maintenance

Go to the Data Element section

The Maintenance app opens with a row of tabs across the top. Click the DATA ELEMENT tab to see the three things you can manage there.

The Maintenance app with the Data Element tab open, showing the Data element, Data element group and Data element group set cards
Screenshot 4. The DATA ELEMENT tab in the Maintenance app, with its three cards.
  1. 1Address bar. The address now contains dhis-web-maintenance, which tells you that you are in the Maintenance app.
  2. 2DATA ELEMENT tab. The orange line under the name shows which tab is open. The other tabs, such as Category, Data set and Indicator, are used in later steps.
  3. 3Side menu. The same three items as the cards, and a quick way to move between them.
  4. 4Data element card. This is where data elements are created, changed, viewed and deleted.
  5. 5Plus button. Creates a new data element. We use it in Step 3.
  6. 6List button. Opens the list of data elements that already exist.
Click: DATA ELEMENT tab → list button on the Data element card

The Data Elements list

Clicking the list button opens Data element management, the list of every data element already in the system.

The Data element management list in the Maintenance app, showing 1 to 50 of 1227 data elements
Screenshot 5. The Data element management list. The demo already holds 1,227 data elements.
  1. 1Data element. Highlighted in blue in the side menu, because this is the section you are in.
  2. 2Data element management. The title of the list page.
  3. 3Search box. Search by name, code or ID. Always search here before you create a new data element.
  4. 4Filters. Domain type, value type and category combination narrow the list down.
  5. 5Count and pages. 1 to 50 of 1227 means the list is shown 50 at a time. The arrows move between pages.
  6. 6Columns. Name, code, domain type, value type, category combination and the date of the last change.
  7. 7Blue plus button. Creates a new data element. This is where Step 3 starts.

What to do

Open the list first and search for the data element you need, because it may already exist. Create a new one only when it is not there, so the system does not end up with two data elements for the same thing.

Expected result: The list of data elements is displayed, with a search box above it.
Step 3: Create a New Data Element

Click the blue plus button at the bottom right of the Data Elements list. A long form opens. We go through it from top to bottom, using Malaria Suspected Cases as the example. Fields marked with (*) must be filled before DHIS2 will save.

NameMalaria Suspected Cases
Short nameMalaria Suspected
CodeLeave empty
DescriptionNumber of patients seen this month who were suspected of having malaria
Domain typeAggregate
Value typeInteger
Aggregation typeSum
Store zero data valuesTicked
Category combinationNone

Part 1: Name and description

The top of the new data element form with Malaria Suspected Cases as the name and Malaria Suspected as the short name
Screenshot 6. The top of the form, with the name and short name filled in.
  1. 1Data element form. The back arrow returns to the list without saving.
  2. 2Sharing note. A new data element can be viewed and edited by everyone.
  3. 3Name (*). The full name. It must be different from every other data element.
  4. 4Short name (*). A shorter version used in tables and charts. It must also be unique.
  5. 5Code. Optional. Used to link the data element to other systems.
  6. 6Colour and icon. Optional. Leave them for this exercise.
  7. 7Description. Say exactly what should be counted, so every facility reports the same thing.
  8. 8Form name. Optional. A different label to show in the data entry form.

Part 2: How the data is stored

Scroll down to the fields that decide how the numbers are stored and added up.

The middle of the form with Aggregate, Integer and Sum selected, Store zero data values ticked and category combination None
Screenshot 7. Domain type, value type, aggregation type and category combination.
  1. 1Domain type (*). Aggregate, for monthly totals from a facility. Tracker is for records about individual people.
  2. 2Value type (*). Integer, because a count of cases is a whole number.
  3. 3Aggregation type (*). Sum, so values add up across facilities, districts and months.
  4. 4Store zero data values. Tick it. A facility that reports 0 cases is not the same as a facility that did not report.
  5. 5Category combination (*). None, so the number is not broken down. For a breakdown by sex of child, male or female, choose the combination made in Topic 2.
  6. 6Plus and refresh. Plus creates a new combination, and refresh reloads the list after you have made one.
  7. 7Option set. Leave it empty for a number. It is used when the answer is picked from a fixed list.

Part 3: Legends and aggregation levels

Both of these are optional, so leave them empty for this exercise.

The Legends and Aggregation levels boxes, each with an available list on the left and an empty selected list on the right
Screenshot 8. Legends and aggregation levels, both left empty.
  1. 1Legends. Colour ranges used when the data element appears on maps and in tables.
  2. 2Available items. Everything you can choose from. Click an item to select it.
  3. 3Arrow buttons. Move the selected item to the right, or back to the left.
  4. 4Selected items. What you have chosen appears here.
  5. 5Assign all. Moves every item across in one click.
  6. 6Aggregation levels. Left empty, DHIS2 adds the data up at every level, from facility to national.

Part 4: Save

The bottom of the form with optional fields and the Save and Cancel buttons
Screenshot 9. The bottom of the form, with the SAVE button.
  1. 1Classification. This field and the ones under it, such as collection method and rationale, are optional extras on this server.
  2. 2Unit of measure. Optional, for example cases.
  3. 3Main data element groups. Optional. Groups make data elements easier to find in analysis.
  4. 4SAVE. Saves the data element and returns to the list.
  5. 5CANCEL. Closes the form without saving anything.
Click: Blue plus button → fill in the fields → SAVE
Expected result: DHIS2 returns to the Data Elements list, and searching for Malaria Suspected shows the new data element.
Working on a shared demo: everyone in the room uses the same system, and names must be unique. If SAVE does not work, scroll up to look for a message. Either a (*) field is empty, or someone has already used that name. Add your initials to the name and short name, for example Malaria Suspected Cases JT.
Step 4: Create All Required Data Elements

Repeat Step 3 for every data element that will appear in the reporting form. The malaria form in this hackathon needs the ten data elements below. Each one counts a single thing, so each gets its own data element.

Settings that stay the same

These five settings are identical for all ten data elements.

Domain typeAggregate
Value typeInteger
Aggregation typeSum
Store zero data valuesTicked
Category combinationNone

The ten data elements

Only the name, short name and description change. Add your initials to the end of the name and the short name, for example RDT Tested JT, so they do not clash with anyone else on the shared demo.

#NameShort nameDescription
1Malaria Suspected CasesMalaria SuspectedPatients seen this month who were suspected of having malaria
2RDT TestedRDT TestedSuspected cases tested with a malaria rapid diagnostic test
3Microscopy TestedMicroscopy TestedSuspected cases tested by microscopy
4RDT PositiveRDT PositiveRapid diagnostic tests with a positive result
5Microscopy PositiveMicroscopy PositiveMicroscopy tests with a positive result
6ACT TreatmentACT TreatmentConfirmed uncomplicated cases treated with an ACT
7Severe Malaria TreatmentSevere Malaria TreatmentSevere malaria cases given treatment for severe malaria
8Pre-Referral TreatmentPre-Referral TreatmentPatients given a first dose of treatment before being referred
9Malaria DeathsMalaria DeathsDeaths caused by malaria
10Malaria ReferralsMalaria ReferralsMalaria patients referred to a higher level facility
Click: Blue plus button → fill in the fields → SAVE → blue plus button again for the next one

Check your list

When all ten are saved, type your initials in the search box. Only your data elements are listed, so it is easy to see that none is missing.

The Data element management list filtered by JT, showing the ten malaria data elements, each Aggregate, Integer, with category combination None
Screenshot 10. The Data Elements list searched for JT, after all ten data elements are saved. This picture was prepared from Screenshot 5 to show the result you should reach. Your list shows your own initials and the date you created them.
  1. 1Search box. Your initials, here JT, keep only your data elements in the list.
  2. 2Count. 1 to 10 of 10 confirms that all ten were saved.
  3. 3Names. Listed in alphabetical order, so the order differs from the table above.
  4. 4Value type. Integer for every row.
  5. 5Category combo. None for every row.
  6. 6Last updated. The day you created or last changed the data element.
  7. 7Row menu. The three dots open options such as Edit, to correct a mistake.
  8. 8Blue plus button. Creates the next data element.

Important

  • Use one data element for one measurable concept, and do not create a second data element for something that already exists.
  • RDT and microscopy are kept apart so that testing and positivity can be analysed for each method.
  • Do not put a breakdown in the name, such as Malaria Deaths Male. Sex of child is added with a category combination, which we build in Topic 2, Build category combinations.
Expected result: Searching for your initials lists all ten data elements, each with domain type Aggregate, value type Integer and category combination None.
Save time: if a row has a mistake, open its row menu and choose Edit rather than creating it again. A second copy with the same name will not save.

Final Checklist