How to Generate Orgunit report

Hello All,
In the organization unit group, we have segregated the facilities as per their services like referral hospital, district hospital, Primary health center. Now, how can I get the report of the organization list as per their level?
DHIS2 = 2.29
Build = dd8e3fc

Thank you

Hello @Sangay_Tenzin

are you looking for a api call like below? you have to prefix your dhis2 URL.

https://…/api/organisationUnits.csv?paging=false&fields=id,name,code,parent,level&order=level

Hi Jins,
Thank you for the response.
Actually i want to get the report of orgunit in level-wise bit it through api or other means. With your suggestion, i will try it.

1 Like

I tried with the link but i encountered with 404 not found error.
https://drukhmis.gov.bt/api/organisationUnits.csv?paging=false&fields=id,name,code,parent,level&order=level

@Sangay_Tenzin Try this, please note added /dhis

Sir,
Thank you for helping me. I got the orgunit list but my desired output would be segregating orgunit by their orgunit groupset as shown shown below

image.png

@Sangay_Tenzin We shall wait for others’ input but meanwhile

  1. Try this request, get parent names and parse json file. https://drukhmis.gov.bt/dhis/api/organisationUnits?paging=false&fields=id,name,parent[id],parent[name],level&order=level

  2. Or try sqlview option in DHIS2 like below screenshot

Query used in SQLView

SELECT  pou.name , ou.name
	FROM public.organisationunit ou, public.organisationunit pou
	where ou.parentid = pou.organisationunitid 

Thank you, at least getting something as something is better than nothing

1 Like