I am planning to have an organization hierarchy structure like below.
My question is can I aggregate data long the following organisation unit hierarchy:
Country → State → LGA → Location
Country → State → LGA → Ward → Facility
Country → State → LGA → Ward → Community
If possible, is there a documentation I can look at for guidance?
Country
.
.
State
.
.
LGA
.
............................................
. .
. .
Ward Location
.
..............................
. .
Facility Community
But in reality, the levels need to be in order as we can’t have two at the same level as you can see here when retrieving level and offlineLevels from the API:
If it could be (Country - State - LGA) and then whatever comes after LGA will depend on the OU code or another thing to distinguish it from (Location, Ward, Facility, or Community) then it might work better. From my perspective I haven’t seen parallel OU levels.
Thanks for the reply, based on my picture, Location will be level 4 not 3 same with Ward.
What is the use case of the offlineLevels in the organisationUnitLevels api? Because in my case Ward and Location will have the same offlineLevel 4 while Facility and Community have the same offlineLevel 5.
I don’t understand this suggestion especially the part ’ or another thing to distinguish it from (Location, Ward, Facility, or Community)'.
I tried to import into the organisationUnitLevels API and it’s throwing an error suggesting that the level field is unique. In order word, I cant set level 4 for both Ward and Location as well as level 5 for both Community and Facility.
I am thinking as alternative to set it as below with Entity as level 5. Entity in this instance can be Community, Facility, Location or other defined entity. All these OU still fall under Ward except that Location data may not need to be aggregated at Ward level. Under Ward, I can now use organizationUnitGroup and organisationUnitGroupSet to disaggregate the Entities. Can it work like this?
Also lets say we define OUG for facilities, does it matter if we do not assign some Entities like the communities to this facility OUG?
Hi @jetisco4u
The key concept with the organisation unit hierarchy dimension is that it should represent a geographical hierarchy. When you start trying to mix administrative hierarchies inside, problems arise. I think your last suggestion, to use a shared level for facilities/communities makes a lot of sense. Using orgunit group sets, you can then determine which type of “entity” is a facility or community organisation unit.
Its very important that all organisation units at level 5 (Entity) be a member of exactly one organisation unit group within the group set for Facility/Community. Organisation unit group sets should generally be compulsory (all organisation units should belong to the group set) and exclusive (organisation unit should only belong to one group within a group set).
Thanks for the clarification. I intend to have all OU defined by the Entity. But there will be different OUGS and different OUG that each entity is assigned to.
So I think you only need one orgunit group set called “Type” or something like that, and then orgunit groups like “Facility”, “Community”, etc. I do not see why you would need multiple orgunit group sets for this particular case. There could of course be other group sets like “Ownership” or “Urban/Rural” but for the use case which you have described here, I think only one group set is required to achieve the desired aggregation which you describe in your initial post.