Default Categories, and category options

Hello team @Gassim ,
I would like to know what the use or importance of the default categories or category options in dhis2.
These categories are automatically created in dhis2 and are attached to programs automatically.

Mohammed

Category/category option/categoryCombo/categoryOptionCombos are used in multiple places
ex

  • in the aggregate model :
    • categorycombo : exploded categories by age/gender,… (think stuff that can be summed in the pivot tables)
    • attributecombo : to which organisation it belongs or declared vs verified or actual vs target values (think stuff you don’t want dhis2 to sum in the analytics)
  • in the event-tracker : each tei/event can belong to a NGO and you don’t want other ngo to see the other ngo’s data

To keep the “system/calculation” coherent the default category is attached to the dhis2 concept (program, dataset,…) that don’t need this kind of things.

As a corollary :

  • you can’t delete it, and
  • should also avoid to rename it
  • or add option to it.

Note that I’ve observed some duplicate “default” category when upgrading some old dhis2.
These kind of troubles can only be fixed via sql.