← Back to team overview

dhis2-users team mailing list archive

Re: Issue importing CSV with categoryoptioncombos

 

Hi Randy,
The CSV file looks a little funky to me. It looks like you are using the
internal IDs (not the UIDs). Likely what you will need is a transformation
mapping of how to get between your source instance and your destination
instance. This may involve mapping source data element UIDs to target data
elements IDs and source category combo options to target category option
combos.

As a trivial example, lets suppose you have

"Number of people males tested for malaria"  and "Number of females tested
for malaria", both with default category combos in your source system. In
the target system you have "Number of persons tested for malaria" with
"Male" and "Female" as category combo options. You would therefore need to
map your source data elements to the target data elements (in this case, a
single one) and your source category combo options (default) to two
category combo options.

Of course, there could be more complex transformations, such as combining
certain source data elements/category combo options into different targets
ones, but should also be possible, for instance by creating indicators in
your source system, and effectively treating these as data elements in the
target system. We have used this approach to map between different sources
and targets, and it is generally effective, but obviously, with a sort of
ETL-glue in between.


Regards,
Jason



On Tue, Feb 18, 2014 at 3:06 PM, Wilson,Randy <rwilson@xxxxxxx> wrote:

>  I'm moving data between instances of DHIS-2 (from the HMIS to the Data
> Warehouse with a subset of data elements).
>
>
>
> Since the dataelementids and orgunitides are not always the same in the
> two systems, I'm using the code fields for those.  I've set up a query to
> provide the data I need with one exception: if the categoryoptioncomboids
> are not default, I need to find the id in the *destination* system.
>
>
>
> Would it not be possible to use the categoryoptioncomboname during import,
> since there is no code field for categoryoptioncombos...a file that is
> autogenerated?
>
>
>
> Here is a sample of the CSV: (I've added the categoryoptioncombo field to
> illustrate the issue).
>
>
>
>
> "dataelement";"period";"orgunit";"categoryoptioncomboid";"categoryoptioncombo";"value"
>
> "8942";"201312";"573";"14";"(default)";"24"
>
> "8942";"201312";"94";"14";"(default)";"34"
>
> "8942";"201312";"433";"14";"(default)";"23"
>
> "8942";"201312";"96";"14";"(default)";"30"
>
> "8942";"201312";"266";"14";"(default)";"30"
>
> "8942";"201312";"310";"14";"(default)";"20"
>
> "8222";"201311";"384";"297";"(0-11 months)";"118"
>
> "8222";"201311";"370";"297";"(0-11 months)";"15"
>
> "8222";"201311";"155";"297";"(0-11 months)";"56"
>
> "8222";"201311";"158";"297";"(0-11 months)";"46"
>
>
>
> We move data across to the data warehouse each month, so I'd like to make
> the process as simple as possible.
>
>
>
> Does anyone have a suggestion?
>
>
>
>
>
> *Randy Wilson*
>
> Senior HMIS and Data Use Advisor, Ministry of Health/Rwanda
>
> Integrated Health Systems Strengthening Project
>
> Management Sciences for Health, Inc. (MSH)
>
> BP 371
> Kigali, Rwanda
> +250-788308835
>
> Skype Name (wilsonrandy_us)
>
> www.msh.org<http://www.msh.org/?utm_source=2012-10-15+MSH+internal+announce+email+signature&utm_campaign=iemailsig&utm_medium=email>
>
>
> [image: Description:
> http://ih.constantcontact.com/fs017/1102482301888/img/438.gif]<http://www.msh.org/?utm_source=2012-10-15+MSH+internal+announce+email+signature&utm_campaign=iemailsig&utm_medium=email>
>
> *Stronger health systems. Greater health impact.*
>
> [image: Description: Follow MSH on Facebook]<http://www.facebook.com/ManagementSciencesForHealth>[image:
> Description: Follow MSH on Twitter]<https://twitter.com/#%21/MSHHealthImpact>[image:
> Description: YouTube] <http://www.youtube.com/mshhealthimpact>Follow us
> on Facebook and Twitter
>
>
>
> _______________________________________________
> 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
>
>

PNG image

GIF image

GIF image

PNG image


References