← Back to team overview

dhis2-users team mailing list archive

Re: Retrieve Structure of Organisation Units through Web API

 

Probably your best option would be to simply download all the org units,
and then using the parent to connect them together.

The structure is given in a few different ways (you can probably use them
all)
1. OU.parent links to parent in tree, if null.. means its a root OU
2. OU.path, gives full path to OU, /parent/child/etc/etc
3. OU.children, lists all children belonging to a OU, if children length is
0, then its a leaf

On Mon, Feb 29, 2016 at 4:14 AM, Moses Marimo <marimo@xxxxxxxxx> wrote:

> I need to retrieve the structure of the OrganisationUnits so that If
> possible, I get JSON data structured from national, province, district and
> facility.
>
> How best can I retrieve this structured data. I need to use use it in a
> third party App that will eventually write back to DHIS2
>
> Regards,
>
> Moses
>
> --
> ICT Warehouse (Pvt) Ltd - "The Stockist of *e*-nnovation"
> 7 Chelmsford Belgravia, Harare
> Tel: +263-8644-102349
> Cell: +263-772-268353
> Website: *www.ict.co.zw <http://www.ict.co.zw>*
>
>
> Innovative solutions in Web Design and E-Commerce, Software Engineering,
> Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT
> Solutions and Consultancy.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Morten

References