18.3. Manage data elements

18.3.1. About data elements
18.3.2. Workflow
18.3.3. Create or edit a data element
18.3.4. Create or edit a data element group
18.3.5. Create or edit a data element group set
18.3.6. Clone metadata objects
18.3.7. Change sharing settings for metadata objects
18.3.8. Delete metadata objects
18.3.9. Display details of metadata objects
18.3.10. Translate metadata objects

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


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

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

    Date & time

    -

    Email

    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 instances 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 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 18.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.

  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.

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

18.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:

    1. Name

    2. Short name

    3. Code

  4. Select data elements and assign them.

  5. Click Save.

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

  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.

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

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

[Note]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 options 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 group is added to the list.

  4. Change sharing settings for the users and 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.

    • No access: The public won't have access to the object. This setting is only applicable to Public access.

  5. Click Close.

18.3.8. Delete metadata objects

[Note]Note

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

[Warning]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.

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

18.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]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]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.