Dear Christine, Charity:
If you wish to keep the QES file uncluttered, keep just the 5 fields:
supperdate Date supper took place <dd/mm/yyyy> suppertime Time supper started ##.## onsetdate Date of symptom onset <dd/mm/yyyy> onsettime Time of symptom onset ##.## incubation Incubation period in hours ###.##
In the CHK file then make use of temporary variables:
BEFORE FILE define supperTemp ##########.## define onsetTemp ##########.## END
supperdate MUSTENTER END
suppertime MUSTENTER AFTER ENTRY supperTemp=(supperdate-"01/01/2000")*24+suppertime END END
onsetdate MUSTENTER END
onsettime MUSTENTER AFTER ENTRY onsetTemp=(onsetdate-"01/01/2000")*24+onsettime incubation=onsetTemp-supperTemp END END
incubation NOENTER END
Of course, you might wish to build in conditions as Charity suggests. Furthermore, you could make provisions for unknown exact times, etc, this is just one possible barebone approach if all is known.
The date "01/01/2000" is an arbitrary anchor date.
Regards,
Hans
epidata-list@lists.umanitoba.ca wrote:
......
Charity
Below is the text from the qes file I used to test my formulae.
......
On 2/27/07, epidata-list@lists.umanitoba.ca <epidata-list@lists.umanitoba.ca
wrote:
Hi Charity
Thanks very much for your formula. Its sounds really good. I had a go
thanks
Christine Roseveare