Re: [Dhis2-users] [Dhis2-devs] Program indicators export to another system

2018-02-05 Thread Knut Staring
Agree very much on having a GUI/app for mapping.

For example, I am currently setting up an instance with simplified
geometries for the whole world based on GADM - with the hierarchy down to
admin level 1, 2, 3, 4 created based on the shapefiles and using the codes
from GADM for admin1 and admin2

It would then be great to be able to link the GADM orgunits with
names/codes used by existing MoH data collection setups (whether Excel,
Access, DHIS2 or other). Would be good to preserve the mapping for later
also, perhaps as an attribute.

On a side note, I heard that someone created an app which can import such
mapping between a shapefile and an exciting orgunit hierarchy in Excel,
which is also not a bad solution.

Knut

On Mon, Feb 5, 2018 at 11:02 AM, Calle Hedberg 
wrote:

> Knut
>
> I did that for IDSR/Malaria in order to "map" local IDSR program
> indicators to the WHO aggregated malaria data elements.
>
> It is, frankly, a painful and "expert" approach to the problem, and in my
> opinion very difficult to maintain.
>
> The presumably simplest solution is to expand the "Data Value Set"
> download option under the pivot table app to incorporate the optional use
> of CODES or NAMES. While some might argue that using the same code or name
> for a Program Indicator as for an aggregated data element is not "purist",
> it should work.
>
> A more sophisticated solution that would be useful for any type of data
> import is to introduce data element and organisationunit "mapping" during
> import - similar functionality has been available in DHIS v1 since time
> immemorial.
>
> Users can then define/store/use two lookup field values: uid (or
> code/name) INCOMING, and uid (or code/name) IMPORTING. So incoming
> uid/code/name will automatically be replaced by the equivalent/correct
> value before the system start POSTing records.
>
> Regards
> Calle
>
> On 1 February 2018 at 18:07, Knut Staring  wrote:
>
>> Hi Elmarie,
>>
>> This is an important issue, and I expect others will have a better
>> answer, but one approach could perhaps be to replace the UID for the
>> Programme Indicators with the desired data element UID. I suppose that
>> would have to be done either directly in the database or through the API,
>> but if it were to be a recommended way to link databases it should also be
>> possibly to do this kind of mapping through the user interface
>>
>> Knut
>>
>> On Thu, Feb 1, 2018 at 4:59 PM, Elmarie Claasen  wrote:
>>
>>> Hi all,
>>>
>>> Any response to this question?
>>>
>>> Regards
>>>
>>> Elmarie
>>>
>>> On 30 Jan 2018 12:11, "Elmarie Claasen"  wrote:
>>>
 Hi all,



 We create Programme Indicators and would like to export those to other
 systems with different data element UIDs than the created Programme
 Indicator UID.

 If adding a code to the Programme Indicator which is same as the Data
 Element code will this allow matching on import?



 Regards,



 *Elmarie Claasen*

 [image: Hisp logo]

 Project Manager

 Health Information Systems Program

 Tel:  041-367 1027

 Cell: 082 374 2209

 E-mail: elma...@hisp.org

 Skype:  elmarie.claasen52



>>>
>>> *This message and any attachments are subject to a disclaimer published
>>> at http://www.hisp.org/policies.html#comms_disclaimer
>>> .  Please read the
>>> disclaimer before opening any attachment or taking any other action in
>>> terms of this electronic transmission.  If you cannot access the
>>> disclaimer, kindly send an email to disclai...@hisp.org
>>>  and a copy will be provided to you. By replying to
>>> this e-mail or opening any attachment you agree to be bound by the
>>> provisions of the disclaimer.*
>>>
>>> ___
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to : dhis2-d...@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>>
>> Department of Information, Evidence and Research
>> World Health Organization, Geneva, Switzerland
>> Office: +41 22 791 3683 <+41%2022%20791%2036%2083> Mob1: +33 6 4434 2931
>> <+33%206%2044%2034%2029%2031> Mob2: +47 9188 0522
>> Skype: knutstar
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-d...@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
>
> ***
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
> 
>
> Tel/fax (home): +27-21-685-6472 

Re: [Dhis2-users] [Dhis2-devs] Program indicators export to another system

2018-02-05 Thread Aaron C White
Elmarie,

The devs might correct me, but I don't think that the code import scheme
would account for different data element ids since the import tool would be
trying to match a code for the programIndicator itself and not the
configured expression or filter.

I ran into this problem last year and did not have the ability to control
the source server, but I had API access to read metadata configuration.  If
you are familiar with a scripting language, you could create a set of
key/value pairs where the key is the existing ID from your source system
and the new ID in the destination system.  Get the programIndicators in
JSON/XML format via the API.  Then for each unique pair, recursively search
through the metadata for the key (source UID) and replace with the value
(destination UID) wherever found using a regex-like function. It can be
slow if you're dealing with a large configuration but ensures that you
don't miss an association somewhere that you forgot to explicitly code.

For just programIndicators, you would want to at least check the expression
and the filter attributes for the IDs in question.  Since it sounds like
you have the same configuration but different ID values, you also would
want to confirm that the programStage IDs are also correctly mapped.  In
the programIndicator construction you would see this as #{programStageId.
dataElementId}.

When I did this, I stored the source server UIDs in the code attribute of
my destination server since we were not using that field as a way to
persist the "map" between the two systems.  As Calle said, this whole
process is certainly an "expert" level approach and can degrade over time
if your source server changes metadata configuration. The proposed
SOURCE/DESTINATION mapping using the existing import tool would be great,
but still would require maintenance if the configuration changes (if you're
trying to maintain a matching configuration).

Otherwise, you would need to replace the references via the UI, but that
probably wouldn't be a great plan if you have to update more than one or
two.

Aaron


--
Aaron C. White
919.522.5585

On Thu, Feb 1, 2018 at 11:07 AM, Knut Staring  wrote:

> Hi Elmarie,
>
> This is an important issue, and I expect others will have a better answer,
> but one approach could perhaps be to replace the UID for the Programme
> Indicators with the desired data element UID. I suppose that would have to
> be done either directly in the database or through the API, but if it were
> to be a recommended way to link databases it should also be possibly to do
> this kind of mapping through the user interface
>
> Knut
>
> On Thu, Feb 1, 2018 at 4:59 PM, Elmarie Claasen  wrote:
>
>> Hi all,
>>
>> Any response to this question?
>>
>> Regards
>>
>> Elmarie
>>
>> On 30 Jan 2018 12:11, "Elmarie Claasen"  wrote:
>>
>>> Hi all,
>>>
>>>
>>>
>>> We create Programme Indicators and would like to export those to other
>>> systems with different data element UIDs than the created Programme
>>> Indicator UID.
>>>
>>> If adding a code to the Programme Indicator which is same as the Data
>>> Element code will this allow matching on import?
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> *Elmarie Claasen*
>>>
>>> [image: Hisp logo]
>>>
>>> Project Manager
>>>
>>> Health Information Systems Program
>>>
>>> Tel:  041-367 1027
>>>
>>> Cell: 082 374 2209
>>>
>>> E-mail: elma...@hisp.org
>>>
>>> Skype:  elmarie.claasen52
>>>
>>>
>>>
>>
>> *This message and any attachments are subject to a disclaimer published
>> at http://www.hisp.org/policies.html#comms_disclaimer
>> .  Please read the
>> disclaimer before opening any attachment or taking any other action in
>> terms of this electronic transmission.  If you cannot access the
>> disclaimer, kindly send an email to disclai...@hisp.org
>>  and a copy will be provided to you. By replying to
>> this e-mail or opening any attachment you agree to be bound by the
>> provisions of the disclaimer.*
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-d...@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Knut Staring
>
> Department of Information, Evidence and Research
> World Health Organization, Geneva, Switzerland
> Office: +41 22 791 3683 <+41%2022%20791%2036%2083> Mob1: +33 6 4434 2931
> <+33%206%2044%2034%2029%2031> Mob2: +47 9188 0522
> Skype: knutstar
>
> ___
> 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
>
>
___
Mailing list: https://launchpad.net/~dhis2-users
Post to : 

Re: [Dhis2-users] [Dhis2-devs] Program indicators export to another system

2018-02-05 Thread Calle Hedberg
Knut

I did that for IDSR/Malaria in order to "map" local IDSR program indicators
to the WHO aggregated malaria data elements.

It is, frankly, a painful and "expert" approach to the problem, and in my
opinion very difficult to maintain.

The presumably simplest solution is to expand the "Data Value Set" download
option under the pivot table app to incorporate the optional use of CODES
or NAMES. While some might argue that using the same code or name for a
Program Indicator as for an aggregated data element is not "purist", it
should work.

A more sophisticated solution that would be useful for any type of data
import is to introduce data element and organisationunit "mapping" during
import - similar functionality has been available in DHIS v1 since time
immemorial.

Users can then define/store/use two lookup field values: uid (or code/name)
INCOMING, and uid (or code/name) IMPORTING. So incoming uid/code/name will
automatically be replaced by the equivalent/correct value before the system
start POSTing records.

Regards
Calle

On 1 February 2018 at 18:07, Knut Staring  wrote:

> Hi Elmarie,
>
> This is an important issue, and I expect others will have a better answer,
> but one approach could perhaps be to replace the UID for the Programme
> Indicators with the desired data element UID. I suppose that would have to
> be done either directly in the database or through the API, but if it were
> to be a recommended way to link databases it should also be possibly to do
> this kind of mapping through the user interface
>
> Knut
>
> On Thu, Feb 1, 2018 at 4:59 PM, Elmarie Claasen  wrote:
>
>> Hi all,
>>
>> Any response to this question?
>>
>> Regards
>>
>> Elmarie
>>
>> On 30 Jan 2018 12:11, "Elmarie Claasen"  wrote:
>>
>>> Hi all,
>>>
>>>
>>>
>>> We create Programme Indicators and would like to export those to other
>>> systems with different data element UIDs than the created Programme
>>> Indicator UID.
>>>
>>> If adding a code to the Programme Indicator which is same as the Data
>>> Element code will this allow matching on import?
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> *Elmarie Claasen*
>>>
>>> [image: Hisp logo]
>>>
>>> Project Manager
>>>
>>> Health Information Systems Program
>>>
>>> Tel:  041-367 1027
>>>
>>> Cell: 082 374 2209
>>>
>>> E-mail: elma...@hisp.org
>>>
>>> Skype:  elmarie.claasen52
>>>
>>>
>>>
>>
>> *This message and any attachments are subject to a disclaimer published
>> at http://www.hisp.org/policies.html#comms_disclaimer
>> .  Please read the
>> disclaimer before opening any attachment or taking any other action in
>> terms of this electronic transmission.  If you cannot access the
>> disclaimer, kindly send an email to disclai...@hisp.org
>>  and a copy will be provided to you. By replying to
>> this e-mail or opening any attachment you agree to be bound by the
>> provisions of the disclaimer.*
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-d...@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Knut Staring
>
> Department of Information, Evidence and Research
> World Health Organization, Geneva, Switzerland
> Office: +41 22 791 3683 <+41%2022%20791%2036%2083> Mob1: +33 6 4434 2931
> <+33%206%2044%2034%2029%2031> Mob2: +47 9188 0522
> Skype: knutstar
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-d...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 

***

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedb...@gmail.com

Skype: calle_hedberg

***
___
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


Re: [Dhis2-users] [Dhis2-devs] Program indicators export to another system

2018-02-01 Thread Knut Staring
Hi Elmarie,

This is an important issue, and I expect others will have a better answer,
but one approach could perhaps be to replace the UID for the Programme
Indicators with the desired data element UID. I suppose that would have to
be done either directly in the database or through the API, but if it were
to be a recommended way to link databases it should also be possibly to do
this kind of mapping through the user interface

Knut

On Thu, Feb 1, 2018 at 4:59 PM, Elmarie Claasen  wrote:

> Hi all,
>
> Any response to this question?
>
> Regards
>
> Elmarie
>
> On 30 Jan 2018 12:11, "Elmarie Claasen"  wrote:
>
>> Hi all,
>>
>>
>>
>> We create Programme Indicators and would like to export those to other
>> systems with different data element UIDs than the created Programme
>> Indicator UID.
>>
>> If adding a code to the Programme Indicator which is same as the Data
>> Element code will this allow matching on import?
>>
>>
>>
>> Regards,
>>
>>
>>
>> *Elmarie Claasen*
>>
>> [image: Hisp logo]
>>
>> Project Manager
>>
>> Health Information Systems Program
>>
>> Tel:  041-367 1027
>>
>> Cell: 082 374 2209
>>
>> E-mail: elma...@hisp.org
>>
>> Skype:  elmarie.claasen52
>>
>>
>>
>
> *This message and any attachments are subject to a disclaimer published at
> http://www.hisp.org/policies.html#comms_disclaimer
> .  Please read the
> disclaimer before opening any attachment or taking any other action in
> terms of this electronic transmission.  If you cannot access the
> disclaimer, kindly send an email to disclai...@hisp.org
>  and a copy will be provided to you. By replying to
> this e-mail or opening any attachment you agree to be bound by the
> provisions of the disclaimer.*
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-d...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar
___
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


Re: [Dhis2-users] [Dhis2-devs] Program Indicators

2016-08-03 Thread Elmarie Claasen
Hi David,

You can add your calculation string at the bottom where the attribute is
available and then just cut and paste it to the top. Hope that helps.

Elmarie

On 03 Aug 2016 19:30, "David Muturi"  wrote:

>  Hi,
> I am creating some program indicators to calculate age from date of birth
> for a child. The date of birth is an attribute. However when I get to the
> attributes tab for the expression non of the attributes are showing (See
> ScreenShot). The attributes are however displayed in the filters section.
> Any one with an idea why this is the case.
>
> On a separate note the label for program indicator details has a trailing
> "sadasd" (see attachment)
>
> rgds
> David
>
> ___
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to : dhis2-d...@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

-- 


*This message and any attachments are subject to a disclaimer published at 
http://www.hisp.org/policies.html#comms_disclaimer 
.  Please read the 
disclaimer before opening any attachment or taking any other action in 
terms of this electronic transmission.  If you cannot access the 
disclaimer, kindly send an email to disclai...@hisp.org 
 and a copy will be provided to you. By replying to 
this e-mail or opening any attachment you agree to be bound by the 
provisions of the disclaimer.*
___
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


Re: [Dhis2-users] [Dhis2-devs] Program Indicators

2016-08-03 Thread David Muturi
Hi Elmarie,
Many thanks for this great work around, I will try it out. Hopefully a fix
will be out soon because I dont think it was intended to work this.
rgds
David
On 4 Aug 2016 08:06, "Elmarie Claasen"  wrote:

> Hi David,
>
> You can add your calculation string at the bottom where the attribute is
> available and then just cut and paste it to the top. Hope that helps.
>
> Elmarie
>
> On 03 Aug 2016 19:30, "David Muturi"  wrote:
>
>>  Hi,
>> I am creating some program indicators to calculate age from date of birth
>> for a child. The date of birth is an attribute. However when I get to the
>> attributes tab for the expression non of the attributes are showing (See
>> ScreenShot). The attributes are however displayed in the filters section.
>> Any one with an idea why this is the case.
>>
>> On a separate note the label for program indicator details has a trailing
>> "sadasd" (see attachment)
>>
>> rgds
>> David
>>
>> ___
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-d...@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> *This message and any attachments are subject to a disclaimer published at
> http://www.hisp.org/policies.html#comms_disclaimer
> .  Please read the
> disclaimer before opening any attachment or taking any other action in
> terms of this electronic transmission.  If you cannot access the
> disclaimer, kindly send an email to disclai...@hisp.org
>  and a copy will be provided to you. By replying to
> this e-mail or opening any attachment you agree to be bound by the
> provisions of the disclaimer.*
>
___
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