← Back to team overview

dhis2-users team mailing list archive

Re: need some assistant

 

By duplicated, you mean something like

Juarzon Clinic has a data element = 1
Juarzon clinic has a data element = 1
and the merged facility has a new value = 2?

In principle, you should be able to run an SQL command like

UPDATE datavalue set sourceid = <new organisationunitid> where
sourceid = <old organisationunitid>

replacing the  <new organisationunitid> with the desired facility to
merge to and replacing <old organisationunitid> with the facility you
want to get rid of.

But this will not work if you have the same data elements entered for
the same month for both facilities. Then you will need to remove the
data elements which conflict for this time period. However, it would
be good if you could describe the problem with duplication in more
detail, as this sounds worrisome.

Regards,
Jason


On Tue, Apr 24, 2012 at 12:25 PM, Stephen Gbanyan <mambu9@xxxxxxxxx> wrote:
> Hi All,
>
> I have a situation and need some help.  The are two facilities in my
> database with the same name but the difference is capital letter.  One
> is spell Juarzon Clinic and the other is Juarzon clinic. Both of them
> have the same data in for September and October 2011. In November 2011
> Juarzon clinic got data but Juarzon Clinic has nothing, in December
> Juarzon Clinic has data and Juarzon clinic has nothing and that goes
> on till March of this year.  When I merged organization units I
> noticed the months of September and October figures got duplicated.  I
> need a command to execute that I just move the months data to the
> appropriate facility and delete the other facility.
>
> Thanks
>
> Steephen
>
> _______________________________________________
> 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


Follow ups

References