[EpiData-list] Date Range selection in Epi Analysis

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Aug 15 22:52:36 CDT 2006


  


Dear Jens,

  I am trying to use Epi Analysis for the Tuberculosis data analysis. I wrote following PGM.  The date formats are American (mm/dd/yyyy). The ATTDATE variable is the date of starting of Anti-tuberculosis treatment. I want to select a date range of last 3 months to see the patients put on treatment in the last quarter. This selection should provide "y" value  to the PG variable defined.

The error messages received on the EpiAnalysis screen after running the command given,  are given below; 


*TBQ.PGM (Updated on 15th August 2006)
*Program gives the QUARTERLY status report of Tuberculosis of area.
READ "d:\epi6\FGTRY\TB2000.REC"
SET STATISTICS=OFF

*Types the DATE RANGE of ATTDATE 3 months prior to beginning of present Quarter.

*defines the time interval of 3 months prior to present Quarter.
   DEFINE PQ <Y>

IF ATTDATE > date("01/01/2006","mdy") AND  < date("03/30/2006",mdy") THEN LET PQ="Y" ELSE LET PQ="N"

 Error Massages in Epi Analysis;
  Syntax Error
  Script resulted in errors
  Operation aborted 


IF (ATTDATE > date("01/01/2006","mdy")) AND (ATTDATE < date("03/03/2006","mdy")) THEN LET PQ="Y" ELSE LET PQ="N"

Error Massages in Epi Analysis;
 Data type mismatch


IF ATTDATE date("01/01/2006","mdy") AND ATTDATE < date("03/30/2006","mdy") THEN LET PQ="Y" ELSE LET PQ="N"

Error Massages in Epi Analysis;
 Then is missing  
 Script resulted in errors
 Operation aborted 

SET STATISTICS=OFF
*End of PGM.


I tried these command combinations one by one but bot no luck.
The date ranges selection has been a tough challenge.
The F1 help section also has no clue.

Kindly help.



Dr. Shavinder Singh
Department of Community Medicine









More information about the EpiData-list mailing list