dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #01603
Re: New Organization Units Import
I tend to use an approach similar to Morten but this does involve getting
data into an xml format which is not something that users will necessarily
have the background or tooling to easily do,
Most of this data seems to be available in spreadsheet format most
typically Excel. Unfortunately that's where the similarity ends.
Everywhere has a different spreadsheet layout. I did develop what I
thought might be a "standard" excel layout some time back which I could
import into dhis. I would need to try and find it again. Assuming users
would find it easier to transform data within excel (using techniques of
cut and paste and rearrange) to get the data into some sort of standard
sheet then this would be a feasible general approach.
On 5 December 2012 13:29, Ola Hodne Titlestad <olati@xxxxxxxxxx> wrote:
> Hi,
>
> Populating the organisationunit table directly in the database is an OK
> approach when starting from scratch yes, at least on alternative approach
> to the web-api approach Morten suggested.
>
> The UID field you can leave blank and then DHIS will automatically
> populate missing UIDs on next DHIS startup as part of the startup routines.
>
> It can be a bit of a challenge to populate the parentid field. You need to
> make sure those parentids actually make up your hierarchy, so that the
> correct orgunits are linked.
>
> The internal id, organisationunitid should be populated using the
> nextval('hibernate_sequence') function in postgres to avoid duplicates.
>
> Ola
> ---------
>
>
>
>
> ----------------------------------
> Ola Hodne Titlestad (Mr)
> HISP
> Department of Informatics
> University of Oslo
>
> Mobile: +47 48069736
> Home address: Eftasåsen 68, 0687 Oslo, Norway. Googlemaps link<https://maps.google.com/maps?q=Eftas%C3%A5sen+68,+0687+Oslo,+Norge&hl=en&ie=UTF8&sll=59.893855,10.785116&sspn=0.222842,0.585709&oq=eftas%C3%A5sen+68,+0687+Oslo,+&t=h&hnear=Eftas%C3%A5sen+68,+%C3%98stensj%C3%B8,+0687+Oslo,+Norway&z=16>
>
>
> On 5 December 2012 14:20, ChangJames <jamesbjchang@xxxxxxxxxxx> wrote:
>
>> Hi,
>>
>> Is there any easy way(/preferred way) to import Organization Units (New
>> ones) on blank DHIS2 system?
>> I have a list of organization units I like to add to the system, but like
>> to know if there is an alternative to the individual manual add using DHIS
>> UI.
>>
>> It seems there isn’t import function for this on DHIS, so I took a look
>> at datatable for inserting straight to DB.
>> But, the ‘OrganizationUnit’ table has ‘UID’ field. How do I generate
>> that? One of my data ‘jII07NoHiO5’ does seem like normal Uniquie
>> Identifier number format.
>> And is this, adding rows straight to datatable, a OK way of mass
>> importing the Organization Units on DHIS?
>>
>> _______________________________________________
>> 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
>>
>>
>
> _______________________________________________
> 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