Z Programs
Z.age
Arguments: A =
birthdate YYYYMMDD
B =
base date YYYYMMDD Optional, uses @.today otherwise
Returns: Age in
years, months days, according to the following scheme:
Under
1 year
nM dD
Under
5 years
nY mM
5 or
over
nn
Example call: %Z.age(@birthdate,@.today)
returns age
%Z.age(19560315,20000421)
would return 44
Notes:
Meditech age fields are stored in this format. @ADM.PAT.age for example. Do not compare ages stored in the format
with > and < because the ASCII value does not always correspond to the
age. Reformat the age with
%Z.age.with.years, Z.age.format.strip or Z.age.in.years if you need to do
comparisons.
Posted: August 03, 2001
