← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Import of a new event (not from another instance)

 

Hi Calle

Thank you for the advice. The way in which we plan on using it would be for
regular import in the system from the devices that we have made. Therefore,
small datasets (a few hundred records at most) would be imported on a daily
or weekly basis.

Kind regards,
Terence

Terence Scott

Global Alliance for Rabies Control (GARC)
Pan-African Rabies Control Network (PARACON) Steering Committee
terence.scott@xxxxxxxxxxxxxxxxxx
https://paracon.rabiesalliance.org
Skype: tpscott1987




On Thu, Oct 12, 2017 at 3:27 PM, Calle Hedberg <calle.hedberg@xxxxxxxxx>
wrote:

> Terence,
>
> It definitely works to generate event UIDs using one of the methods above
> - just be aware that the import is very slow for larger record sets.
>
> I just imported around 2.4 mill events from 2001-2012 (with around 12
> values each), and ended up having to import year by year - it still took 3
> full days to import (i.e. around 40 hours). So the smart thing would be to
> (a) ensure you have a lot of ram allocated to the instance (~16GB is
> probably optimal), but also to limit the import file to not more than 2
> mill rows.
>
> Regards
> Calle
>
> On 12 October 2017 at 10:47, Terence Scott <terence.scott@rabiesalliance.
> org> wrote:
>
>> Hi Morten
>>
>> Thank you for the help! I will try these and see whether I can get it to
>> work!
>>
>> Kind regards,
>> Terence
>>
>> Terence Scott
>>
>> Global Alliance for Rabies Control (GARC)
>> Pan-African Rabies Control Network (PARACON) Steering Committee
>> terence.scott@xxxxxxxxxxxxxxxxxx
>> https://paracon.rabiesalliance.org
>> Skype: tpscott1987
>>
>>
>>
>>
>> On Wed, Oct 11, 2017 at 1:32 PM, Morten Olav Hansen <morten@xxxxxxxxx>
>> wrote:
>>
>>> Hi there
>>>
>>> Sending in event IDs is not required, but its definitely recommended if
>>> you want do repeated imports (good to have a unique id connected to your
>>> event so that you don't end up with duplicates)
>>>
>>> We offer a few options to generate UIDs:
>>>
>>> 1) Using the web-api /api/system/id (you can add limit=X to adjust how
>>> many you need)
>>> 2) Install the dhis2 cli (npm -g install dhis2-cli) and then just do
>>> "dhis2 uid", or "dhis2 uid -h" to get more help
>>> 3) if you are nodejs directly you can also use the dhis2-uid lib for
>>> generating uids (npm --save install dhis2-uid)
>>>
>>> https://www.npmjs.com/package/dhis2-cli
>>> https://www.npmjs.com/package/dhis2-uid
>>>
>>> --
>>> Morten Olav Hansen
>>> Senior Engineer, DHIS 2
>>> University of Oslo
>>> http://www.dhis2.org
>>>
>>> On Wed, Oct 11, 2017 at 1:21 PM, Terence Scott <
>>> terence.scott@xxxxxxxxxxxxxxxxxx> wrote:
>>>
>>>> Dear All
>>>>
>>>> We have collected animal vaccination data (including GPS coordinates,
>>>> time, date, species etc.) in a custom developed program and have a CSV
>>>> output for this program. We are looking to try to import the data from the
>>>> custom-built programme into our DHIS2 instance via Event import. I have
>>>> gotten the import to work on Event export files that I have edited with new
>>>> animal data (e.g. by changing the species) and this works, as it simply
>>>> updates the old event (based on the event ID). However, we would like to
>>>> import these data as new events as opposed to simply replacing existing
>>>> events currently on the system.
>>>>
>>>> Therefore, I would like to please find out as to whether it is possible
>>>> to do one of the following:
>>>>
>>>> 1) Do an event import without an Event ID (i.e. register a new event on
>>>> the DHIS2 instance via Event import)
>>>>     - I have looked through the documentation but am unable to find out
>>>> whether            this is possible
>>>>     - In the Developer Docs, it seems to mention that import using XML
>>>> does not            require an Event ID, but I have not managed to
>>>> determine whether I am                  misinterpreting this or whether I
>>>> simply do not know how to do it.
>>>>
>>>> 2) Generate our own Event IDs in our custom-built programme that will
>>>> be recognised by the DHIS2 instance.
>>>>     - Is there some way by which the Event IDs could be automatically
>>>> generated          outside of the DHIS2 instance (in our programme) so that
>>>> new events can be          imported into the instance?
>>>>
>>>> Please let me know if you need any further clarification. I would
>>>> really appreciate any help that you could provide!
>>>>
>>>> Kind regards,
>>>> Terence
>>>>
>>>>
>>>> Terence Scott
>>>>
>>>> Global Alliance for Rabies Control (GARC)
>>>> Pan-African Rabies Control Network (PARACON) Steering Committee
>>>> terence.scott@xxxxxxxxxxxxxxxxxx
>>>> https://paracon.rabiesalliance.org
>>>> Skype: tpscott1987
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
>
> *******************************************
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
> <https://maps.google.com/?q=46D+Alma+Road,+7700+Rosebank,+SOUTH+AFRICA&entry=gmail&source=g>
>
> Tel/fax (home): +27-21-685-6472 <+27%2021%20685%206472>
>
> Cell: +27-82-853-5352 <+27%2082%20853%205352>
>
> Iridium SatPhone: +8816-315-19119 <+881%206%20315%2019119>
>
> Email: calle.hedberg@xxxxxxxxx
>
> Skype: calle_hedberg
>
> *******************************************
>
>

References