Adding category combination to an existing dataset

Hi all,

I have an existing dataset and I have a need to add a category combination to the dataset itself, allowing us to track data coming in from multiple implementing partners.

I can add this cat combo to the dataset easily enough, but I need to assign the data that is already present in the dataset to one of the options within the cat combo.

I am guessing this isn’t a default function within DHIS2 and will need to be done within the database itself.

So, with that in mind, I assume I need to identify the dataelementids that I need to update, and then insert the correct categoryoptioncomboid into the attributeoptioncomboid column in the datavalues table. Rebuild the analytics tables afterwards.

Is this the right way to go about this, is there an easier method?

Hi @HaydnJ ,
Yes, it is not an out of the box function. The easiest and fastest way would be to do this in the datavalue table by updating the attributeoptioncombo column in that table with the appropriate value for the data which needs to be updated (similar to your example).

This obviously should be done in a development environment first and tested thoroughly.

Best regards,
Jason

2 Likes