9.6. Manage program metadata

9.6.1. About program metadata
9.6.2. Create or edit a tracked entity attribute
9.6.3. Create or edit a relationship type
9.6.4. Create or edit a tracked entity
9.6.5. Clone metadata objects
9.6.6. Delete metadata objects
9.6.7. Change sharing settings for metadata objects
9.6.8. Display details of metadata objects
9.6.9. Translate metadata objects

9.6.1. About program metadata

[Note]Note

The functions you have access to depend on your user role's access permissions.

Table 9.11. Program metadata objects in the Maintenance app

Object type

Available functions

Tracked entity

Create, edit, clone, delete, show details and translate

Tracked entity attribute

Create, edit, clone, share, delete, show details and translate

Relationship type

Create, edit, clone, delete, show details and translate


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

  7. Select an Option set.

  8. In the Value type field, select the type of data that the tracked entity attribute will record.

    Table 9.12. 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.

    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

    -

    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 9.13. 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. Enter an amount of numbers into this field equal to the ciphers you want in the generated value. A pattern of 0000 would result in a generated value above 1000 and below 9999. The number of ciphers should at least allow 20 % more values than you expect is needed for keeping the ID unique.

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

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

9.6.4. Create or edit a tracked entity

  1. Open the Maintenance app and click Program > Tracked entity.

  2. Click the add button.

  3. Type a Name of the tracked entity.

  4. (Optional) Enter a Description of the tracked entity.

  5. (Optional) Enter an Alternative name of the tracked entity.

  6. Click Save.

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

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

9.6.7. Change sharing settings for metadata objects

You can assign different rights to the for example a data set based on user groups and user roles.

  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) Search for a user group and select it. The user group is added to the list.

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

  5. Click Close.

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

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