Web API data element category combination option IDs

Hi Lars,

From the Web API class, the example we did for importing data into the DHIS2 comprised of a data element with a single category combination option (Number). However, I have been looking at importing data for data elements with several category-combination options, i.e Cholera (0-4 years, Male Or Cholera (5 and Over, Male), etc. How would i get the ID for a specific category-combination option?

Sam.

Hi Sam,

you can navigate to the categoryOptionCombinations resource from the
/api starting point just as anything else. The URL for this on the
demo site is this:

http://apps.dhis2.org/demo/api/categoryOptionCombos

Then click on each item to see the id.

best regards, Lars

···

On Wed, Jun 27, 2012 at 3:02 PM, Sam Kasozi <kasozis@gmail.com> wrote:

Hi Lars,
From the Web API class, the example we did for importing data into the DHIS2
comprised of a data element with a single category combination option
(Number). However, I have been looking at importing data for data elements
with several category-combination options, i.e Cholera (0-4 years, Male Or
Cholera (5 and Over, Male), etc. How would i get the ID for a specific
category-combination option?

Sam.

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

Hi Lars, I think i would need to get this more clearly.

If i take a scenario from one of the datasets in the Ug DHIS2 - HMIS 105:2 and we specifically look at the Tetanus Immunization section (2.9)

It has a data element category “TT Vaccine (for Preg Women, non-Preg women & Immun in Sch)”; which also happens to be the name of the data element category combination The data elements for that category combination include Tetanus Immun dozes from 1 up to 4.

From the Web API; Navigating from the Data elements, and then through the categoryCombo, then through each CategoryOptionCombos yields the same ID’s for each data element as shown below.

CategoryOptionCombos

Preg Wom Non-Preg Wom Immun Sch

Tetanus Immunization Dose 1 pvO9TkTgA7C bdBwblYHGr0 WmCbPR9n3TT

Tetanus Immunization Dose 2 pvO9TkTgA7C

Am wondering how i can specify get an ID for say Tetanus Immunization Doses 1 for Pregnant Women.

Sam.

···

On Fri, Jun 29, 2012 at 1:17 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Sam,

you can navigate to the categoryOptionCombinations resource from the

/api starting point just as anything else. The URL for this on the

demo site is this:

http://apps.dhis2.org/demo/api/categoryOptionCombos

Then click on each item to see the id.

best regards, Lars

On Wed, Jun 27, 2012 at 3:02 PM, Sam Kasozi kasozis@gmail.com wrote:

Hi Lars,

From the Web API class, the example we did for importing data into the DHIS2

comprised of a data element with a single category combination option

(Number). However, I have been looking at importing data for data elements

with several category-combination options, i.e Cholera (0-4 years, Male Or

Cholera (5 and Over, Male), etc. How would i get the ID for a specific

category-combination option?

Sam.


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 Sam,

okay.. What you see is actually correct. The idea is that category
option combos are common and re-used across data elements. So having
the same category option combo identifier for various data elements is
intentional.

To uniquely identify a data value in a DXF data value set you have to
give both category option combo and data element, e.g. like this:

<dataValueSet dataSet="..." organisationUnit="..." period="...">
  <dataValue dataElement="Qwx59CAvdUy" categoryOptionCombo="pvO9TkTgA7C">
  <dataValue dataElement="aKV3XGrptar" categoryOptionCombo="pvO9TkTgA7C">
</dataValueSet>

which will exchange data values for:

Tetanus Immunization Dose 1, Pregnant woman
Tetanus Immunization Dose 2, Pregnant woman

Let me know if this clarified it :wink:

Lars

Hi Lars, that is spot on, it answers my question.

Thanks,

···

On 7/2/12, Lars Helge Øverland <larshelge@gmail.com> wrote:

Hi Sam,

okay.. What you see is actually correct. The idea is that category
option combos are common and re-used across data elements. So having
the same category option combo identifier for various data elements is
intentional.

To uniquely identify a data value in a DXF data value set you have to
give both category option combo and data element, e.g. like this:

<dataValueSet dataSet="..." organisationUnit="..." period="...">
  <dataValue dataElement="Qwx59CAvdUy" categoryOptionCombo="pvO9TkTgA7C">
  <dataValue dataElement="aKV3XGrptar" categoryOptionCombo="pvO9TkTgA7C">
</dataValueSet>

which will exchange data values for:

Tetanus Immunization Dose 1, Pregnant woman
Tetanus Immunization Dose 2, Pregnant woman

Let me know if this clarified it :wink:

Lars

--
Sent from my mobile device