Problem with attributeOptionCombo

I have a system that I migrated from from DHIS2.14 to 2.20. In the 2.14, there was no attributeOptionCombo in the export file. The Datavalue table was populated with a default value of 15 in the attributeOptionComboID column.

After migrating the system, the export file from a 2.20 system now comes with the attributeOptionCombo value. The Datavalue table is now being populated with a different value in the attributeOptionComboID column which is 2336.

Now, new imports are not being picked by analytics but if I manually change the attributeOptionComboID column in the datavalue table for the imported data to 15, the imported values appear in analytics. I have tried importing the metadata again but this has not helped.

What could I be missing. How can I get around this problem.

Regards,

Moses

Hi Moses,

···

On Mon, Nov 16, 2015 at 10:00 AM, Moses Marimo marimo@ict.co.zw wrote:

I have a system that I migrated from from DHIS2.14 to 2.20. In the 2.14, there was no attributeOptionCombo in the export file. The Datavalue table was populated with a default value of 15 in the attributeOptionComboID column.

After migrating the system, the export file from a 2.20 system now comes with the attributeOptionCombo value.nc

Sorry this part is a bit unclear. Is it coming from yet another 2.20 system?

In general we do not match on database identifiers (15 etc) but on UIDs. If you would like to exchange data seamlessly between systems you should ensure that the UIDs (or the codes) of category option combos (and data elements, org units) are equal (synchronized) on both sides.

regards,

Lars

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Sorry, The import file is coming from a 2.19 system into a 2.20 system. Previous, it was an import file coming from a 2.14 system to a 2.14 system.

The import file from a 2.14 system did not explicitly include the attributeOptionCombo. Now that the 2.19 export file is coming with the attributeOptionCombo, my challenge is, how do I “synchronise” both sides. Trying Meta data import did not help (exporting meta data from 2.19 system and importing into 2.20 system).

Yes, the import file comes with a UID on the attributeOptionCombo, but that UID maps to a different attributeOptionComboID column value in the Datavalue table as compared to the previous 2.14 imports.

···

On Wed, Nov 18, 2015 at 10:42 AM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Moses,

On Mon, Nov 16, 2015 at 10:00 AM, Moses Marimo marimo@ict.co.zw wrote:

I have a system that I migrated from from DHIS2.14 to 2.20. In the 2.14, there was no attributeOptionCombo in the export file. The Datavalue table was populated with a default value of 15 in the attributeOptionComboID column.

After migrating the system, the export file from a 2.20 system now comes with the attributeOptionCombo value.nc

Sorry this part is a bit unclear. Is it coming from yet another 2.20 system?

In general we do not match on database identifiers (15 etc) but on UIDs. If you would like to exchange data seamlessly between systems you should ensure that the UIDs (or the codes) of category option combos (and data elements, org units) are equal (synchronized) on both sides.

regards,

Lars

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.

Some approaches:

  1. Set the code property on all category option combos on both sides to be the same. Then import the data using the import option / property: categoryOptionComboIdScheme=CODE

https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s12.html#d5e1541

  1. Manually set the category option combo uid on either side to match the other. Remember that this might have huge effects on things like indicator expressions, validation rule expressions, custom forms, etc.

Lars

···

On Wed, Nov 18, 2015 at 9:56 AM, Moses Marimo marimo@ict.co.zw wrote:

Sorry, The import file is coming from a 2.19 system into a 2.20 system. Previous, it was an import file coming from a 2.14 system to a 2.14 system.

The import file from a 2.14 system did not explicitly include the attributeOptionCombo. Now that the 2.19 export file is coming with the attributeOptionCombo, my challenge is, how do I “synchronise” both sides. Trying Meta data import did not help (exporting meta data from 2.19 system and importing into 2.20 system).

Yes, the import file comes with a UID on the attributeOptionCombo, but that UID maps to a different attributeOptionComboID column value in the Datavalue table as compared to the previous 2.14 imports.

On Wed, Nov 18, 2015 at 10:42 AM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Moses,

ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.

On Mon, Nov 16, 2015 at 10:00 AM, Moses Marimo marimo@ict.co.zw wrote:

I have a system that I migrated from from DHIS2.14 to 2.20. In the 2.14, there was no attributeOptionCombo in the export file. The Datavalue table was populated with a default value of 15 in the attributeOptionComboID column.

After migrating the system, the export file from a 2.20 system now comes with the attributeOptionCombo value.nc

Sorry this part is a bit unclear. Is it coming from yet another 2.20 system?

In general we do not match on database identifiers (15 etc) but on UIDs. If you would like to exchange data seamlessly between systems you should ensure that the UIDs (or the codes) of category option combos (and data elements, org units) are equal (synchronized) on both sides.

regards,

Lars

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

I am trying approach 2 below because I don’t have access to the system generating the export file. Which tables should I mess around with?

Regards,

Moses

···

On Wed, Nov 18, 2015 at 9:56 AM, Moses Marimo marimo@ict.co.zw wrote:

Sorry, The import file is coming from a 2.19 system into a 2.20 system. Previous, it was an import file coming from a 2.14 system to a 2.14 system.

The import file from a 2.14 system did not explicitly include the attributeOptionCombo. Now that the 2.19 export file is coming with the attributeOptionCombo, my challenge is, how do I “synchronise” both sides. Trying Meta data import did not help (exporting meta data from 2.19 system and importing into 2.20 system).

Yes, the import file comes with a UID on the attributeOptionCombo, but that UID maps to a different attributeOptionComboID column value in the Datavalue table as compared to the previous 2.14 imports.


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

On Wed, Nov 18, 2015 at 10:42 AM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Moses,

ICT Warehouse (Pvt) Ltd - “The Stockist of e-nnovation”
7 Chelmsford Belgravia, Harare
Tel: +263-8644-102349
Cell: +263-772-268353
Website: www.ict.co.zw

Innovative solutions in Web Design and E-Commerce, Software Engineering, Mobile and Bulk SMS Solutions, Graphic Design and Printing, General ICT Solutions and Consultancy.

On Mon, Nov 16, 2015 at 10:00 AM, Moses Marimo marimo@ict.co.zw wrote:

I have a system that I migrated from from DHIS2.14 to 2.20. In the 2.14, there was no attributeOptionCombo in the export file. The Datavalue table was populated with a default value of 15 in the attributeOptionComboID column.

After migrating the system, the export file from a 2.20 system now comes with the attributeOptionCombo value.nc

Sorry this part is a bit unclear. Is it coming from yet another 2.20 system?

In general we do not match on database identifiers (15 etc) but on UIDs. If you would like to exchange data seamlessly between systems you should ensure that the UIDs (or the codes) of category option combos (and data elements, org units) are equal (synchronized) on both sides.

regards,

Lars

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org