IMIF command Problem
Dear All, I am finding a problem while using IMIF command to tabulate the Opportunistic infections of the database aids.rec. The PGM being used is AIDSP which is meant to tabulate the Opportunistic infections. When I run the PGM there is no tabulation of the Opportunistic infections. However select and freq commands do display the Opportunistic infections in the database.
I was using IMIF command because the PGM was getting stuck where there were no Opportunistic infections data in the record.
I am attaching the sample database and PGM file for testing in Try.zip file with this message..
Any help will be appreciated.
Dr. Shavinder
IMIF should only use result variables or global variables.
Instead of the following approach
select monthr=12 select yearr=2008 select i1="Y" imif (monthr=12) and (yearr=2008) and (i1="Y") then tables C2bsex i1 else type "No case reported with this Opportunistic infection" endif
Try this:
select monthr=12 select yearr=2008 select i1="Y" * count the records that match the select criteria count /q * $count is the result of the count function; is it > 0 imif $count > 0 then tables c2bsex i1 else type "No case reported with this Opportunistic infection" endif
Jamie
Dr. Shavinder wrote:
Dear All, I am finding a problem while using IMIF command to tabulate the Opportunistic infections of the database “aids.rec”. The PGM being used is AIDSP which is meant to tabulate the Opportunistic infections. When I run the PGM there is no tabulation of the Opportunistic infections. However “select” and “freq” commands do display the Opportunistic infections in the database.
I was using IMIF command because the PGM was getting stuck where there were no Opportunistic infections data in the record.
As a follow up to my previous response, here is the way to do this type of report using the CMD function. This simplifies the programming and potentially reduces errors by having only one place to change the current month and year of the report.
Jamie
*AIDSP1.PGM *Generates Monthly AIDS Surveillance Report of CMC.
set echo=off cls close logclose define inftype __ global define infname ___________________ global
Read aids logopen "Monthly AIDS Surveillance Report of CMC.htm" /replace Set table design=box TYPE "\LTable (v) Opportunistic inftypes"
* This cmd function creates one table based on the value of global variable inftype * if there are data. Change month and year below. cmd report1 select monthr=12 select yearr=2008 select @inftype = "Y" count imif $count > 0 then tables C2bsex @inftype else type "No case reported with @infname (@inftype)" endif select end
inftype = "i1" infname = "Tuberculosis" report1 inftype = "i2" infname = "Candidiasis" report1 inftype = "i3" infname = "Herpes Zoster" report1 inftype = "i4" infname = "Toxoplasmosis" report1 inftype = "i5" infname = "Bacterial infections" report1 inftype = "i6" infname = "PCP" report1 inftype = "i7" infname = "Cryptococcal Meningitis" report1 inftype = "i8" infname = "Kaposi Saracoma" report1 inftype = "i9" infname = "Parasitic infections" report1
participants (1)
-
epidata-list@lists.umanitoba.ca