Reply To: does anyone have a tps to calcuate age

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf does anyone have a tps to calcuate age Reply To: does anyone have a tps to calcuate age

#58188
Jim Kosloskey
Participant

    Jennifer,

    This might work.

    In Unix (and maybe other Operating Systems as well) apparently Tcl will only calculate back to 12/31/1902.

    For every year prior to 1902 I guess you could subtract 31536000 seconds from a clock scan of 01/01/1902 (which returns a negative number) to give you additional full years – or just subtract the dob year from the current year if the dob year is less than 1902.

    Of course that is not sensitive to when in a year someone’s age turns over which might be an issue depending on how accurate this needs to be for folks over a hundred years old.

    However, if this is truly a bogus date (that is 01/01/1901 ALWAYS represents a bogus date), then I would test for that date and report the age with something that catches the attention of the user to indicate a bogus date was used.

    BUT – you really could have someone actually born on 01/01/1901 as a patient – what impact does that present?

    Not much help but some thoughts.

    Jim Kosloskey

    email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.