← Back to team overview

dhis2-devs team mailing list archive

Re: [Bug 358933] Re: DHIS2 does not import "active" orgunitgroupmembers column during a DHIS 1.4 import

 

we need "active" column because there are different reasons for
orgunits to stop reporting temporarily or close (and we need the
histroic data) and we need to import frm dhis1.4
jorn

On Wed, Nov 4, 2009 at 3:04 PM, jason.p.pickering
<jason.p.pickering@xxxxxxxxx> wrote:
> Hi Lars,
> My only problem with this approach is that DHIS 1.4 uses this "active"
> column to record whether orgunits are currently submitting data or
> not. I have noticed here that in some cases, users create " bogus"
> orgunits to which they attach no data. In other cases, facilities may
> close, the units are marked as "inactive", but the historical data is
> still important.
>
> So, we could warn people that this is a limitation with DHIS 2.0 and
> that they should resolve these issues before migration/importation.
> That is unless we can add the "active" column to 2.0.
>
> Regards,
> Jason
>
>
> 2009/11/3 Lars Helge Øverland <larshelge@xxxxxxxxx>:
>> ** Changed in: dhis2
>>    Milestone: 2.0.4 => 2.0.3
>>
>> --
>> DHIS2 does not import "active"  orgunitgroupmembers column during a DHIS 1.4 import
>> https://bugs.launchpad.net/bugs/358933
>> You received this bug notification because you are a direct subscriber
>> of the bug.
>>
>> Status in DHIS 2 - District Health Information Software: New
>>
>> Bug description:
>> An additional column needs to be added to the "orgunitgroupmembers" table in DHIS2 in order to improve compatibility with data imports from DHIS 1.4. The DHIS 1.4 orgunitgroupmembers contains the following columns
>>
>> OrgUnitGroupID  OrgUnitID       Active  LastUserID      LastUpdated
>>
>> while DHIS 2 orgunitgroupmembers contains these two columns.
>>
>> orgunitgroupid  orgunitid
>>
>> During the generation of the exclusive organization group members tables, DHIS 1.4 seems to take into account whether a particular orgunit is active in a group, or not. If the orgunit is not active, it is not included in the exclusive group resource tables.
>>
>>
>> The following query is meant to return a crosstab listing of orgunits, and the (exclusive and compulsory) groups that they belong to,  from the DHIS 2 database.
>>
>> SELECT  a.organisationunitid, a.name, a.parentid, a.shortname, a.code, d.name, e.name, h.name, i.name from organisationunit a
>> JOIN orgunitgroupmembers b on a.organisationunitid = b.organisationunitid
>> JOIN orgunitgroupsetmembers c on b.orgunitgroupid = c.orgunitgroupid
>> JOIN orgunitgroup d on b.orgunitgroupid = d.orgunitgroupid
>> JOIN orgunitgroupset e on c.orgunitgroupsetid = e.orgunitgroupsetid and e.name ~* 'Type'
>>
>> JOIN orgunitgroupmembers f on a.organisationunitid = f.organisationunitid
>> JOIN orgunitgroupsetmembers g on f.orgunitgroupid = g.orgunitgroupid
>> JOIN orgunitgroup h on f.orgunitgroupid = h.orgunitgroupid
>> JOIN orgunitgroupset i on g.orgunitgroupsetid = i.orgunitgroupsetid and i.name ~* 'Ownership'
>>
>> and the results of the query for the same orgunit..
>>
>> 3662;"co Kapilamikwa Health Post";3576;"Kapilamikwa HP";"206011";"Unknown Type";"Type";"Government";"Ownership"
>> 3662;"co Kapilamikwa Health Post";3576;"Kapilamikwa HP";"206011";"Unknown Type";"Type";"Unknown Ownership";"Ownership"
>> 3662;"co Kapilamikwa Health Post";3576;"Kapilamikwa HP";"206011";"Health Post";"Type";"Government";"Ownership"
>> 3662;"co Kapilamikwa Health Post";3576;"Kapilamikwa HP";"206011";"Health Post";"Type";"Unknown Ownership";"Ownership"
>>
>> Both the "Type" and "Ownership" groups are compulsory as well as exclusive, however since the data was imported from DHIS 1.4, and the "active" column was not taken into consideration, three of the rows returned are bogus and should be excluded.
>>
>
> --
> DHIS2 does not import "active"  orgunitgroupmembers column during a DHIS 1.4 import
> https://bugs.launchpad.net/bugs/358933
> You received this bug notification because you are a member of DHIS 2
> developers, which is subscribed to DHIS.
>
> Status in DHIS 2 - District Health Information Software: New
>
> Bug description:
> An additional column needs to be added to the "orgunitgroupmembers" table in DHIS2 in order to improve compatibility with data imports from DHIS 1.4. The DHIS 1.4 orgunitgroupmembers contains the following columns
>
> OrgUnitGroupID  OrgUnitID       Active  LastUserID      LastUpdated
>
> while DHIS 2 orgunitgroupmembers contains these two columns.
>
> orgunitgroupid  orgunitid
>
> During the generation of the exclusive organization group members tables, DHIS 1.4 seems to take into account whether a particular orgunit is active in a group, or not. If the orgunit is not active, it is not included in the exclusive group resource tables.
>
>
> The following query is meant to return a crosstab listing of orgunits, and the (exclusive and compulsory) groups that they belong to,  from the DHIS 2 database.
>
> SELECT  a.organisationunitid, a.name, a.parentid, a.shortname, a.code, d.name, e.name, h.name, i.name from organisationunit a
> JOIN orgunitgroupmembers b on a.organisationunitid = b.organisationunitid
> JOIN orgunitgroupsetmembers c on b.orgunitgroupid = c.orgunitgroupid
> JOIN orgunitgroup d on b.orgunitgroupid = d.orgunitgroupid
> JOIN orgunitgroupset e on c.orgunitgroupsetid = e.orgunitgroupsetid and e.name ~* 'Type'
>
> JOIN orgunitgroupmembers f on a.organisationunitid = f.organisationunitid
> JOIN orgunitgroupsetmembers g on f.orgunitgroupid = g.orgunitgroupid
> JOIN orgunitgroup h on f.orgunitgroupid = h.orgunitgroupid
> JOIN orgunitgroupset i on g.orgunitgroupsetid = i.orgunitgroupsetid and i.name ~* 'Ownership'
>
> and the results of the query for the same orgunit..
>
> 3662;"co Kapilamikwa Health Post";3576;"Kapilamikwa HP";"206011";"Unknown Type";"Type";"Government";"Ownership"
> 3662;"co Kapilamikwa Health Post";3576;"Kapilamikwa HP";"206011";"Unknown Type";"Type";"Unknown Ownership";"Ownership"
> 3662;"co Kapilamikwa Health Post";3576;"Kapilamikwa HP";"206011";"Health Post";"Type";"Government";"Ownership"
> 3662;"co Kapilamikwa Health Post";3576;"Kapilamikwa HP";"206011";"Health Post";"Type";"Unknown Ownership";"Ownership"
>
> Both the "Type" and "Ownership" groups are compulsory as well as exclusive, however since the data was imported from DHIS 1.4, and the "active" column was not taken into consideration, three of the rows returned are bogus and should be excluded.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>



Follow ups

References