← Back to team overview

dhis2-devs team mailing list archive

Re: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 3466: Removed CalculatedDataElement

 

Hello Jason,

In this case, I think we have to make a store procedure or something like
this statement to convert from CDEs to Indicator as:

Declare @IndicatorTypeId;

Set @IndicatorTypeId = (Select indicatortypeid From IndicatorType Where
Indicatorfactor = 1);

INSERT INTO indicator (
            indicatorid, uuid, name, alternativename, shortname, code,
            description, annualized, indicatortypeid, numerator,
numeratordescription,
            numeratoraggregationtype, denominator, denominatordescription,
            denominatoraggregationtype, sortorder, url, lastupdated )
    (
        select de.dataelementid, de.uuid, de.name, de.alternativename,
de.shortname, de.code,
            de.description, false, *@IndicatorTypeId*, e.expression,
e.description,
            de.aggregationtype, null, null, de.aggregationtype, null,
de.url, de.lastupdated
            from dataelement de, calculateddataelement cde, expression e
            where (de.dataelementid = cde.calculateddataelementid) and
(cde.expressionid = e.expressionid
  ));

How to you think ?

On Mon, Apr 25, 2011 at 11:20 AM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:

>  Feeling like some spring cleaning on Easter, Lars?
>
> I am thinking if may be necessary to document how to convert CDEs to
> indicators. We have  a large number of them in , and recreation by hand will
> be very painful.
>
> It would seem that transferring of the "expression"
> from calculateddataelement to the "numerator" field of indicator would be
> feasible.
>
> The other thing I had thought before we hacked up the 1.4 code was to
> import 1.4 CDEs as indicators. This would seem to be feasible as well but
> would obviously require work.
>
> Any thoughts about how to convert CDEs to indicators, and if we are still
> going to maintain some level of backwards compatibility?
>
> Regards,
> Jason
>
>
>
-- 
Good health !

Follow ups

References