*2007-xxx.pgm *Intended for use with EpiInfo 6 or EpiData (http://www.epidata.dk). *This program analyzes the basic DBF file exported from the FileMaker *outbreak data entry file, aka "DataEntry.fp7". *For more information, contact Bill Keene (keene@cluemail.com; 971.673.1111) *This template program last updated 29 Jan 2007. *Note that all variable names in EpiInfo are truncated at 10 characters. *If you added or renamed any variables you will need to modify this accordingly. *None of the generic text, numeric, or date fields (e.g., numeric1, numeric2) *are referred to in this program, so if you used those and want to analyze by *them, you will need to modify this accordingly. *Lines that begin with asterisks (*) are ignored in running, and hence can be *used to store comments or to temporarily inactive sections of code. *TO SAVE PAPER and TIME, DELETE UNUSED VARIABLES BEFORE RUNNING PROGRAM *You must specify the correct file names and paths to read from and write to. *Two models are provided. Clean up whichever you prefer, but don't forget *to remove the leading asterisks from the operative lines. *For Mac users----------------------------------- *read o:\2007-xxx.dbf *erase o:\2007-xxx.out *route o:\2007-xxx.out *For PC users working on Stash------------------- *read i:\Outbreak\2007\2007-xxx\2007-xxx.dbf *erase i:\Outbreak\2007\2007-xxx\2007-xxx.out *route i:\Outbreak\2007\2007-xxx\2007-xxx.out *------------------------------------------------ *NOTE: The FM template allows the user to choose how they label people. *"LabelSick" is a variable defined in FM as "case", "ill", "sick", whatever *"LabelWell" is a variable defined in FM as "control", "well", "not sick"... *"LabelExclu" is a variable defined in FM as "excluded or ... *This program refers to those labels generically, i.e., instead of *selecting records where 'status = "case" or status = "control"', for example, *it goes for 'status = LabelSick or status = LabelWell'. Note that those *generic labels are NOT in quotes, because they in turn refer to variables in *the DBF file, and not to absolute text. *Blank values in FM-calculated fields export to DBFs as "0.000" instead of * missing, so the following statements just recodes those to blank. *************************************************************************** if durationSx = 0 then durationSx = . if durationVD = 0 then durationVD = . if incubVD1_D = 0 then incubVD1_D = . if incubVD1_H = 0 then incubVD1_H = . if incubVD2_D = 0 then incubVD2_D = . if incubVD2_H = 0 then incubVD2_H = . if incubVD3_D = 0 then incubVD3_D = . if incubVD3_H = 0 then incubVD3_H = . if incubVD4_D = 0 then incubVD4_D = . if incubVD4_H = 0 then incubVD4_H = . if incubVD5_D = 0 then incubVD5_D = . if incubVD5_H = 0 then incubVD5_H = . *List the outbreak ID and name from an arbitrarily chosen record qua header. select recnumber = 1 list OutbreakID OutbreakNa set ignore = off select freq status select status = LabelSick set statistics = on type " " type "DEMOGRAPHICS OF CASES" freq sex freq agegroup type " " type "SYMPTOM PROFILE FOR CASES" freq cramps type "NB: diarrhea3x means ³3 loose stools in <24 hr." freq Diarrhea3x freq vomiting freq fever freq bloodyD freq headache freq myalgia freq nausea freq fatigue freq chills freq gas type "Loosestool means any reported self-defined diarrhea" type "This is rarely used in any case definition" freq loosestool type " " type "MD means any clinician visit." freq MD freq ER freq hospital freq died type " " type "MISSWORK means missing some school or work." freq misswork type " " type "DAYS_OFF is the number of days of work/school missed." type "Note that it only includes people who had recovered" type "by the time they were interviewed." freq days_off type "SPECIMEN means a stool sample was already given." freq specimen type " " type "CONFIRMED means already known lab+; this may change." freq confirmed type " " type "WILLING means would (in concept) donate stool." freq willing type "DURATION (IN DAYS) OF ANY SYMPTOMS" means durationSx type "DURATION (IN DAYS) OF VOMITING OR DIARRHEA" means durationVD type " " type "The following is an ordered list of onset times for cases." type "OnsetX is the onset of any symptoms, whereas OnsetVD is the" type "first onset of vomiting or diarrhea. For most GI illness" type "outbreaks the latter may be more meaningful." type " " type "For your graphing convenience, onset times are also grouped" type "into 6, 8, 12, and 24-hour blocks. Pick whichever" type "grouping seems most informative." sort OnsetXDate OnsetXTime list PersonID initials OnsetXDate OnsetXTime sort onsetVD_Da onsetVD_Ti list PersonID initials onsetVD_Da onsetVD_Ti type "******************" type "ONSET OF FIRST SYMPTOMS (ONSET 1) BY DAY" sort OnsetXDate OnsetXTime freq OnsetXDate type "FIRST SX ONSETS BY 12-HOUR BLOCK" freq OnsetX_12H type "FIRST SX ONSETS BY 8-HOUR BLOCK" freq OnsetX_8H type "FIRST SX ONSETS BY 6-HOUR BLOCK" freq OnsetX_6H type " " type "******************" type "ONSET OF VOMITING/DIARRHEA (ONSET 2) BY DAY" sort onsetVD_Da onsetVD_Ti freq onsetVD_Da type "VD ONSETS BY 12-HOUR BLOCK" freq OnsetVD12H type "VD ONSETS BY 8-HOUR BLOCK" freq OnsetVD8H type "VD ONSETS BY 6-HOUR BLOCK" freq OnsetVD6H type "******************" type "INCUBATION is only valid if a single defined exposure time." type "IncubVD is time to first vomit or diarrhea" type "(i.e., OnsetVD) and is shown both in hours and in days." type "******************" **Delete the stuff referring to meals not being considered as a source **BY DEFAULT, only incubations based on OnsetVD (V or D) are shown. *To use OnsetX (any sx), activate the following steps by removing *the leading asterisks *select *select status = LabelSick *select incubX1_D <>. *sort incubX1_H *type "INCUBATION (to V or D) ASSUMING MEAL1 IS SOLE SOURCE" *freq incubX1_D *freq incubX1_H * *select *select status = LabelSick *select incubX2_D <>. *sort incubX2_H *type "INCUBATION (to V or D) ASSUMING MEAL2 IS SOLE SOURCE" *freq incubX2_D *freq incubX2_H * *select *select status = LabelSick *select incubX3_D <>. *sort incubX3_H *type "INCUBATION (to V or D) ASSUMING MEAL3 IS SOLE SOURCE" *freq incubX3_D *freq incubX3_H * *select *select status = LabelSick *select incubX4_D <>. *sort incubX4_H *type "INCUBATION (to V or D) ASSUMING MEAL4 IS SOLE SOURCE" *freq incubX4_D *freq incubX4_H * *select *select status = LabelSick *select incubX5_D <>. *sort incubX5_H *type "INCUBATION (to V or D) ASSUMING MEAL5 IS SOLE SOURCE" *freq incubX5_D *freq incubX5_H *type "******************" select select status = LabelSick select incubVD1_D <>. sort incubVD1_H type "INCUBATION (to V or D) ASSUMING MEAL1 IS SOLE SOURCE" type "NB: this is meaningless if meal1 was not the exposure" type " " type "Incubation to first V or D in days" freq incubVD1_D type "Incubation to first V or D in hours" freq incubVD1_H select select status = LabelSick select incubVD2_D <>. sort incubVD2_H type "INCUBATION (to V or D) ASSUMING MEAL2 IS SOLE SOURCE" type "NB: this is meaningless if meal2 was not the exposure" type "Incubation to first V or D in days" freq incubVD2_D type "Incubation to first V or D in hours" freq incubVD2_H *select *select status = LabelSick *select incubVD3_D <>. *sort incubVD3_H *type "INCUBATION (to V or D) ASSUMING MEAL3 IS SOLE SOURCE" *type "NB: this is meaningless if meal3 was not the exposure" *freq incubVD3_D *freq incubVD3_H * *select *select status = LabelSick *select incubVD4_D <>. *sort incubVD4_H *type "INCUBATION (to V or D) ASSUMING MEAL4 IS SOLE SOURCE" *type "NB: this is meaningless if meal4 was not the exposure" *freq incubVD4_D *freq incubVD4_H * *select *select status = LabelSick *select incubVD5_D <>. *sort incubVD5_H *type "INCUBATION (to V or D) ASSUMING MEAL5 IS SOLE SOURCE" *type "NB: this is meaningless if meal5 was not the exposure" *freq incubVD5_D *freq incubVD5_H type "******************" select select status <> LabelExclu set ignore = on set statistics = on tables sex status means age status ***DON'T FORGET TO DELETE UNUSED VARIABLES BEFORE RUNNING PROGRAM type " " type "****************************" type "EXPOSURE-SPECIFIC 2x2 TABLES" type "****************************" tables item01a status tables item01b status tables item01c status tables item01d status tables item01e status tables item01f status tables item01g status tables item01h status tables item01i status tables item01j status tables item01k status tables item01l status tables item01m status tables item01n status tables item01o status tables item01p status tables item01q status tables item01r status tables item01s status tables item01t status tables item01u status tables item01v status tables item01w status tables item01x status tables item01y status tables item01z status type "******************" tables item02a status tables item02b status tables item02c status tables item02d status tables item02e status tables item02f status tables item02g status tables item02h status tables item02i status tables item02j status tables item02k status tables item02l status tables item02m status tables item02n status tables item02o status tables item02p status tables item02q status tables item02r status tables item02s status tables item02t status tables item02u status tables item02v status tables item02w status tables item02x status tables item02y status tables item02z status type "******************" tables item03a status tables item03b status tables item03c status tables item03d status tables item03e status tables item03f status tables item03g status tables item03h status tables item03i status tables item03j status tables item03k status tables item03l status tables item03m status tables item03n status tables item03o status tables item03p status tables item03q status tables item03r status tables item03s status tables item03t status tables item03u status tables item03v status tables item03w status tables item03x status tables item03y status tables item03z status type "******************" tables item04a status tables item04b status tables item04c status tables item04d status tables item04e status tables item04f status tables item04g status tables item04h status tables item04i status tables item04j status tables item04k status tables item04l status tables item04m status tables item04n status tables item04o status tables item04p status tables item04q status tables item04r status tables item04s status tables item04t status tables item04u status tables item04v status tables item04w status tables item04x status tables item04y status tables item04z status type "******************" tables item05a status tables item05b status tables item05c status tables item05d status tables item05e status tables item05f status tables item05g status tables item05h status tables item05i status tables item05j status tables item05k status tables item05l status tables item05m status tables item05n status tables item05o status tables item05p status tables item05q status tables item05r status tables item05s status tables item05t status tables item05u status tables item05v status tables item05w status tables item05x status tables item05y status tables item05z status type "******************" tables item06a status tables item06b status tables item06c status tables item06d status tables item06e status tables item06f status tables item06g status tables item06h status tables item06i status tables item06j status tables item06k status tables item06l status tables item06m status tables item06n status tables item06o status tables item06p status tables item06q status tables item06r status tables item06s status tables item06t status tables item06u status tables item06v status tables item06w status tables item06x status tables item06y status tables item06z status type "******************" tables item07a status tables item07b status tables item07c status tables item07d status tables item07e status tables item07f status tables item07g status tables item07h status tables item07i status tables item07j status tables item07k status tables item07l status tables item07m status tables item07n status tables item07o status tables item07p status tables item07q status tables item07r status tables item07s status tables item07t status tables item07u status tables item07v status tables item07w status tables item07x status tables item07y status tables item07z status type "******************" tables item08a status tables item08b status tables item08c status tables item08d status tables item08e status tables item08f status tables item08g status tables item08h status tables item08i status tables item08j status tables item08k status tables item08l status tables item08m status tables item08n status tables item08o status tables item08p status tables item08q status tables item08r status tables item08s status tables item08t status tables item08u status tables item08v status tables item08w status tables item08x status tables item08y status tables item08z status type "******************" tables item09a status tables item09b status tables item09c status tables item09d status tables item09e status tables item09f status tables item09g status tables item09h status tables item09i status tables item09j status tables item09k status tables item09l status tables item09m status tables item09n status tables item09o status tables item09p status tables item09q status tables item09r status tables item09s status tables item09t status tables item09u status tables item09v status tables item09w status tables item09x status tables item09y status tables item09z status type "******************" tables item10a status tables item10b status tables item10c status tables item10d status tables item10e status tables item10f status tables item10g status tables item10h status tables item10i status tables item10j status tables item10k status tables item10l status tables item10m status tables item10n status tables item10o status tables item10p status tables item10q status tables item10r status tables item10s status tables item10t status tables item10u status tables item10v status tables item10w status tables item10x status tables item10y status tables item10z status type "******************" tables item11a status tables item11b status tables item11c status tables item11d status tables item11e status tables item11f status tables item11g status tables item11h status tables item11i status tables item11j status tables item11k status tables item11l status tables item11m status tables item11n status tables item11o status tables item11p status tables item11q status tables item11r status tables item11s status tables item11t status tables item11u status tables item11v status tables item11w status tables item11x status tables item11y status tables item11z status type "******************" tables item12a status tables item12b status tables item12c status tables item12d status tables item12e status tables item12f status tables item12g status tables item12h status tables item12i status tables item12j status tables item12k status tables item12l status tables item12m status tables item12n status tables item12o status tables item12p status tables item12q status tables item12r status tables item12s status tables item12t status tables item12u status tables item12v status tables item12w status tables item12x status tables item12y status tables item12z status type "******************" tables item13a status tables item13b status tables item13c status tables item13d status tables item13e status tables item13f status tables item13g status tables item13h status tables item13i status tables item13j status tables item13k status tables item13l status tables item13m status tables item13n status tables item13o status tables item13p status tables item13q status tables item13r status tables item13s status tables item13t status tables item13u status tables item13v status tables item13w status tables item13x status tables item13y status tables item13z status type "******************" tables item14a status tables item14b status tables item14c status tables item14d status tables item14e status tables item14f status tables item14g status tables item14h status tables item14i status tables item14j status tables item14k status tables item14l status tables item14m status tables item14n status tables item14o status tables item14p status tables item14q status tables item14r status tables item14s status tables item14t status tables item14u status tables item14v status tables item14w status tables item14x status tables item14y status tables item14z status type "******************" tables item15a status tables item15b status tables item15c status tables item15d status tables item15e status tables item15f status tables item15g status tables item15h status tables item15i status tables item15j status tables item15k status tables item15l status tables item15m status tables item15n status tables item15o status tables item15p status tables item15q status tables item15r status tables item15s status tables item15t status tables item15u status tables item15v status tables item15w status tables item15x status tables item15y status tables item15z status type "******************" tables item16a status tables item16b status tables item16c status tables item16d status tables item16e status tables item16f status tables item16g status tables item16h status tables item16i status tables item16j status tables item16k status tables item16l status tables item16m status tables item16n status tables item16o status tables item16p status tables item16q status tables item16r status tables item16s status tables item16t status tables item16u status tables item16v status tables item16w status tables item16x status tables item16y status tables item16z status type "******************" tables item17a status tables item17b status tables item17c status tables item17d status tables item17e status tables item17f status tables item17g status tables item17h status tables item17i status tables item17j status tables item17k status tables item17l status tables item17m status tables item17n status tables item17o status tables item17p status tables item17q status tables item17r status tables item17s status tables item17t status tables item17u status tables item17v status tables item17w status tables item17x status tables item17y status tables item17z status type "******************" tables item18a status tables item18b status tables item18c status tables item18d status tables item18e status tables item18f status tables item18g status tables item18h status tables item18i status tables item18j status tables item18k status tables item18l status tables item18m status tables item18n status tables item18o status tables item18p status tables item18q status tables item18r status tables item18s status tables item18t status tables item18u status tables item18v status tables item18w status tables item18x status tables item18y status tables item18z status type "******************" tables item19a status tables item19b status tables item19c status tables item19d status tables item19e status tables item19f status tables item19g status tables item19h status tables item19i status tables item19j status tables item19k status tables item19l status tables item19m status tables item19n status tables item19o status tables item19p status tables item19q status tables item19r status tables item19s status tables item19t status tables item19u status tables item19v status tables item19w status tables item19x status tables item19y status tables item19z status type "******************" tables item20a status tables item20b status tables item20c status tables item20d status tables item20e status tables item20f status tables item20g status tables item20h status tables item20i status tables item20j status tables item20k status tables item20l status tables item20m status tables item20n status tables item20o status tables item20p status tables item20q status tables item20r status tables item20s status tables item20t status tables item20u status tables item20v status tables item20w status tables item20x status tables item20y status tables item20z status type "******************" tables item21a status tables item21b status tables item21c status tables item21d status tables item21e status tables item21f status tables item21g status tables item21h status tables item21i status tables item21j status tables item21k status tables item21l status tables item21m status tables item21n status tables item21o status tables item21p status tables item21q status tables item21r status tables item21s status tables item21t status tables item21u status tables item21v status tables item21w status tables item21x status tables item21y status tables item21z status type "******************" tables item22a status tables item22b status tables item22c status tables item22d status tables item22e status tables item22f status tables item22g status tables item22h status tables item22i status tables item22j status tables item22k status tables item22l status tables item22m status tables item22n status tables item22o status tables item22p status tables item22q status tables item22r status tables item22s status tables item22t status tables item22u status tables item22v status tables item22w status tables item22x status tables item22y status tables item22z status type "******************" tables item23a status tables item23b status tables item23c status tables item23d status tables item23e status tables item23f status tables item23g status tables item23h status tables item23i status tables item23j status tables item23k status tables item23l status tables item23m status tables item23n status tables item23o status tables item23p status tables item23q status tables item23r status tables item23s status tables item23t status tables item23u status tables item23v status tables item23w status tables item23x status tables item23y status tables item23z status type "******************" tables item24a status tables item24b status tables item24c status tables item24d status tables item24e status tables item24f status tables item24g status tables item24h status tables item24i status tables item24j status tables item24k status tables item24l status tables item24m status tables item24n status tables item24o status tables item24p status tables item24q status tables item24r status tables item24s status tables item24t status tables item24u status tables item24v status tables item24w status tables item24x status tables item24y status tables item24z status type "******************" tables item25a status tables item25b status tables item25c status tables item25d status tables item25e status tables item25f status tables item25g status tables item25h status tables item25i status tables item25j status tables item25k status tables item25l status tables item25m status tables item25n status tables item25o status tables item25p status tables item25q status tables item25r status tables item25s status tables item25t status tables item25u status tables item25v status tables item25w status tables item25x status tables item25y status tables item25z status *Sample syntax for matched analyses and stratified analyses *where "match" is the match link field (e.g., case household name, whatever)--- *the variable that links the case and controls who are being matched. *type " " *type "******************" *type "MATCHED 2x2 TABLES" *type "******************" *match match status item01a *match match status item01b *tables item01c status item02d type "THE END" *END