Import Metadata (OrgUnits) - LogicalOutcomes/DHIS2-FAQ GitHub Wiki
Task:
- Prepare a CSV file for mass import of OrgUnits into DHIS2.
Notes:
-
Indicators cannot be imported and must be manually entered into DHIS2.
-
Creating and uploading a config sheet saves time when creating many objects in the system (like OrgUnits or Data Elements). To prepare the config sheet, you must first create the top level OrgUnit in the system. You must do this to get the Unique Identification (UID) for your root OrgUnit, from which to relate all other OrgUnits. Then you must find unused UIDs to assign to all lower levels of the organizational hierarchy.
-
Click Here to see a walkthrough video from the Online Curriculum that is related to this task.
Instructions:
In the Excel document provided, fill in all your OrgUnits, to be able to mass import into DHIS2. The OrgUnit Configuration Sheet can be found here:TemplateOrgUnit
If you have not downloaded the DHIS2 Curriculum Workbook yet, you can download it here.
Step 1: Create the root (Top Level), or parent OrgUnit. Visit the OrgUnitsCreate page for instructions on how to do that.
Step 2: Prepare the Config sheet
a. Follow the format shown in the example below:
NOTE: To find unused UIDs, please refer to previous FAQ called "How to get a UID number".
Sample OrgUnit Configuration Sheet
Notes:
**All UIDs given in the example tables exist in dev.logicaloutcomes.net
Example #1:
Example #2:
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 OrgUnit config file
e. Select the following form the drop down menus:
i. Format: CSV
ii. Object Type: Organisation Unit
iii. Dry Run: Yes
iv. Strategy: New and Updates
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'.