Honestly, any category combination with 2 million COCs is either going to crash the server or the browser. While it may be theoretically possible to support such a CC, we have implemented (based on experience) some reasonable default limits of around 50k total COCs in recent versions of DHIS2. This can be configured to allow you to increase the number, but over the years, we have seen that extremely large CC/COCs lead to many performance problems, and usually result in very sparse data.
I have no idea really about the nature of your implementation, but here is an example. Letâs suppose we have a data element called âInpatient casesâ with the following category combination:
ICD10: Roughly 14k codes
Age: Lets say five year age bands (0-100) which is about 20 age bands
Gender: Male/Female (2)
Location: Urban/Rural
This seems fairly simple, but such a category combo would produce some 1,120,000 category option combos. You do not expect (at least on an aggregate basis) to have non-zero numbers in every single one of these COCs each month, thus your data becomes very âsparseâ with many COCs never being used. DHIS2 does not dynamically create COCs based on whether they are actually needed, but creates them all (via the Cartesian product of all of the category options) upfront.
When loading this enormous about of COCs into your browser, you then need to combine this with periods and organisation units perhaps, and the browser simply runs out of memory. If you need to analyze data sets of this magnitude, then a browser is just not the tool.
As I mentioned before, I think that having that many COCs in any category combination is simply unreasonable, and points to a modelling flaw if your design. Perhaps you could consider to use different data elements to decrease the cardinality of your COCs. What I mean by this is that I think you should strive to remove one of the dimensions (perhaps the one with the largest
In the example I give above, you could create 14k data elements (one data element for each ICD10 code)
and then use this category combination
Age: Five year age bands (0-100) which is about 20 age bands
Gender: Male/Female (2)
Location: Urban/Rural (2)
We now have a category combo with only three dimensions and a total of 80 COCs, which seems totally reasonable.
Over the years, we have seen the category model often âabusedâ, and usually one of the categories should be replaced with some other metadata element, either an attribute option combo (Urban/Rural is a good candidate in this example) or a data element.
Good luck and best regards,
Jason