The Smart Way to Set Up DHIS2 Categories | DHIS2 Metadata Series

Following the pervious series on Stop Creating Option Sets One by One | DHIS2 Metadata Series, when working with categories in DHIS2, we often need to break data down into groups like age or sex.

For example, you might define:

  • Sex: Male :male:, Female :female:
  • Age groups :man_curly_hair: :woman_curly_hair: :man_beard: :person: :old_man: :old_woman:: 17–20, 21–24, 25–28 … all the way up to 80+

While this structure is useful for analysis, creating all these category options manually can quickly become repetitive and time-consuming, especially when dealing with many age ranges.

In this short video, I demonstrate how you can create category options efficiently using CSV import, instead of adding them one by one.

:youtube_play: YouTube Short :backhand_index_pointing_down:

To make this even easier, I’ve also created a small GitHub repository with ready-to-use blank CSV templates that already follow the correct structure and naming conventions.

The idea is to remove the guesswork, so you can focus on filling in your data rather than figuring out the format.

:github: GitHub Repository :backhand_index_pointing_down:

I’d be interested to hear how others are currently handling bulk creation of metadata like this, especially for larger configurations.

3 Likes

This is so great, @Mayamiko ! Thanks for sharing with us.

1 Like

Thank you for your contributions @Mayamiko ! Nice topic to touch on, I remember it was a blurry one for me when I first started so I’m pretty sure many will find it quite helpful. :grin:

1 Like

The pleasure is all mine :folded_hands:

1 Like

It is always great to contribute and help in areas that can easily be overlooked or not fully understood :innocent:. Yeah I share a similar experience and found it a bit difficult to understand categories and category options.

1 Like