← Back to team overview

dhis2-users team mailing list archive

Re: Merge and Deleting Facilities

 

Hi Gerald,
This has been raised a few times on the list already. There were some
serious flaws with that functionality, and it was removed and has yet to be
put back in place.

In the meantime, you can try this

https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/merge_orgunits.sql

and call it directly from the database with

SELECT * FROM merge_organisationunits('SOURCE', 'DESTINATION', 'STRATEGY');

where

SOURCE = the source orgunit UID
DESTINATION = the destination orgunit UID
STRATEGY= one of  SUM,MAX,MIN,AVG,LAST,FIRST

each of those paramaters should be encased with single-quotes.


It goes without saying, this should be thoroughly tested on your
non-production system before attempting it on your production machine, as
it is a destructive function (meaning things get permanently deleted).

Regards,
Jason


On Fri, Jul 29, 2016 at 6:05 PM, gerald thomas <gerald17006@xxxxxxxxx>
wrote:

> Dear All,
> On previous DHIS2 version we were using merge for duplicate sites but
> on version 2.22 i can't find merge. Please can someone help me?
>
> Also, after merging i will like to remove the duplicate facility, what
> are the procedures to remove or delete a facility.
>
> Thanks in advance for your help
>
> --
> Regards,
>
> Gerald
>
> _______________________________________________
> 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
>



-- 
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049

Follow ups

References