10.2. Manage data elements

10.2.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 10.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


10.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.

10.2.3. Create 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 10.3. Value types

    Value type

    Description

    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.

    Date & time

    E-mail

    Email.

    File

    A file resource where you can store external files, for example documents and photos.

    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.

    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 isntances and a search field.

    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 operator field, select the default aggregation operation that will be used on the data element.

    Most data elements should have the Sum option set. 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 10.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. Select a Legend set.

    Legend sets are used in the GIS app to display certain data elements with certain icons.

  17. Set the Aggregation levels to allow the data element to be aggregated at one or more levels:

    1. In the left pane, select the levels you want to assign to the data element.

    2. Click the right arrow to assign the aggregation levels.

    The aggregation levels option allows the data element to be aggregated at one or more 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.

    You set custom attributes in Data administration > Attribute. For more information about how to use attributes, refer to the "Attributes" section.

  19. Select a Main data element group.

    Data element group sets are only applicable if they have been defined. If data element group sets have been defined, they will appear in the Main data element group list. Select each data element group from the list of group sets provided. Groups can be selected based on if the data element is of aggregate or tracker type.

  20. Select Tracker-based data.

  21. Click Save.

10.2.4. Create a data element group

Data element groups lets you classify related data elements into a common theme. For instance, 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:

    1. Name

    2. Short name

    3. Code

  4. Select data elements and assign them.

  5. Click Save.

10.2.5. Create a data element group set

Data element group sets allows you to categorise multiple data element groups into a set. Data element group sets are used during analysis and reporting to combine similar data element groups into a common theme.

  1. Open the Maintenance app and click Data elements > Data element group set.

  2. Click the add button.

  3. Fill in the form:

    1. Name

    2. Code

    3. Description

    4. Compulsory

    5. 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.

10.2.6. Edit data elements and other objects

  1. Open the Maintenance app and click Data elements.

  2. Select the object type you want to edit, for example data element or category.

  3. In the list, find the object you want to modify.

  4. Click the options menu and select Edit.

  5. Modify the options you want.

  6. Click Save.

10.2.7. Clone data elements and other objects

Cloning a data element or other objects can save time when you create many similar objects.

  1. Open the Maintenance app and click Data elements.

  2. Select the object type you want to clone, for example data element or category.

  3. In the list, find the object you want to modify.

  4. Click the options menu and select Clone.

  5. Modify the options you want.

  6. Click Save.

10.2.8. Change sharing settings for data elements and other objects

  1. Open the Maintenance app and click Data elements.

  2. Select an object type, for example data element or category.

  3. In the list, find the object you want to modify.

  4. Click the options menu and select Share.

  5. (Optional) Search for a user group and select it. The user group is added to the list.

  6. Change the settings for the user groups you want to modify.

    • Can view: Everyone in the user group can view the object

    • Can edit: Everyone in the user group can view and edit the object

    The default setting is that everyone (Public access) can view and edit objects.

  7. Click Close.

10.2.9. Delete data elements and other objects

You can only delete a data element and other objects if no data is attached to the data element itself.

  1. Open the Maintenance app and click Data elements.

  2. Select the object type you want to delete, for example data element or category.

  3. In the list, find the object you want to delete.

  4. Click the options menu and select Delete.

  5. Click OK to confirm.

10.2.10. Display details of data elements and other objects

  1. Open the Maintenance app and click Data elements.

  2. Select the object type you want to display, for example data element or category.

  3. In the list, find the object you want to view.

  4. To display all meta data about the selected object, click the options menu and select Show details.

10.2.11. Translate data elements and other objects

DHIS2 provides functionality for translations of database content like data elements, data element groups, indicators, indicator groups, validation rules and more. You can translate these elements to any number of locales. A locale represents a specific geographical, political, or cultural region.

[Tip]Tip

To activate a translation, go to Apps > Settings > Appearance and select a language.

  1. Open the Maintenance app and click Data elements.

  2. Select the object type you want to translate, for example data element or category.

  3. In the list, find the object you want to translate.

  4. Click the options menu and select Translate.

  5. Select a locale.

  6. Enter the required information.

  7. Click Close.