I would like age calculated from the DOB in an Layout Based Form to display as Year-Month-Day. I am using the "A" option with text-date data type and have the globals_locale set to display YMD. The global doesn't seem to affect calculated age in an LBF. I get age in years returned to the form. What can I do to get age in the YMD fomat in an LBF
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The code is in library/options.inc.php. But don't re-use option B, add a new option... that way you can contribute your change instead of solving just one person's problem in a way that has to re-applied after every upgrade.
I would like age calculated from the DOB in an Layout Based Form to display as Year-Month-Day. I am using the "A" option with text-date data type and have the globals_locale set to display YMD. The global doesn't seem to affect calculated age in an LBF. I get age in years returned to the form. What can I do to get age in the YMD fomat in an LBF
Options A & B provide age in years & gestational age in weeks & days respectively. See this.
For age in YMD, code change will be required. See GitHub link provided by Rod.
To display YMD in Patient Summary, see attached.
Thank you fsgl,
Did Rod provide a commit for that code change?
Do you know which .php file determines the age calculation? I'd like to change option B to return age in YMD instead of gestational.
The code is in library/options.inc.php. But don't re-use option B, add a new option... that way you can contribute your change instead of solving just one person's problem in a way that has to re-applied after every upgrade.
Rod
http://www.sunsetsystems.com/
OK. I'll have a go at it and send you what I come up with!