← Back to team overview

dhis2-devs team mailing list archive

Metadata api and groups/groupsets

 

I've been grappling with a problem exporting and importing orgunit metadata
which I'd like to share some thoughts on.

Two dhis2 instances (in Rwanda) have slightly different sets of orgunits.
 So we are trying to rationalize and combine them - in most cases a union
of the two with some shuffling around in the hierarchy.

We have solved this pretty well but here is a challenge with group
memberships.  If I export all the orgunits from system A, together with
their orgunitgroups, over to system B, one consequence is that the existing
group memberships in A get replaced by those from B rather than appended.
 This is not the desired behaviour

It doesn't look like we have an api method which will allow me to add an
orgunit to an existing group.  I could of course be missing something.

Can we brainstorm a simpler but potentially more important case:  adding a
new orgunit, say Bob's Clinic, of type "Clinic" and Ownership "Faith
Based".  I can add Bob's Clinic easily enough by posting the metadata.  Any
suggestions for adding it to the "Clinic" and "Faith Based" groups.
 Currently I am resorting to downloading the entire groups metadata, adding
to it where appropriate, then posting the whole list back.

Is there a better way?

Bob

Follow ups