dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43464
Re: The "Organisation unit merge" function
Dear Jason
Than you for quick feedback.
I already have a try with your functions and faced some issues earlier. I
identified the issues and will tray again.
Regards
Hannan
On Wed, Feb 24, 2016 at 7:56 PM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:
> Hi Hannan,
>
> There were issues with the implementation in DHIS2, and it could have
> caused major havoc with the data, depending on the situation, thus there
> was a decision to remove this for now. I think the devs are working on a
> more permanent fix, but in the time being, I created two Postgresql
> functions (if you are using MySQL..these will not work).
>
> The first, is to delete sites with data.
>
>
> https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/delete_site_with_data.sql
>
> and then to merge them (which depends on the first function)
>
>
> https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/merge_orgunits.sql
>
> Absolutely no warranty on this, so be sure to test very thoroughly your
> self! The merge function accepts different strategies (MIN, MAX, SUM, AVG,
> LATEST, FIRST) for numeric data. Non-aggregatable data (option sets, text,
> etc) will use the "latest" data in case of conflicts. You can of course
> tweak this to your needs.
>
>
> Good luck!
>
> Regards,
> Jason
>
>
> On Wed, Feb 24, 2016 at 11:43 AM, Hannan Khan <hannank@xxxxxxxxx> wrote:
>
>> Dear Experts
>>
>> From version 2.21 the "Organisation unit merge" function are
>> discontinued. In some context this was very useful. Can it be added back
>> again?
>>
>> Or I have to write SQL query to manually merge that.
>>
>> Regards
>>
>> Hannan Khan
>> HISP Bangladesh
>>
>
>
>
> --
> Jason P. Pickering
> email: jason.p.pickering@xxxxxxxxx
> tel:+46764147049
>
Follow ups
References