Bed occupancy - problems with date calculation...
Hi. I am trying to write a PGM in order to calculate the bed occupancy in a defined period of time. As dates can be converted to sequential integer numbers, I wrote the following, considering DATEADM (admission date), DATEDIS (discharge date) and AGE as database variables:
* ---------------------------------------- DEFINE DATEMIN <dd/mm/yyyy> DEFINE DATEMAX <dd/mm/yyyy>
LET DATEMIN = ? First date : ? LET DATEMAX = ? Second date : ?
SELECT (DATEADM <= DATEMIN) AND (DATEDIS >= DATEMAX) FREQ AGE *----------------------------- After typing first date: 15/10/2005 (even "15/10/2005"), I get the error message: "Data type mismatch". If I type 15102005, I get "Invalid date", what sounds reasonable. But I can only entry the desired date when I type 75162, what is NOT the respective sequential number of days since 31/12/1899 ("EpiData handles dates as float-type numbers counting the number of days since 31/12/1899" as can be read in EpiData Help)
What am I doing wrong? Thank you in advance.
MARCO MOURA
================================== Dr. MARCO Antonio MOURA Reis, MD, PhD Discipline of Medical Informatics Department of Medicine University of Region of Joinville - UNIVILLE Joinville (SC) - BRAZIL
E-mail: mmoura@infomedica.com.br ==================================
participants (1)
-
epidata-list@lists.umanitoba.ca