Import Metadata (Data Elements) - LogicalOutcomes/DHIS2-FAQ GitHub Wiki

Task:

  • Structure and customize a CSV document for the mass import of Data Elements into DHIS2.

Notes:

  • While it is possible to create many Data Elements manually, one at a time, it is much more expedient to fill out a Data Element configuration sheet on a CSV document, and create many Data Elements through a single import. One limitation of this method is that only Category Options can be mass imported. Categories and Category Combinations must be manually created in DHIS2. Plan ahead when doing a mass import. Category Combinations must be created in the system BEFORE importing Data Elements, in order to fill out the Category Combination UIDs in the config sheet.

  • Data Elements require pre-created Category Combinations

  • Click Here to see a walkthrough video from the Online Curriculum that is related to this task.

Instructions:

Step 1: Use the Data Element Configuration Sheet and fill in all your Data Elements, to be able to mass import into DHIS2  

Step 2: Find unused UIDs. Visit the 'Import - How to get a UID number' page for instructions.

 

Step 3: Export the completed Config sheet as a CSV file

 

Step 4: Import into DHIS2

a. Go to the 'Import / Export' app

b. Click 'Metadata Import'

  c. You will see this box;

d. Choose your Data Elements config file

e. Select the following form the drop down menus:

i. Format: CSV

ii. Object Type: Data Element(s)?

iii. Dry Run: Yes

iv. Strategy: New and Updates

f. Click 'Import' 

After a dry run, check the 'Import Summary' link - if everything has worked, repeat step 4, selecting 'No' from the 'Dry run' dropdown and click 'Import'. >  

Note:

**All UIDs given in the example tables below exist in dev.logicaloutcomes.net 

EXAMPLE: Category Option Worksheet

Name UID Code
Female FFA9e1yIXCT
Male MP15bHaQh2x

EXAMPLE: Category Combination Worksheet

Category Combination UID
Gender VkQPxB6VdoG
After school activity S0FFyqALYgD
 

EXAMPLE: Data Element Worksheet

Name UID Code Short name Description Form name Domain type Value type Aggregation operator Category combination UID Url Zero is significant Option set Comment option set
Monthly - Pupils receiving school meals WdOdsgKOIRj Pupils receiving meals Number of school-aged children receiving school meals (lunch) as a result of USDA assistance How many pupils received school meals? Aggregate INTEGER_ZERO_OR_POSITIVE SUM VkQPxB6VdoG TRUE
Monthly - After-school literacy activities held mhIUKjWMPbt After-school activities Number of schools organizing after-school literacy activities as a result of USDA assistance How many after-school literacy activities were held? Aggregate INTEGER_ZERO_OR_POSITIVE SUM S0FFyqALYgD TRUE
Monthly - Teachers employed d2IYCbKofFd Teachers employed Number of teachers employed How many teachers does this school have? Aggregate INTEGER_ZERO_OR_POSITIVE SUM TRUE