Aggregate indicators

Hi Devs
Is there a limit on the number of data elements that can be added in an indicator formula?
Regards,
JM

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars

···

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Hi,

Is there any possibility to use an indicator (identifier) in a formula of another indicator instead of using its formula?

Regards

Pramil

···

On Thu, Apr 28, 2016 at 12:10 PM, Lars Helge Øverland lars@dhis2.org wrote:

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Hi Pramil,

no, not currently.

Lars

···

On Thu, Apr 28, 2016 at 10:35 AM, Pramil Liyanage pramilcl@gmail.com wrote:

Hi,

Is there any possibility to use an indicator (identifier) in a formula of another indicator instead of using its formula?

Regards

Pramil

On Thu, Apr 28, 2016 at 12:10 PM, Lars Helge Øverland lars@dhis2.org wrote:

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

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

Pramil,

Do you have a SIGNIFICANT requirement for nested indicators - I mean beyond one or two random ones? Nested indicators were originally part of the DHIS 1.4 design all the way back in 2003, but it was complicated to implement and we never had a case where it was absolutely necessary, so it remained in the interface but with no code in the indicator engine to actually process them.

DHIS 1.4 do have calculated & saved data elements which would be a good option if your formulas contain too many data elements, but DHIS2 do not support that - it uses indicators for the same purpose, which without support for nested indicators won’t help you.

One workaround is to create a few “combo” data elements that represent a collection of data elements, and then use a script/query to populate it every x hours from your original source data elements. Those “combo” elements can then be used in indicators the normal way.

Regards

Calle

···

On 28 April 2016 at 10:38, Lars Helge Øverland lars@dhis2.org wrote:

Hi Pramil,

no, not currently.

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Thu, Apr 28, 2016 at 10:35 AM, Pramil Liyanage pramilcl@gmail.com wrote:

Hi,

Is there any possibility to use an indicator (identifier) in a formula of another indicator instead of using its formula?

Regards

Pramil


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

On Thu, Apr 28, 2016 at 12:10 PM, Lars Helge Øverland lars@dhis2.org wrote:

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org


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.hedberg@gmail.com

Skype: calle_hedberg


Hi Calle,

I have some aggregate forms which have tables with subtotals and grand totals. There is a big number. Had to use the primary elements in both indicators which will take up more memory.

Thanks

Pramil

···

On Thu, Apr 28, 2016 at 3:34 PM, Calle Hedberg calle.hedberg@gmail.com wrote:

Pramil,

Do you have a SIGNIFICANT requirement for nested indicators - I mean beyond one or two random ones? Nested indicators were originally part of the DHIS 1.4 design all the way back in 2003, but it was complicated to implement and we never had a case where it was absolutely necessary, so it remained in the interface but with no code in the indicator engine to actually process them.

DHIS 1.4 do have calculated & saved data elements which would be a good option if your formulas contain too many data elements, but DHIS2 do not support that - it uses indicators for the same purpose, which without support for nested indicators won’t help you.

One workaround is to create a few “combo” data elements that represent a collection of data elements, and then use a script/query to populate it every x hours from your original source data elements. Those “combo” elements can then be used in indicators the normal way.

Regards

Calle

On 28 April 2016 at 10:38, Lars Helge Øverland lars@dhis2.org wrote:

Hi Pramil,

no, not currently.

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@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.hedberg@gmail.com

Skype: calle_hedberg


On Thu, Apr 28, 2016 at 10:35 AM, Pramil Liyanage pramilcl@gmail.com wrote:

Hi,

Is there any possibility to use an indicator (identifier) in a formula of another indicator instead of using its formula?

Regards

Pramil


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

On Thu, Apr 28, 2016 at 12:10 PM, Lars Helge Øverland lars@dhis2.org wrote:

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Hi Lars

Thank you, I looked at the database and the interface and I didn’t see a limit imposed by either one. I have a formula that sums 410 data elements, I know that sounds impractical but that’s just the way it’s required.

When I build the formula, with ~300 data elements I get error #1, with the 400 I get error #2

Best regards,

JM

Error #1

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…cZiZ%7D%0A%2B%23%7BAV0dSekxPXl%7D%0A%2B%23%7BINM6uMXWoeK%7D%0A%0A%0A%0A%0A net::ERR_SPDY_PROTOCOL_ERRORsend @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

Error #2

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…eFqW%7D%0A%2B%23%7BePqg2GN87Ng%7D%0A%2B%23%7BFTrvVVBrdry%7D%0A%0A%0A%0A%0A 400 ()send @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

···

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Hi JM,

Sounds like a bug, but quite crazy to attempt as well!

Another way to do this, though perhaps not ideal, would be to perform this calculation through SQL and inject it back into the system as a data element. We have followed this approach for indicators which cannot be calculated with relatively simple formulas provided by indicators, such as those requiring “IF…THEN” types of calculations.

Not ideal, but it might be an approach you wish to consider.

Regards,

Jason

···

On Fri, Apr 29, 2016 at 3:24 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Lars
Thank you, I looked at the database and the interface and I didn’t see a limit imposed by either one. I have a formula that sums 410 data elements, I know that sounds impractical but that’s just the way it’s required.

When I build the formula, with ~300 data elements I get error #1, with the 400 I get error #2

Best regards,

JM

Error #1

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…cZiZ%7D%0A%2B%23%7BAV0dSekxPXl%7D%0A%2B%23%7BINM6uMXWoeK%7D%0A%0A%0A%0A%0A net::ERR_SPDY_PROTOCOL_ERRORsend @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

Error #2

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…eFqW%7D%0A%2B%23%7BePqg2GN87Ng%7D%0A%2B%23%7BFTrvVVBrdry%7D%0A%0A%0A%0A%0A 400 ()send @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

El 28/04/2016, a las 1:40 a.m., Lars Helge Øverland lars@dhis2.org escribió:

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Hi Jason

Good to hear form you, I hope you are well.

I agree, that is a good solution and it works very well when you implement it as a function you can call form a SQL View, then you can use the API to setup a cron job or use other means to take care of the frequency. There is a lot you can do with this approach.

I was also able to setup the indicator using the API, but we want to allow the user to create these indicators. Both SQL and the API are a little beyond what they can or want to do. I think the indicator editor is due for an face lift :wink: there are other things to consider, for example having 20K constants to choose from or formulas that requires a data element with an option combination that is not part of the category combination assigned to the data element.

Best regards,

JM

···

On Fri, Apr 29, 2016 at 3:24 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Lars
Thank you, I looked at the database and the interface and I didn’t see a limit imposed by either one. I have a formula that sums 410 data elements, I know that sounds impractical but that’s just the way it’s required.

When I build the formula, with ~300 data elements I get error #1, with the 400 I get error #2

Best regards,

JM

Error #1

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…cZiZ%7D%0A%2B%23%7BAV0dSekxPXl%7D%0A%2B%23%7BINM6uMXWoeK%7D%0A%0A%0A%0A%0A net::ERR_SPDY_PROTOCOL_ERRORsend @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

Error #2

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…eFqW%7D%0A%2B%23%7BePqg2GN87Ng%7D%0A%2B%23%7BFTrvVVBrdry%7D%0A%0A%0A%0A%0A 400 ()send @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

El 28/04/2016, a las 1:40 a.m., Lars Helge Øverland lars@dhis2.org escribió:

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Hey Juan,

I’m open to suggestions on how to improve the usability of the indicator editor :slight_smile: I think if you could come up with some things you would like to see changed i can see what i can do.

20k constants sounds like something that would need searchable constants (which it currently doesn’t support iirc). Your knowledge of how it is used is obviously greater than mine, so if you have any ideas on how it could/would work better, feel free to share them and then i can see what we can do here to improve that.

Basically please supply a wishlist, but no guarantees for presents :wink: (things that i can do with the current API are more easily achievable than things that need server side work)

Regards,

Mark

···

On Fri, Apr 29, 2016 at 5:31 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Jason
Good to hear form you, I hope you are well.

I agree, that is a good solution and it works very well when you implement it as a function you can call form a SQL View, then you can use the API to setup a cron job or use other means to take care of the frequency. There is a lot you can do with this approach.

I was also able to setup the indicator using the API, but we want to allow the user to create these indicators. Both SQL and the API are a little beyond what they can or want to do. I think the indicator editor is due for an face lift :wink: there are other things to consider, for example having 20K constants to choose from or formulas that requires a data element with an option combination that is not part of the category combination assigned to the data element.

Best regards,

JM

El 29/04/2016, a las 8:30 a.m., Jason Pickering jason.p.pickering@gmail.com escribió:

Hi JM,

Sounds like a bug, but quite crazy to attempt as well!

Another way to do this, though perhaps not ideal, would be to perform this calculation through SQL and inject it back into the system as a data element. We have followed this approach for indicators which cannot be calculated with relatively simple formulas provided by indicators, such as those requiring “IF…THEN” types of calculations.

Not ideal, but it might be an approach you wish to consider.

Regards,

Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Fri, Apr 29, 2016 at 3:24 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Lars
Thank you, I looked at the database and the interface and I didn’t see a limit imposed by either one. I have a formula that sums 410 data elements, I know that sounds impractical but that’s just the way it’s required.

When I build the formula, with ~300 data elements I get error #1, with the 400 I get error #2

Best regards,

JM

Error #1

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…cZiZ%7D%0A%2B%23%7BAV0dSekxPXl%7D%0A%2B%23%7BINM6uMXWoeK%7D%0A%0A%0A%0A%0A net::ERR_SPDY_PROTOCOL_ERRORsend @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

Error #2

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…eFqW%7D%0A%2B%23%7BePqg2GN87Ng%7D%0A%2B%23%7BFTrvVVBrdry%7D%0A%0A%0A%0A%0A 400 ()send @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

El 28/04/2016, a las 1:40 a.m., Lars Helge Øverland lars@dhis2.org escribió:

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Regards,

Mark Polak

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

mark@dhis2.org

Thanks Mark

When I mentioned the need of a face lift for the editor, I was looking at the interface in 2.21 (20997), which is the version where I see the errors creating the indicator, sorry I forgot to mention that small bit of info :wink:

Best regards,

JM

···

On Fri, Apr 29, 2016 at 5:31 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Jason
Good to hear form you, I hope you are well.

I agree, that is a good solution and it works very well when you implement it as a function you can call form a SQL View, then you can use the API to setup a cron job or use other means to take care of the frequency. There is a lot you can do with this approach.

I was also able to setup the indicator using the API, but we want to allow the user to create these indicators. Both SQL and the API are a little beyond what they can or want to do. I think the indicator editor is due for an face lift :wink: there are other things to consider, for example having 20K constants to choose from or formulas that requires a data element with an option combination that is not part of the category combination assigned to the data element.

Best regards,

JM

El 29/04/2016, a las 8:30 a.m., Jason Pickering jason.p.pickering@gmail.com escribió:

Hi JM,

Sounds like a bug, but quite crazy to attempt as well!

Another way to do this, though perhaps not ideal, would be to perform this calculation through SQL and inject it back into the system as a data element. We have followed this approach for indicators which cannot be calculated with relatively simple formulas provided by indicators, such as those requiring “IF…THEN” types of calculations.

Not ideal, but it might be an approach you wish to consider.

Regards,

Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Fri, Apr 29, 2016 at 3:24 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Lars
Thank you, I looked at the database and the interface and I didn’t see a limit imposed by either one. I have a formula that sums 410 data elements, I know that sounds impractical but that’s just the way it’s required.

When I build the formula, with ~300 data elements I get error #1, with the 400 I get error #2

Best regards,

JM

Error #1

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…cZiZ%7D%0A%2B%23%7BAV0dSekxPXl%7D%0A%2B%23%7BINM6uMXWoeK%7D%0A%0A%0A%0A%0A net::ERR_SPDY_PROTOCOL_ERRORsend @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

Error #2

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…eFqW%7D%0A%2B%23%7BePqg2GN87Ng%7D%0A%2B%23%7BFTrvVVBrdry%7D%0A%0A%0A%0A%0A 400 ()send @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

El 28/04/2016, a las 1:40 a.m., Lars Helge Øverland lars@dhis2.org escribió:

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org

Regards,

Mark Polak

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

mark@dhis2.org

Hi,

I also faced a similar situation when I tried to create an indicator using expressions from two other indicators. I think it comes when a limit is exceeded. It displays expression error and stops working. Could be a bug.

Regards

Pramil

···

On Sat, Apr 30, 2016 at 7:41 AM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Thanks Mark
When I mentioned the need of a face lift for the editor, I was looking at the interface in 2.21 (20997), which is the version where I see the errors creating the indicator, sorry I forgot to mention that small bit of info :wink:

Best regards,

JM

El 29/04/2016, a las 10:42 a.m., Mark Polak mark@dhis2.org escribió:

Hey Juan,

I’m open to suggestions on how to improve the usability of the indicator editor :slight_smile: I think if you could come up with some things you would like to see changed i can see what i can do.

20k constants sounds like something that would need searchable constants (which it currently doesn’t support iirc). Your knowledge of how it is used is obviously greater than mine, so if you have any ideas on how it could/would work better, feel free to share them and then i can see what we can do here to improve that.

Basically please supply a wishlist, but no guarantees for presents :wink: (things that i can do with the current API are more easily achievable than things that need server side work)

Regards,

Mark


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Fri, Apr 29, 2016 at 5:31 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Jason
Good to hear form you, I hope you are well.

I agree, that is a good solution and it works very well when you implement it as a function you can call form a SQL View, then you can use the API to setup a cron job or use other means to take care of the frequency. There is a lot you can do with this approach.

I was also able to setup the indicator using the API, but we want to allow the user to create these indicators. Both SQL and the API are a little beyond what they can or want to do. I think the indicator editor is due for an face lift :wink: there are other things to consider, for example having 20K constants to choose from or formulas that requires a data element with an option combination that is not part of the category combination assigned to the data element.

Best regards,

JM

El 29/04/2016, a las 8:30 a.m., Jason Pickering jason.p.pickering@gmail.com escribió:

Hi JM,

Sounds like a bug, but quite crazy to attempt as well!

Another way to do this, though perhaps not ideal, would be to perform this calculation through SQL and inject it back into the system as a data element. We have followed this approach for indicators which cannot be calculated with relatively simple formulas provided by indicators, such as those requiring “IF…THEN” types of calculations.

Not ideal, but it might be an approach you wish to consider.

Regards,

Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Regards,

Mark Polak

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

mark@dhis2.org

On Fri, Apr 29, 2016 at 3:24 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Lars
Thank you, I looked at the database and the interface and I didn’t see a limit imposed by either one. I have a formula that sums 410 data elements, I know that sounds impractical but that’s just the way it’s required.

When I build the formula, with ~300 data elements I get error #1, with the 400 I get error #2

Best regards,

JM

Error #1

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…cZiZ%7D%0A%2B%23%7BAV0dSekxPXl%7D%0A%2B%23%7BINM6uMXWoeK%7D%0A%0A%0A%0A%0A net::ERR_SPDY_PROTOCOL_ERRORsend @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

Error #2

jquery.min.js?_rev=20997:2 GET https://test-data.ippf.org/api/expressions/description?expression=%23%7BcIm…eFqW%7D%0A%2B%23%7BePqg2GN87Ng%7D%0A%2B%23%7BFTrvVVBrdry%7D%0A%0A%0A%0A%0A 400 ()send @ jquery.min.js?_rev=20997:2p.extend.ajax @ jquery.min.js?_rev=20997:2getExpressionText @ expressionBuilder.js?_rev=20997:82cleanExpression @ expressionBuilder.js?_rev=20997:111onchange @ showUpdateIndicatorForm.action?id=65566:584

El 28/04/2016, a las 1:40 a.m., Lars Helge Øverland lars@dhis2.org escribió:

Hi JM,

there is no hard limit (beyond 2gb expression length;).

However data analytics performance (and entry forms if you have indicators there) will of course suffer with extremely large indicators.

regards,

Lars


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

On Wed, Apr 27, 2016 at 11:44 PM, Juan Manuel Alcantara Acosta jmalcantara1@gmail.com wrote:

Hi Devs

Is there a limit on the number of data elements that can be added in an indicator formula?

Regards,

JM


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

http://www.dhis2.org