Bulk Import Program Indicators

Hi team,

I got some 500 program indicators to be created. It looks like impossible to create them manually.
Is there a sure way to bulk import these program indicators? I’d appreciate it if someone could share a working procedure to achieve this.

Thanks

Hi @Quoda

Please share the use case because there might be a way to avoid creating all those program indicators. You might find this resource helpful, read here

Hi @Gassim

Thanks for the quick response.

I’ll like to clarify that I am not creating these program indicators for a single program but rather these indicators are of 5 different programs. As far as I know my use case does not necessitate tracker and aggregate data integration. What I can see is that there seems to be an indicator for almost every variable/dimention on the data collection tool. Hence, the reason we have so many indicators.

I followed the discussion here about how to import program indicators in bulk but processes seem confusing.

I want to be clear if:

  1. Program Indicators can be imported by CSV through the import/export app since I have not found a direct method in the docs on how to do a csv metadata import for program indicators.
  2. How can import of program indicators with period boundaries be done through the API?

I would greatly appreciate any insights or import templates you may have regarding this matter.

Thanks

I’ve only ever created Program Indicators (PIs)in bulk using json. When I did this, my personal method was making one of the PIs manually, pulling it through the API, and putting it into excel. I’d then extrapolate the UID, expression, filter, etc. of all of the things that I would be needing to change, and create columns for how I needed to change them. then I could do a nested substitute(substitute( in excel and get “new” json blocks, which I could then put into a json and import into DHIS2.

I’m not saying its the way to do it, but its the way I’ve done it in the past! Can go into more detail if that would be useful.

@Matthew_Boddie Thank you for sharing this with me. I am would want to go with your method.
I will be glad if you could at least share images/screeshot/sample file to make it clearer.

This part confuses me a bit. If you could give a sample file or screenshot how it works.

I could do a nested substitute(substitute( in excel

Thank you.

1 Like

Hi @Quoda alright, see how this looks! Excel is a pull of a single PI from Play version 40. I put that json into excel, and then pulled out specific parts of it (Name, shortName, UID, expression) and then created columns for new versions of those parts. Finally, the last column on the right subs each new part whenever it finds the old part. I then pasted the output into sublime text and saved as a json.
Example Sub for Excel for 19 new PIs in 40 Play.xlsx (14.2 KB)
19 Cloned PIs for 40.json (40.3 KB)

2 Likes

@Matthew_Boddie Thanks for taking time to put this together. I’ll let you know if this worked for me. Thanks

2 Likes