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:
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.
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
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:
Using the web-api /api/system/id (you can add limit=X to adjust how many you need)
Install the dhis2 cli (npm -g install dhis2-cli) and then just do “dhis2 uid”, or “dhis2 uid -h” to get more help
if you are nodejs directly you can also use the dhis2-uid lib for generating uids (npm --save install dhis2-uid)
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:
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.
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
Thank you for the help! I will try these and see whether I can get it to work!
Kind regards,
Terence
···
On Wed, Oct 11, 2017 at 1:32 PM, Morten Olav Hansen morten@dhis2.org 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:
Using the web-api /api/system/id (you can add limit=X to adjust how many you need)
Install the dhis2 cli (npm -g install dhis2-cli) and then just do “dhis2 uid”, or “dhis2 uid -h” to get more help
if you are nodejs directly you can also use the dhis2-uid lib for generating uids (npm --save install dhis2-uid)
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:
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.
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
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.
On Wed, Oct 11, 2017 at 1:32 PM, Morten Olav Hansen morten@dhis2.org 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:
Using the web-api /api/system/id (you can add limit=X to adjust how many you need)
Install the dhis2 cli (npm -g install dhis2-cli) and then just do “dhis2 uid”, or “dhis2 uid -h” to get more help
if you are nodejs directly you can also use the dhis2-uid lib for generating uids (npm --save install dhis2-uid)
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:
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.
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
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.
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
Terence Scott
Global Alliance for Rabies Control (GARC)
Pan-African Rabies Control Network (PARACON) Steering Committee
On Wed, Oct 11, 2017 at 1:32 PM, Morten Olav Hansen morten@dhis2.org 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:
Using the web-api /api/system/id (you can add limit=X to adjust how many you need)
Install the dhis2 cli (npm -g install dhis2-cli) and then just do “dhis2 uid”, or “dhis2 uid -h” to get more help
if you are nodejs directly you can also use the dhis2-uid lib for generating uids (npm --save install dhis2-uid)
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:
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.
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