Bulk importing mappings for PDAC
The page describes how to bulk import mappings for the PDAC app using the datastore, making large numbers of mappings and CO filters available in the app without configuring them through the user interface.
When is this needed?
When the number of mappings is very large, just like with DHIS2 metadata in general, it becomes more time efficient to import the configuration via a different method than manually creating through the user interface. For example if you have over 10 mappings to setup or over 100 category filters to create.
Background information (optional read)
To make sure that the mappings are saved after you close and re-open the app, after a mapping is setup (a row in the main table in the application) this is saved to the data store, as well as any category option filters defined as part of the mapping. This means it’s possible to modify the data store to affect the mappings the app will load when it starts up
Steps
1 Get a copy of the template here
When asked if you would like to make a copy, click ‘Make a copy’
If you want to only setup category option filters you only need to fill out the category-option-filters tab.
2 Copy the value in the ‘Datastore update’ column (row 2)
There is no need to fill the formula down, as everything you need is in row 2 of this column
3 Open the Datastore manager app in DHIS2
4 On the left hand side select: event-aggregate-mapper > metadata
You should see something similar to the numbers after the coMaps and dePiMaps may be different though
5 In the menu which currently says ‘Tree’, swap the view to ‘Code’
6 Paste what was copied in the Datastore update column into the relevant key
Category option filter updates should go in coMaps
and data element program indicator mappings in the dePiMaps
. See the video below for a demonstration:
Remember to add a comma after any existing mappings as shown in the video