Showing posts with label visit. Show all posts
Showing posts with label visit. Show all posts

Sunday, February 12, 2012

Calculating Age based on Document Date in months

Hi, I'm trying to write a formula that will calculate a patient's age based on the visit date and then converting it into months. Anyone know how to do that?
The variables would be:
{DOCUMENT.CLINICALDATE}
{PERSON.DATEOFBIRTH}The next will calculate age in years
({DOCUMENT.CLINICALDATE} - {PERSON.DATEOFBIRTH}) / 365

The next will calculate age in months
({DOCUMENT.CLINICALDATE} - {PERSON.DATEOFBIRTH}) / 365 * 12