[EpiData-list] Help with calculation using fields from 2 files

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Fri Jun 15 02:38:37 CDT 2007


Dear fellow EpiData users,

I have 2 data files, a demographics file called demo.rec and an assessment 
file called assess.rec.  Demo.rec contains date of birth while assess.rec 
contains date of assessment.  I'd like to calculate the age at assessment 
and display the age in assess.rec during data entry.  How can I do a 
calculation using fields in 2 different files?

An abbreviated version of my files with just the relevant fields are:
demo.qes
idno ###
dob <dd/mm/yyyy>
gender #

demo.chk
idno
   KEY UNIQUE 1
END

gender
   LEGAL
     1
     2
   END
   AFTER ENTRY
     RELATE idno assess
   END
END

assess.qes
idno ###
dateass <dd/mm/yyyy>
ageass ##.#

assess.chk
idno
   KEY 1
END

dateass
   AFTER ENTRY
     LET ageass=(dateass-???)/365.25
   END
END

ageass
   NOENTER
END

Any help would be greatly appreciated.

Thanks,
Suzanna

Suzanna Vidmar
Senior Research Officer

Clinical Epidemiology and Biostatistics Unit
Royal Children's Hospital
Flemington Rd
Parkville Victoria 3052

telephone: +61 3 9345 6372
facsimile: +61 3 9345 6000


More information about the EpiData-list mailing list