Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-08 Thread Robin Martens
that work? Thanks a lot! Robin From: Pamod Amarakoon [mailto:pam...@gmail.com] Sent: 02 September 2014 06:54 To: Ngoc Thanh Nguyen Cc: dhis2-devs; Robin Martens; DHIS 2 Users list; Jason Pickering Subject: Re: [Dhis2-devs] Auto-calculated data in entry forms Hi, Thanks a lot. In fact I'm

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-02 Thread Ngoc Thanh Nguyen
great. surprised that a medical doctor can write that code. if you turn it to jquery it is much easier. anyway, its fine for now On Sep 2, 2014 11:54 AM, Pamod Amarakoon pam...@gmail.com wrote: Hi, Thanks a lot. In fact I'm a medical doctor and have limited knowledhe in Javascript. I managed

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-02 Thread Pamod Amarakoon
Hi, Thanx. Is jquery available inside data entry form on the fly or has to link it separately to outside library. On Tue, Sep 2, 2014 at 12:31 PM, Ngoc Thanh Nguyen thanh.hispviet...@gmail.com wrote: great. surprised that a medical doctor can write that code. if you turn it to jquery it

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-02 Thread Ngoc Thanh Nguyen
Hi it is already inside dhis2 (for every dhis2 page). no need for external import Thanh On Tue, Sep 2, 2014 at 2:17 PM, Pamod Amarakoon pam...@gmail.com wrote: Hi, Thanx. Is jquery available inside data entry form on the fly or has to link it separately to outside library. On Tue,

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-02 Thread Pamod Amarakoon
Ook. Thanx :) On Tue, Sep 2, 2014 at 2:02 PM, Ngoc Thanh Nguyen thanh.hispviet...@gmail.com wrote: Hi it is already inside dhis2 (for every dhis2 page). no need for external import Thanh On Tue, Sep 2, 2014 at 2:17 PM, Pamod Amarakoon pam...@gmail.com wrote: Hi, Thanx. Is jquery

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-02 Thread Robin Martens
Thanks for the input. I'll have a look at jQuery then! Regards, Robin From: Pamod Amarakoon [mailto:pam...@gmail.com] Sent: 02 September 2014 10:54 To: Ngoc Thanh Nguyen Cc: dhis2-devs; Robin Martens; Jason Pickering; DHIS 2 Users list Subject: Re: [Dhis2-devs] Auto-calculated data in entry

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-01 Thread Jason Pickering
Hi Robin, You can simply use an indicator to do this. In case you have not seen it, we have extensive documentation on the use of indicators here https://www.dhis2.org/doc/snapshot/en/user/html/ch13.html#indicator_maintenance It should also be possible to calculate the value from other data,

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-01 Thread Robin Martens
in the calculation of other indicators.) Can you confirm? Kind regards, Robin From: Jason Pickering [mailto:jason.p.picker...@gmail.com] Sent: 01 September 2014 18:15 To: Robin Martens Cc: Lars Helge Ă˜verland; DHIS 2 Developers list; DHIS 2 Users list Subject: Re: [Dhis2-devs] Auto-calculated data in entry forms

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-01 Thread Ngoc Thanh Nguyen
Hi I believe the calculated data value (now as indicator) can only be seen after an aggregation is run. In addition, in some forms in some countries like VN, auto-calculated data elements some time can be input by users. In VN, we use Javascript to achieve this. However, it is quite complicated.

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-01 Thread Pamod Amarakoon
I'd like to add something to this. For example, if we have a data entry form (BMI) for a program stage if we have height and weight input boxes/data elements is there a way to calculate BMI? is it only possible by using javascript/webapp On Mon, Sep 1, 2014 at 10:21 PM, Ngoc Thanh Nguyen

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-01 Thread Ngoc Thanh Nguyen
yes you can use custom data entry form and add some js script like onchange event on weight and height. the event handler should then calculate the bmi and update the text field bmi. do you have any technical person to do this? if not give me your account i can help On Sep 2, 2014 12:26 AM,

Re: [Dhis2-devs] Auto-calculated data in entry forms

2014-09-01 Thread Pamod Amarakoon
Hi, Thanks a lot. In fact I'm a medical doctor and have limited knowledhe in Javascript. I managed to get it done with following javascript I created. height enterd in cm and weight in kg. script type=text/javascript function updateBMI() { var ht = document.getElementById(HeightID-val).value;