Menu

Age in the format year-month-day in LB forms

2015-12-14
2015-12-14
  • Joel Erickson

    Joel Erickson - 2015-12-14

    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

     
  • fsgl

    fsgl - 2015-12-14

    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.

     
  • Joel Erickson

    Joel Erickson - 2015-12-14

    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.

     
  • Rod Roark

    Rod Roark - 2015-12-14

    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/

     
  • Joel Erickson

    Joel Erickson - 2015-12-14

    OK. I'll have a go at it and send you what I come up with!

     

Log in to post a comment.