Using the Org. Unit code to import events in DHIS2?

Hi all,

As I told you in the previous emails, PSI is about to import thousands of events (around 30.000 SEwoR) into thousands of Org. Units (2.000 - 3.000). Each of these Org. Units has its own unique code in Dhis2, the same code that PSI is managing in its internal databases. Please correct me if I am wrong, but right now it seems that to import an event in Dhis2 we should to specify the UID of each Org. Unit in the xml file. Could it be possible to have the option to import the event by the Org. Unit code instead than the UID (like in the CSV import)? That would be really useful for us, otherwise we´d need to sync the PSI code of each org.unit with the UID stored in the dhis2 database.

Thanks

Jose

Hi Jose,

Would it be ok with a fallback option in 2.13, 2.14, and we will fix it with id scheme in 2.15? What i mean by that, is that first we try to match on the uid, and if we get no hits, we will try to match on the code… this mimicks how it works in the meta-data importer, and then for 2.15, we will add a id scheme

···


Morten

On Fri, Jan 24, 2014 at 4:45 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi all,

As I told you in the previous emails, PSI is about to import thousands of events (around 30.000 SEwoR) into thousands of Org. Units (2.000 - 3.000). Each of these Org. Units has its own unique code in Dhis2, the same code that PSI is managing in its internal databases. Please correct me if I am wrong, but right now it seems that to import an event in Dhis2 we should to specify the UID of each Org. Unit in the xml file. Could it be possible to have the option to import the event by the Org. Unit code instead than the UID (like in the CSV import)? That would be really useful for us, otherwise we´d need to sync the PSI code of each org.unit with the UID stored in the dhis2 database.

Thanks

Jose


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

That sounds ok - we have a couple of data feeds that need monthly recurrent imports, which we encourage our users to do themselves. So far this works very well for aggregated (we use CSV); we are now trying to establish the same practice for SEwoR. We are ok in using XML, but we need to use codes (for the use case that Jose is working on there are over 3,000 outlets involved). Thanks Morten.

···

Rodolfo Meliá

*Principal | *rmelia@knowming.com

Skype: rod.melia | +44 777 576 4090 | +1 708 872 7636

www.knowming.com

On Fri, Jan 24, 2014 at 9:57 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi Jose,

Would it be ok with a fallback option in 2.13, 2.14, and we will fix it with id scheme in 2.15? What i mean by that, is that first we try to match on the uid, and if we get no hits, we will try to match on the code… this mimicks how it works in the meta-data importer, and then for 2.15, we will add a id scheme


Morten

On Fri, Jan 24, 2014 at 4:45 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi all,

As I told you in the previous emails, PSI is about to import thousands of events (around 30.000 SEwoR) into thousands of Org. Units (2.000 - 3.000). Each of these Org. Units has its own unique code in Dhis2, the same code that PSI is managing in its internal databases. Please correct me if I am wrong, but right now it seems that to import an event in Dhis2 we should to specify the UID of each Org. Unit in the xml file. Could it be possible to have the option to import the event by the Org. Unit code instead than the UID (like in the CSV import)? That would be really useful for us, otherwise we´d need to sync the PSI code of each org.unit with the UID stored in the dhis2 database.

Thanks

Jose


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Blueprint for org unit id scheme for events here, aiming at 2.15.

https://blueprints.launchpad.net/dhis2/+spec/orgunit-id-scheme-event-import

···

On Fri, Jan 24, 2014 at 12:42 PM, Rodolfo Melia rmelia@knowming.com wrote:

That sounds ok - we have a couple of data feeds that need monthly recurrent imports, which we encourage our users to do themselves. So far this works very well for aggregated (we use CSV); we are now trying to establish the same practice for SEwoR. We are ok in using XML, but we need to use codes (for the use case that Jose is working on there are over 3,000 outlets involved). Thanks Morten.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Rodolfo Meliá

*Principal | *rmelia@knowming.com

Skype: rod.melia | +44 777 576 4090 | +1 708 872 7636

www.knowming.com

On Fri, Jan 24, 2014 at 9:57 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi Jose,

Would it be ok with a fallback option in 2.13, 2.14, and we will fix it with id scheme in 2.15? What i mean by that, is that first we try to match on the uid, and if we get no hits, we will try to match on the code… this mimicks how it works in the meta-data importer, and then for 2.15, we will add a id scheme


Morten

On Fri, Jan 24, 2014 at 4:45 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi all,

As I told you in the previous emails, PSI is about to import thousands of events (around 30.000 SEwoR) into thousands of Org. Units (2.000 - 3.000). Each of these Org. Units has its own unique code in Dhis2, the same code that PSI is managing in its internal databases. Please correct me if I am wrong, but right now it seems that to import an event in Dhis2 we should to specify the UID of each Org. Unit in the xml file. Could it be possible to have the option to import the event by the Org. Unit code instead than the UID (like in the CSV import)? That would be really useful for us, otherwise we´d need to sync the PSI code of each org.unit with the UID stored in the dhis2 database.

Thanks

Jose


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

I have now implemented this in 2.13, and 2.14. It will match in this order: uid, code, uuid, name (if size is 1).

···


Morten

On Fri, Jan 24, 2014 at 6:54 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Blueprint for org unit id scheme for events here, aiming at 2.15.

https://blueprints.launchpad.net/dhis2/+spec/orgunit-id-scheme-event-import

On Fri, Jan 24, 2014 at 12:42 PM, Rodolfo Melia rmelia@knowming.com wrote:

That sounds ok - we have a couple of data feeds that need monthly recurrent imports, which we encourage our users to do themselves. So far this works very well for aggregated (we use CSV); we are now trying to establish the same practice for SEwoR. We are ok in using XML, but we need to use codes (for the use case that Jose is working on there are over 3,000 outlets involved). Thanks Morten.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Rodolfo Meliá

*Principal | *rmelia@knowming.com

Skype: rod.melia | +44 777 576 4090 | +1 708 872 7636

www.knowming.com

On Fri, Jan 24, 2014 at 9:57 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi Jose,

Would it be ok with a fallback option in 2.13, 2.14, and we will fix it with id scheme in 2.15? What i mean by that, is that first we try to match on the uid, and if we get no hits, we will try to match on the code… this mimicks how it works in the meta-data importer, and then for 2.15, we will add a id scheme


Morten

On Fri, Jan 24, 2014 at 4:45 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi all,

As I told you in the previous emails, PSI is about to import thousands of events (around 30.000 SEwoR) into thousands of Org. Units (2.000 - 3.000). Each of these Org. Units has its own unique code in Dhis2, the same code that PSI is managing in its internal databases. Please correct me if I am wrong, but right now it seems that to import an event in Dhis2 we should to specify the UID of each Org. Unit in the xml file. Could it be possible to have the option to import the event by the Org. Unit code instead than the UID (like in the CSV import)? That would be really useful for us, otherwise we´d need to sync the PSI code of each org.unit with the UID stored in the dhis2 database.

Thanks

Jose


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Hi Morten, Lars,

If I introduce the code in the xml I am getting the following message in the console:

<?xml version='1.0' encoding='UTF-8'?>#0 to host

localhost left intact

My event tag in the xml is

“testingcode” is the code associated to the Org.Unit in DHIS2.

···

On Sat, Jan 25, 2014 at 11:21 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

I have now implemented this in 2.13, and 2.14. It will match in this order: uid, code, uuid, name (if size is 1).


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Morten

On Fri, Jan 24, 2014 at 6:54 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Blueprint for org unit id scheme for events here, aiming at 2.15.

https://blueprints.launchpad.net/dhis2/+spec/orgunit-id-scheme-event-import

On Fri, Jan 24, 2014 at 12:42 PM, Rodolfo Melia rmelia@knowming.com wrote:

That sounds ok - we have a couple of data feeds that need monthly recurrent imports, which we encourage our users to do themselves. So far this works very well for aggregated (we use CSV); we are now trying to establish the same practice for SEwoR. We are ok in using XML, but we need to use codes (for the use case that Jose is working on there are over 3,000 outlets involved). Thanks Morten.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Rodolfo Meliá

*Principal | *rmelia@knowming.com

Skype: rod.melia | +44 777 576 4090 | +1 708 872 7636

www.knowming.com

On Fri, Jan 24, 2014 at 9:57 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi Jose,

Would it be ok with a fallback option in 2.13, 2.14, and we will fix it with id scheme in 2.15? What i mean by that, is that first we try to match on the uid, and if we get no hits, we will try to match on the code… this mimicks how it works in the meta-data importer, and then for 2.15, we will add a id scheme


Morten

On Fri, Jan 24, 2014 at 4:45 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi all,

As I told you in the previous emails, PSI is about to import thousands of events (around 30.000 SEwoR) into thousands of Org. Units (2.000 - 3.000). Each of these Org. Units has its own unique code in Dhis2, the same code that PSI is managing in its internal databases. Please correct me if I am wrong, but right now it seems that to import an event in Dhis2 we should to specify the UID of each Org. Unit in the xml file. Could it be possible to have the option to import the event by the Org. Unit code instead than the UID (like in the CSV import)? That would be really useful for us, otherwise we´d need to sync the PSI code of each org.unit with the UID stored in the dhis2 database.

Thanks

Jose


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Hi,

I think maybe you tested with an old version… could you try again? I tested with code matching here locally now, and it worked fine…

···


Morten

On Sun, Jan 26, 2014 at 3:28 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi Morten, Lars,

If I introduce the code in the xml I am getting the following message in the console:

<?xml version='1.0' encoding='UTF-8'?>#0 to host

localhost left intact

My event tag in the xml is

“testingcode” is the code associated to the Org.Unit in DHIS2.

On Sat, Jan 25, 2014 at 11:21 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

I have now implemented this in 2.13, and 2.14. It will match in this order: uid, code, uuid, name (if size is 1).


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Morten

On Fri, Jan 24, 2014 at 6:54 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Blueprint for org unit id scheme for events here, aiming at 2.15.

https://blueprints.launchpad.net/dhis2/+spec/orgunit-id-scheme-event-import

On Fri, Jan 24, 2014 at 12:42 PM, Rodolfo Melia rmelia@knowming.com wrote:

That sounds ok - we have a couple of data feeds that need monthly recurrent imports, which we encourage our users to do themselves. So far this works very well for aggregated (we use CSV); we are now trying to establish the same practice for SEwoR. We are ok in using XML, but we need to use codes (for the use case that Jose is working on there are over 3,000 outlets involved). Thanks Morten.


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Rodolfo Meliá

*Principal | *rmelia@knowming.com

Skype: rod.melia | +44 777 576 4090 | +1 708 872 7636

www.knowming.com

On Fri, Jan 24, 2014 at 9:57 AM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi Jose,

Would it be ok with a fallback option in 2.13, 2.14, and we will fix it with id scheme in 2.15? What i mean by that, is that first we try to match on the uid, and if we get no hits, we will try to match on the code… this mimicks how it works in the meta-data importer, and then for 2.15, we will add a id scheme


Morten

On Fri, Jan 24, 2014 at 4:45 AM, Jose Garcia Muñoz josemp10@gmail.com wrote:

Hi all,

As I told you in the previous emails, PSI is about to import thousands of events (around 30.000 SEwoR) into thousands of Org. Units (2.000 - 3.000). Each of these Org. Units has its own unique code in Dhis2, the same code that PSI is managing in its internal databases. Please correct me if I am wrong, but right now it seems that to import an event in Dhis2 we should to specify the UID of each Org. Unit in the xml file. Could it be possible to have the option to import the event by the Org. Unit code instead than the UID (like in the CSV import)? That would be really useful for us, otherwise we´d need to sync the PSI code of each org.unit with the UID stored in the dhis2 database.

Thanks

Jose


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Please can i import XLX format data containing Organizational Units into DHIS2?

Hi Anthony,
I am not sure what XLX (maybe you meant XLSX?) is, but really the only way to import organisation units effectively is to transform the data into DHIS2 XML format (so-called DXF2) and import it this way. You can see how this is done here (http://www.dhis2.org/doc/snapshot/en/user/html/ch27s05.html). The format which the data needs to be in can be seen through the WebAPI. You may also be able to create SQL from your data and inject it directly into the database. Check the archives of this group, as it has been described how to do this.

It may be possible as well to use the FRED-API (http://www.dhis2.org/doc/snapshot/en/user/html/ch27s26.html) which can be used for facilities but maybe Morten can comment on this.

Best regards,
Jason

···

On Mon, Jan 27, 2014 at 1:34 PM, Anthony Danso anthonydanso47@yahoo.com wrote:

Please can i import XLX format data containing Organizational Units into DHIS2?


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Everything is fine now thanks.

···

On Jan 27, 2014, at 11:34 AM, Anthony Danso <anthonydanso47@yahoo.com> wrote:

Please can i import XLX format data containing Organizational Units into DHIS2?