Facilities divide into categories and is there any way to show number of childe OU in parents

I have question regarding facility divided as category wise so if we generate report according to category wise it will be easier or any other way to achieve this and other question is , is there any way to show number of childe OU within particular parent (tree) as i have attach a picture as category wise facility.

Hi @beastmarket,

Thank you for your post and welcome to the community! :tada:

For me and maybe other community members, it might not be very clear what you’re trying to achieve. It’d be helpful if you mention step by step example from a dhis2 instance.

Also, is the picture actually implemented in a dhis2 instance? Thanks!

Here’s my response to the direct question:

It’s not clear where and how you want to view the children (descendants) of an OU but there’s a simple way using API
For example, if you send a request such as
your_instance_URL/api/organisationUnits/OU?fields=children you’ll see the list of all children for that organisation unit (where OU is the organisation unit’s ID).

There are also more request options such as using the parameters ouMode= [DESCENDANTS: meaning all sub units in the hierarchy, CHILDREN: refers to immediate children in the hierarchy; SELECTED refers to the selected organisation units only.] as well as another parameter level= 1 is the root as examples, but you can read more about this in the using-api manual: DHIS2 - using the api - metadata - organisation units