
Hi, Gilles assessment of the problem is rigth, the message you get is because the results of your calculation is real number and your defined variable is an integer. I think the best solution is:
Let age=Integer(date("WDATE","mdy") - date("DOB","mdy"))/30.44) The INTEGER function converts and real number into an integer. I have tried with some records and it works.
Regarding Pedro Emmanuel´s solution, I wouldn't do that except if you need the calculation during the data entry (for example to take decisions based on the age of the patient). Otherwise i wouldn't include the field in the QES in order to save room in the harddisk (I know it is not a big issue nowadays, but..) and to save room in the screen and also make it more clear.
Hope it helps.
Saludos, Pedro Arias
participants (1)
-
epidata-list@lists.umanitoba.ca