Creating a calculated field

rmishler100 wrote on Saturday, May 26, 2012:

How do I add a calculated field to a form? I am capturing the child’s date of birth but it would be helpful to our doctors if we could also show the child’s age. I would need to calculate the age based on the previously captured DOB.
Thanks for your help.

juggernautsei wrote on Saturday, May 26, 2012:

Could you explain where you want this calculation to be done? The system already shows the age of the child in the header information about the patient. Do you want to show this somewhere else?

rmishler100 wrote on Saturday, May 26, 2012:

Juggernautsei, thanks for the reply. I had not noticed the information in the header. That should be sufficient. I will wait to see if the Docs need something more.
Thanks for your help.

wjbaptis wrote on Thursday, August 01, 2013:

IS there a way to create calculated fields in forms? Once the user enters a value, another field is auto-populated with some user-defined formula. hanks.

yehster wrote on Thursday, August 01, 2013:

This is generally accomplished with javascript. If you need an example, take a look at form_vitals and see how the BMI is computed and populated based on the contents of the height and weight fields.

I had a programmer modify 4 files: options.inc.php, demographics_full.php,
download_template.php, new_comprehensive.php. Contact me by message to arrange something.

I tried to find the Javascript with no success. I need the system to add and substract in order to calculate the liquid balance. Any suggestion?