APCLSILT ;IHS/CMI/LAB - AGGREGATE ILI REPORT PRINT; ; 10 Oct 2011 7:36 AM
;;3.0;IHS PCC REPORTS;**24,25,26,27,28,29,30**;FEB 05, 1997;Build 27
C(X,X2,X3) ;
D COMMA^%DTC
Q X
;
;
ILISEX ;EP
D HEADER^APCLSILR Q:$D(APCLQUIT)
W "TABLE 2: ILI Diagnoses by Sex"
W !,"This table provides a patient/visit count, by sex, for ILI diagnosis. An ILI"
W !,"diagnosis is defined as a visit with an diagnosis contained in the "
W !,"SURVEILLANCE ILI NO TMP NEEDED taxonomy."
W !," OR"
W !,"a temperature of >=100 AND one of the ICD diagnosis in the SURVEILLANCE ILI"
W !,"taxonomy."
W !!,"An unduplicated count of patients is also provided.",!!,?40,"# patients",?60,"# visits",!
I APCLLOCT="O" G LOCSEX
W !,"ALL FACILITIES COMBINED",!
S APCLSEX="" F S APCLSEX=$O(APCLILIS(APCLSEX)) Q:APCLSEX=""!($D(APCLQUIT)) D
.I $Y>(IOSL-3) D HEADER^APCLSILR Q:$D(APCLQUIT) D SUBHEAD3
.W ?2,APCLSEX,?40,$$C($P(APCLILIS(APCLSEX),U,2),0,7),?60,$$C($P(APCLILIS(APCLSEX),U,1),0,7),!
.Q
Q:$D(APCLQUIT)
W $$REPEAT^XLFSTR("-",79),!
LOCSEX S APCLLOC="" F S APCLLOC=$O(APCLSEXL(APCLLOC)) Q:APCLLOC=""!($D(APCLQUIT)) D
.I $Y>(IOSL-8) D HEADER^APCLSILR Q:$D(APCLQUIT) D SUBHEAD3
.W !!,APCLLOC
.S APCLSEX="" F S APCLSEX=$O(APCLSEXL(APCLLOC,APCLSEX)) Q:APCLSEX=""!($D(APCLQUIT)) D
..W !?2,APCLSEX,?40,$$C($P(APCLSEXL(APCLLOC,APCLSEX),U,2),0,7),?60,$$C($P(APCLSEXL(APCLLOC,APCLSEX),U,1),0,7),!
.W $$REPEAT^XLFSTR("-",79),!
Q
ILIAVM ;EP - meds
D HEADER^APCLSILR Q:$D(APCLQUIT)
W "TABLE 3: ILI Anti-Viral Medications Dispensed"
W !,"This table provides a count by drug name of the number of visits on which"
W !,"an Anti-Viral Medication was dispensed. Anti-Viral Medications are defined"
W !,"as any medication contained in the FLU ANTIVIRAL MEDS taxonomy or any "
W !,"Medication whose drug name contains OSELTAMIVIR or ZANAMIVIR. An unduplicated"
W !," unduplicated count of patients is also provided.",!,?40,"# patients",?60,"# visits",!
S APCLD="" F S APCLD=$O(APCLMEDS(APCLD)) Q:APCLD=""!($D(APCLQUIT)) D
.I $Y>(IOSL-3) D HEADER^APCLSILR Q:$D(APCLQUIT) D SUBHEAD4
.W ?2,APCLD,?40,$$C($P(APCLMEDS(APCLD),U,2),0,7),?60,$$C($P(APCLMEDS(APCLD),U,1),0,7),!
.Q
Q
SUBHEAD3 ;
W !,"TABLE 2: ILI Diagnoses by Sex",!,?40,"# patients",?60,"# visits",!
Q
SUBHEAD4 ;
W "TABLE 3: ILI Anti-Viral Medications Dispensed",!!,?40,"# patients",?60,"# prescriptions",!
Q
ILIAGEP ;EP
D HEADER^APCLSILR
W "TABLE 4: ILI Diagnoses by Age by Visit"
W !,"This table displays a visit count by age group. Only visits on which "
W !,"there was at least one ILI diagnosis are counted. An ILI diagnosis"
W !,"is defined as a visit with one of the codes in the SURVEILLANCE ILI"
W !,"NO TMP NEEDED taxonomy."
W !," OR"
W !,"a temperature of >=100 AND one of the codes in the SURVEILLANCE ILI"
W !,"taxonomy."
W !,"The visits have to be defined as 'surveillance' visits. The definition "
W !,"of these visits is the following:"
W !," - a Hospitalization"
W !," - a visit to a PHN"
W !," - an Ambulatory visit (service categories A, O, R, S) to one of the "
W !," following clinics: 01 GENERAL, 06 DIABETIC, 10 GYN, 12 IMMUNIZATION,"
W !," 13 INTERNAL MEDICINE, 20 PEDIATRICS, 24 WELL CHILD CARE, "
W !," 28 FAMILY PRACTICE, 30 EMERGENCY ROOM, 57 EPSDT, "
W !," 70 WOMEN'S HEALTH, 80 URGENT CARE, 89 EVENING"
W !!,"Age",?19," 0-4y",?29,"5-24y",?39,"25-49y",?49,"50-64y",?59,"65y+",?69,"TOTAL",!
W !,"Ambulatory ILI"
W ?19,$$C($G(APCLAGEG("I","A","0-4y")),0,7)
W ?29,$$C($G(APCLAGEG("I","A","5-24y")),0,7)
W ?39,$$C($G(APCLAGEG("I","A","25-49y")),0,7)
W ?49,$$C($G(APCLAGEG("I","A","50-64y")),0,7)
W ?59,$$C($G(APCLAGEG("I","A","65y+")),0,7)
W ?69,$$C($G(APCLAGEG("I","A","TOTAL")),0,7),!
W "Diagnosis",!
W $$REPEAT^XLFSTR("-",79),!
;W !,"Ambulatory"
;W ?14,$$C($G(APCLAGEG("H","A","6-23m")),0,7)
;W ?22,$$C($G(APCLAGEG("H","A","24-59m")),0,7)
;W ?30,$$C($G(APCLAGEG("H","A","60m-18y")),0,7)
;W ?38,$$C($G(APCLAGEG("H","A","19-24y")),0,7)
;W ?46,$$C($G(APCLAGEG("H","A","25-49y")),0,7)
;W ?54,$$C($G(APCLAGEG("H","A","50-64y")),0,7)
;W ?62,$$C($G(APCLAGEG("H","A","65+y")),0,7)
;W ?72,$$C($G(APCLAGEG("H","A","TOTAL")),0,7),!
;W "H1N1 DXS",!
;W $$REPEAT^XLFSTR("-",79),!
W !,"Hospital ILI"
W ?19,$$C($G(APCLAGEG("I","H","0-4y")),0,7)
W ?29,$$C($G(APCLAGEG("I","H","5-24y")),0,7)
W ?39,$$C($G(APCLAGEG("I","H","25-49y")),0,7)
W ?49,$$C($G(APCLAGEG("I","H","50-64y")),0,7)
W ?59,$$C($G(APCLAGEG("I","H","65y+")),0,7)
W ?69,$$C($G(APCLAGEG("I","H","TOTAL")),0,7),!
W "Diagnosis",!
W $$REPEAT^XLFSTR("-",79),!
;W !,"Hospital"
;W ?14,$$C($G(APCLAGEG("H","H","6-23m")),0,7)
;W ?22,$$C($G(APCLAGEG("H","H","24-59m")),0,7)
;W ?30,$$C($G(APCLAGEG("H","H","60m-18y")),0,7)
;W ?38,$$C($G(APCLAGEG("H","H","19-24y")),0,7)
;W ?46,$$C($G(APCLAGEG("H","H","25-49y")),0,7)
;W ?54,$$C($G(APCLAGEG("H","H","50-64y")),0,7)
;W ?62,$$C($G(APCLAGEG("H","H","65+y")),0,7)
;W ?72,$$C($G(APCLAGEG("H","H","TOTAL")),0,7),!
;W "H1N1 DXS",!
;W $$REPEAT^XLFSTR("-",79),!
Q
VACAGEP ;EP
D HEADER^APCLSILR
W "TABLE 5: Seasonal Flu Immunizations by Age by Visit"
W !,"This table displays a count for immunizations by age group. Only visits on"
W !,"which a Seasonal Flu immunization was dispensed are counted. The "
W !,"definition of the immunizations are:"
W !," - Seasonal Flu: Immunization CVX codes 15, 16, 88, 111, 135, 140, 141, 144,"
W !," 149, 151, 153, 155, 158"
W !," CPT 90654-90662, 90672-90673, 90685-90686, 90724, G0008, G8108"
W !," Diagnoses V04.8, V04.81, V06.6"
W !," Procedure: 99.52"
I APCLLOCT="O" G LOCAGE
W !!,"ALL FACILITIES"
W !!,"Age",?14," 6-23m",?22,"24-59m",?30,"60m-18y",?38,"19-24y",?46,"25-49y",?54,"50-64y",?62," 65+y",?72,"TOTAL",!
W !,"Seasonal"
W ?14,$$C($G(APCLIMMG("I","A","6-23m")),0,7)
W ?22,$$C($G(APCLIMMG("I","A","24-59m")),0,7)
W ?30,$$C($G(APCLIMMG("I","A","60m-18y")),0,7)
W ?38,$$C($G(APCLIMMG("I","A","19-24y")),0,7)
W ?46,$$C($G(APCLIMMG("I","A","25-49y")),0,7)
W ?54,$$C($G(APCLIMMG("I","A","50-64y")),0,7)
W ?62,$$C($G(APCLIMMG("I","A","65+y")),0,7)
W ?72,$$C($G(APCLIMMG("I","A","TOTAL")),0,7),!
W "Flu",!
W $$REPEAT^XLFSTR("-",79),!
;W !,"H1N1"
;W ?14,$$C($G(APCLIMMG("H","A","6-23m")),0,7)
;W ?22,$$C($G(APCLIMMG("H","A","24-59m")),0,7)
;W ?30,$$C($G(APCLIMMG("H","A","60m-18y")),0,7)
;W ?38,$$C($G(APCLIMMG("H","A","19-24y")),0,7)
;W ?46,$$C($G(APCLIMMG("H","A","25-49y")),0,7)
;W ?54,$$C($G(APCLIMMG("H","A","50-64y")),0,7)
;W ?62,$$C($G(APCLIMMG("H","A","65+y")),0,7)
;W ?72,$$C($G(APCLIMMG("H","A","TOTAL")),0,7),!
;W $$REPEAT^XLFSTR("-",79),!
LOCAGE W !
S APCLLOC="" F S APCLLOC=$O(APCLIMML(APCLLOC)) Q:APCLLOC=""!($D(APCLQUIT)) D
.I $Y>(IOSL-14) D HEADER^APCLSILR
.W !!,APCLLOC
.W !!,"Age",?14," 6-23m",?22,"24-59m",?30,"60m-18y",?38,"19-24y",?46,"25-49y",?54,"50-64y",?62," 65+y",?72,"TOTAL",!
.W !,"Seasonal"
.W ?14,$$C($G(APCLIMML(APCLLOC,"I","A","6-23m")),0,7)
.W ?22,$$C($G(APCLIMML(APCLLOC,"I","A","24-59m")),0,7)
.W ?30,$$C($G(APCLIMML(APCLLOC,"I","A","60m-18y")),0,7)
.W ?38,$$C($G(APCLIMML(APCLLOC,"I","A","19-24y")),0,7)
.W ?46,$$C($G(APCLIMML(APCLLOC,"I","A","25-49y")),0,7)
.W ?54,$$C($G(APCLIMML(APCLLOC,"I","A","50-64y")),0,7)
.W ?62,$$C($G(APCLIMML(APCLLOC,"I","A","65+y")),0,7)
.W ?72,$$C($G(APCLIMML(APCLLOC,"I","A","TOTAL")),0,7),!
.W "Flu",!
.W $$REPEAT^XLFSTR("-",79),!
.;W !,"H1N1"
.;W ?14,$$C($G(APCLIMML(APCLLOC,"H","A","6-23m")),0,7)
.;W ?22,$$C($G(APCLIMML(APCLLOC,"H","A","24-59m")),0,7)
.;W ?30,$$C($G(APCLIMML(APCLLOC,"H","A","60m-18y")),0,7)
.;W ?38,$$C($G(APCLIMML(APCLLOC,"H","A","19-24y")),0,7)
.;W ?46,$$C($G(APCLIMML(APCLLOC,"H","A","25-49y")),0,7)
.;W ?54,$$C($G(APCLIMML(APCLLOC,"H","A","50-64y")),0,7)
.;W ?62,$$C($G(APCLIMML(APCLLOC,"H","A","65+y")),0,7)
.;W ?72,$$C($G(APCLIMML(APCLLOC,"H","A","TOTAL")),0,7),!
.;W $$REPEAT^XLFSTR("-",79),!
Q
D HEADER^APCLSILR
W "TABLE 7: Potential Adverse Events"
W !!,"This table contains a tally of all patients who were seen for a"
W !,"diagnosis that may be considered to be an adverse event. Adverse"
W !,"Event diagnoses are:"
W !,"ITP: 287.31"
W !,"2nd TP: 287.4"
W !,"TP: 287.5"
W !,"Bells Palsy: 351.0"
W !,"GBS: 357.0"
W !,"Febrile Seizures Simple: 780.31 < 5 yrs"
W !,"Febrile Seizures Complex: 780.32 < 5 yrs"
I $Y>(IOSL-16) D HEADER^APCLSILR Q:$D(APCLQUIT)
D TAB7SUB
W !,$$REPEAT^XLFSTR("-",79)
W !
I '$D(APCLTAB7) W !!,"There were no visits for adverse events during the time period.",!! Q
F X="ITP: 287.31","2nd TP: 287.4","TP: 287.5","Bells Palsy: 351.0","GBS: 357.0","Febrile Seizures Simple: 780.31 < 5 yrs","Febrile Seizures Complex: 780.32 < 5 yrs" D
.I '$D(APCLTAB7(X,1)) S APCLTAB7(X,1)=0
.I '$D(APCLTAB7(X,0)) S APCLTAB7(X,0)=0
F APCLX="ITP: 287.31","2nd TP: 287.4","TP: 287.5","Bells Palsy: 351.0","GBS: 357.0","Febrile Seizures Simple: 780.31 < 5 yrs","Febrile Seizures Complex: 780.32 < 5 yrs" Q:$D(APCLQUIT) D
.I $L(APCLX)<25 W APCLX
.I $L(APCLX)>24 W $P(APCLX,":",1),!,$P(APCLX,":",2)
.W ?26,$$C($G(APCLTAB7(APCLX,1)),0,7),?46,$$C($G(APCLTAB7(APCLX,0)),0,7)
.W ?66,$$C(($G(APCLTAB7(APCLX,0))+$G(APCLTAB7(APCLX,1))),0,7),!
.W $$REPEAT^XLFSTR("-",79),!
.Q
Q:$D(APCLQUIT)
;write footer
I $Y>(IOSL-6) D HEADER^APCLSILR Q:$D(APCLQUIT)
W !!,"Note: Follow up investigation is needed to determine if the adverse event"
W !,"could be associated with vaccine adverse events that may be a result of"
W !,"vaccination should be reported to the Vaccine Adverse Event Reporting"
W !,"System (VAERS)."
W !
Q
TAB7SUB ;
W !!,"TABLE 7: Potential Adverse Events"
W !,"Potential Adverse",?26,"Seasonal flu",?46,"No seasonal flu",?66,"Total # of"
W !,"Events",?26,"vaccine in the ",?46,"vaccine in the",?66,"Adverse Events"
W !?26,"60 days prior to",?46,"60 days prior to"
W !?26,"adverse event",?46,"adverse event"
W !,$$REPEAT^XLFSTR("-",79)
W !
Q
TAB8 ;EP - WRITE OUT TABLE 8
D HEADER^APCLSILR
W "TABLE 8: Potential Adverse Events from live virus seasonal Flu vaccine"
W !!,"This table contains a tally of all patients who were seen for a"
W !,"diagnosis that may be considered to be an adverse event after"
W !,"receiving the Seasonal Flu Live Virus vaccine."
W !,"The adverse event diagnoses are:"
W !?5,"Asthma (ICD Codes): 493.0*, 493.9*"
W !?5,"Wheezing (ICD Codes): 786.07"
W !?5,"Influenza (ICD Codes): 488.1 (H1N1)"
W !
I $Y>(IOSL-16) D HEADER^APCLSILR Q:$D(APCLQUIT)
W !,"Potential Adverse",?26,"Live virus vaccine",?46,"No Live virus",?66,"Total # of"
W !,"Events",?26,"(CVX code 111) 14",?46,"vaccine (CVX code",?66,"Adverse Events"
W !?26,"days prior to",?46,"111) 14 days prior"
W !?26,"adverse event",?46,"to adverse event"
W !
W !,$$REPEAT^XLFSTR("-",79)
W !
I '$D(APCLTAB8) W !!,"There were no visits for adverse events during the time period.",!! Q
F X="Asthma","Wheezing","Influenza" D
.I '$D(APCLTAB8(X,1)) S APCLTAB8(X,1)=0
.I '$D(APCLTAB8(X,0)) S APCLTAB8(X,0)=0
S APCLX="" F S APCLX=$O(APCLTAB8(APCLX)) Q:APCLX=""!($D(APCLQUIT)) D
.W APCLX,?26,$$C($G(APCLTAB8(APCLX,1)),0,7),?46,$$C($G(APCLTAB8(APCLX,0)),0,7)
.W ?66,$$C(($G(APCLTAB8(APCLX,1))+$G(APCLTAB8(APCLX,0))),0,7),!
.W $$REPEAT^XLFSTR("-",79),!
.Q
Q:$D(APCLQUIT)
;write footer
I $Y>(IOSL-6) D HEADER^APCLSILR Q:$D(APCLQUIT)
W !!,"Note: Follow up investigation is needed to determine if the adverse event"
W !,"could be associated with vaccine adverse events that may be a result of"
W !,"vaccination should be reported to the Vaccine Adverse Event Reporting"
W !,"System (VAERS)."
W !
Q
TAB8SUB ;
W "TABLE 8: Potential Adverse Events Related to H1N1 Live Virus"
W !,"Adverse",?40,"Patients who received"
W !,"Events",?40,"H1N1 Live"
W !?40,"Nasal Vaccine"
W !,$$REPEAT^XLFSTR("-",79)
W !
Q
TAB9 ;EP - WRITE OUT TABLE 7
Q ;table 9 taken out in patch 27
D HEADER^APCLSILR
W "TABLE 9: Adverse Events without an ILI / H1N1 vaccination"
W !!,"This table contains a tally of all patient visits during the time"
W !,"period ",$$FMTE^XLFDT(APCLBD)," to ",$$FMTE^XLFDT(APCLED)
W !,"where a potential ILI or H1N1 adverse event is diagnosed for a "
W !,"patient that does not have a documented H1N1 or ILI vaccination. "
W !,"These adverse events diagnoses are:"
W !?5,"Thrombocytopenia (ICD Codes): 287.31; 287.4; 287.5"
W !?5,"Encephalitis/Myelitis (ICD Codes): 323.5; 323.51; 323.52; 323.6; 323.61;"
W !?10,"323.62; 323.63; 323.8; 323.81; 323.82; 323.9; 341.2"
W !?10,"Neuritis (ICD Codes): 351.0; 357.0; specifically Bell's palsy,"
W !?10,"Guillain-Barre' syndrome, postinfectious polyneuritis"
W !?5,"Optic Neuritis (ICD Codes): 377.30; 377.31; 377.32; 377.39"
W !?5,"Anaphylactic Shock (ICD Codes): 995.0; 999.4"
W !?5,"Other diagnosis in the SURVEILLANCE ADV EV NO H1N1 taxonomy: 798*; 674.90;"
W !?10,"674.92; 674.94;"
W !,"When finding the date of the most recent H1N1 vaccine, the search starts"
W !,"on the 1st of June prior to the end date selected by the user. If the"
W !,"patient does not have a documented H1N1 vaccine after June 1 it is "
W !,"assumed that they did not have a vaccination this 'flu season'."
I $Y>(IOSL-16) D HEADER^APCLSILR Q:$D(APCLQUIT)
W !,"Diagnosis or",?40,"No ILI or H1N1 Vaccination"
W !,"Conditions",?40,"# visits"
W !,$$REPEAT^XLFSTR("-",79)
W !
F X="Thrombocytopenia","Anaphylactic Shock","Sudden Death","Optic Neuritis","Encephalitis/Myelitis" D
.I '$D(APCLTAB9(X)) S APCLTAB9(X)=0
S APCLX="" F S APCLX=$O(APCLTAB9(APCLX)) Q:APCLX=""!($D(APCLQUIT)) D
.W APCLX,?40,$$C($G(APCLTAB9(APCLX)),0,7),!,!
.W $$REPEAT^XLFSTR("-",79),!
.Q
Q
TAB9SUB ;
W "TABLE 9: Adverse Events without an ILI / H1N1 vaccination"
W !,"Diagnosis or",?40,"No ILI or H1N1 Vaccination"
W !,"Conditions",?40,"# visits"
W !,$$REPEAT^XLFSTR("-",79)
W !
Q
APCLSILT ;IHS/CMI/LAB - AGGREGATE ILI REPORT PRINT; ; 10 Oct 2011 7:36 AM
+1 ;;3.0;IHS PCC REPORTS;**24,25,26,27,28,29,30**;FEB 05, 1997;Build 27
C(X,X2,X3) ;
+1 DO COMMA^%DTC
+2 QUIT X
+3 ;
+4 ;
ILISEX ;EP
+1 DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
+2 WRITE "TABLE 2: ILI Diagnoses by Sex"
+3 WRITE !,"This table provides a patient/visit count, by sex, for ILI diagnosis. An ILI"
+4 WRITE !,"diagnosis is defined as a visit with an diagnosis contained in the "
+5 WRITE !,"SURVEILLANCE ILI NO TMP NEEDED taxonomy."
+6 WRITE !," OR"
+7 WRITE !,"a temperature of >=100 AND one of the ICD diagnosis in the SURVEILLANCE ILI"
+8 WRITE !,"taxonomy."
+9 WRITE !!,"An unduplicated count of patients is also provided.",!!,?40,"# patients",?60,"# visits",!
+10 IF APCLLOCT="O"
GOTO LOCSEX
+11 WRITE !,"ALL FACILITIES COMBINED",!
+12 SET APCLSEX=""
FOR
SET APCLSEX=$ORDER(APCLILIS(APCLSEX))
IF APCLSEX=""!($DATA(APCLQUIT))
QUIT
Begin DoDot:1
+13 IF $Y>(IOSL-3)
DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
DO SUBHEAD3
+14 WRITE ?2,APCLSEX,?40,$$C($PIECE(APCLILIS(APCLSEX),U,2),0,7),?60,$$C($PIECE(APCLILIS(APCLSEX),U,1),0,7),!
+15 QUIT
End DoDot:1
+16 IF $DATA(APCLQUIT)
QUIT
+17 WRITE $$REPEAT^XLFSTR("-",79),!
LOCSEX SET APCLLOC=""
FOR
SET APCLLOC=$ORDER(APCLSEXL(APCLLOC))
IF APCLLOC=""!($DATA(APCLQUIT))
QUIT
Begin DoDot:1
+1 IF $Y>(IOSL-8)
DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
DO SUBHEAD3
+2 WRITE !!,APCLLOC
+3 SET APCLSEX=""
FOR
SET APCLSEX=$ORDER(APCLSEXL(APCLLOC,APCLSEX))
IF APCLSEX=""!($DATA(APCLQUIT))
QUIT
Begin DoDot:2
+4 WRITE !?2,APCLSEX,?40,$$C($PIECE(APCLSEXL(APCLLOC,APCLSEX),U,2),0,7),?60,$$C($PIECE(APCLSEXL(APCLLOC,APCLSEX),U,1),0,7),!
End DoDot:2
+5 WRITE $$REPEAT^XLFSTR("-",79),!
End DoDot:1
+6 QUIT
ILIAVM ;EP - meds
+1 DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
+2 WRITE "TABLE 3: ILI Anti-Viral Medications Dispensed"
+3 WRITE !,"This table provides a count by drug name of the number of visits on which"
+4 WRITE !,"an Anti-Viral Medication was dispensed. Anti-Viral Medications are defined"
+5 WRITE !,"as any medication contained in the FLU ANTIVIRAL MEDS taxonomy or any "
+6 WRITE !,"Medication whose drug name contains OSELTAMIVIR or ZANAMIVIR. An unduplicated"
+7 WRITE !," unduplicated count of patients is also provided.",!,?40,"# patients",?60,"# visits",!
+8 SET APCLD=""
FOR
SET APCLD=$ORDER(APCLMEDS(APCLD))
IF APCLD=""!($DATA(APCLQUIT))
QUIT
Begin DoDot:1
+9 IF $Y>(IOSL-3)
DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
DO SUBHEAD4
+10 WRITE ?2,APCLD,?40,$$C($PIECE(APCLMEDS(APCLD),U,2),0,7),?60,$$C($PIECE(APCLMEDS(APCLD),U,1),0,7),!
+11 QUIT
End DoDot:1
+12 QUIT
SUBHEAD3 ;
+1 WRITE !,"TABLE 2: ILI Diagnoses by Sex",!,?40,"# patients",?60,"# visits",!
+2 QUIT
SUBHEAD4 ;
+1 WRITE "TABLE 3: ILI Anti-Viral Medications Dispensed",!!,?40,"# patients",?60,"# prescriptions",!
+2 QUIT
ILIAGEP ;EP
+1 DO HEADER^APCLSILR
+2 WRITE "TABLE 4: ILI Diagnoses by Age by Visit"
+3 WRITE !,"This table displays a visit count by age group. Only visits on which "
+4 WRITE !,"there was at least one ILI diagnosis are counted. An ILI diagnosis"
+5 WRITE !,"is defined as a visit with one of the codes in the SURVEILLANCE ILI"
+6 WRITE !,"NO TMP NEEDED taxonomy."
+7 WRITE !," OR"
+8 WRITE !,"a temperature of >=100 AND one of the codes in the SURVEILLANCE ILI"
+9 WRITE !,"taxonomy."
+10 WRITE !,"The visits have to be defined as 'surveillance' visits. The definition "
+11 WRITE !,"of these visits is the following:"
+12 WRITE !," - a Hospitalization"
+13 WRITE !," - a visit to a PHN"
+14 WRITE !," - an Ambulatory visit (service categories A, O, R, S) to one of the "
+15 WRITE !," following clinics: 01 GENERAL, 06 DIABETIC, 10 GYN, 12 IMMUNIZATION,"
+16 WRITE !," 13 INTERNAL MEDICINE, 20 PEDIATRICS, 24 WELL CHILD CARE, "
+17 WRITE !," 28 FAMILY PRACTICE, 30 EMERGENCY ROOM, 57 EPSDT, "
+18 WRITE !," 70 WOMEN'S HEALTH, 80 URGENT CARE, 89 EVENING"
+19 WRITE !!,"Age",?19," 0-4y",?29,"5-24y",?39,"25-49y",?49,"50-64y",?59,"65y+",?69,"TOTAL",!
+20 WRITE !,"Ambulatory ILI"
+21 WRITE ?19,$$C($GET(APCLAGEG("I","A","0-4y")),0,7)
+22 WRITE ?29,$$C($GET(APCLAGEG("I","A","5-24y")),0,7)
+23 WRITE ?39,$$C($GET(APCLAGEG("I","A","25-49y")),0,7)
+24 WRITE ?49,$$C($GET(APCLAGEG("I","A","50-64y")),0,7)
+25 WRITE ?59,$$C($GET(APCLAGEG("I","A","65y+")),0,7)
+26 WRITE ?69,$$C($GET(APCLAGEG("I","A","TOTAL")),0,7),!
+27 WRITE "Diagnosis",!
+28 WRITE $$REPEAT^XLFSTR("-",79),!
+29 ;W !,"Ambulatory"
+30 ;W ?14,$$C($G(APCLAGEG("H","A","6-23m")),0,7)
+31 ;W ?22,$$C($G(APCLAGEG("H","A","24-59m")),0,7)
+32 ;W ?30,$$C($G(APCLAGEG("H","A","60m-18y")),0,7)
+33 ;W ?38,$$C($G(APCLAGEG("H","A","19-24y")),0,7)
+34 ;W ?46,$$C($G(APCLAGEG("H","A","25-49y")),0,7)
+35 ;W ?54,$$C($G(APCLAGEG("H","A","50-64y")),0,7)
+36 ;W ?62,$$C($G(APCLAGEG("H","A","65+y")),0,7)
+37 ;W ?72,$$C($G(APCLAGEG("H","A","TOTAL")),0,7),!
+38 ;W "H1N1 DXS",!
+39 ;W $$REPEAT^XLFSTR("-",79),!
+40 WRITE !,"Hospital ILI"
+41 WRITE ?19,$$C($GET(APCLAGEG("I","H","0-4y")),0,7)
+42 WRITE ?29,$$C($GET(APCLAGEG("I","H","5-24y")),0,7)
+43 WRITE ?39,$$C($GET(APCLAGEG("I","H","25-49y")),0,7)
+44 WRITE ?49,$$C($GET(APCLAGEG("I","H","50-64y")),0,7)
+45 WRITE ?59,$$C($GET(APCLAGEG("I","H","65y+")),0,7)
+46 WRITE ?69,$$C($GET(APCLAGEG("I","H","TOTAL")),0,7),!
+47 WRITE "Diagnosis",!
+48 WRITE $$REPEAT^XLFSTR("-",79),!
+49 ;W !,"Hospital"
+50 ;W ?14,$$C($G(APCLAGEG("H","H","6-23m")),0,7)
+51 ;W ?22,$$C($G(APCLAGEG("H","H","24-59m")),0,7)
+52 ;W ?30,$$C($G(APCLAGEG("H","H","60m-18y")),0,7)
+53 ;W ?38,$$C($G(APCLAGEG("H","H","19-24y")),0,7)
+54 ;W ?46,$$C($G(APCLAGEG("H","H","25-49y")),0,7)
+55 ;W ?54,$$C($G(APCLAGEG("H","H","50-64y")),0,7)
+56 ;W ?62,$$C($G(APCLAGEG("H","H","65+y")),0,7)
+57 ;W ?72,$$C($G(APCLAGEG("H","H","TOTAL")),0,7),!
+58 ;W "H1N1 DXS",!
+59 ;W $$REPEAT^XLFSTR("-",79),!
+60 QUIT
VACAGEP ;EP
+1 DO HEADER^APCLSILR
+2 WRITE "TABLE 5: Seasonal Flu Immunizations by Age by Visit"
+3 WRITE !,"This table displays a count for immunizations by age group. Only visits on"
+4 WRITE !,"which a Seasonal Flu immunization was dispensed are counted. The "
+5 WRITE !,"definition of the immunizations are:"
+6 WRITE !," - Seasonal Flu: Immunization CVX codes 15, 16, 88, 111, 135, 140, 141, 144,"
+7 WRITE !," 149, 151, 153, 155, 158"
+8 WRITE !," CPT 90654-90662, 90672-90673, 90685-90686, 90724, G0008, G8108"
+9 WRITE !," Diagnoses V04.8, V04.81, V06.6"
+10 WRITE !," Procedure: 99.52"
+11 IF APCLLOCT="O"
GOTO LOCAGE
+12 WRITE !!,"ALL FACILITIES"
+13 WRITE !!,"Age",?14," 6-23m",?22,"24-59m",?30,"60m-18y",?38,"19-24y",?46,"25-49y",?54,"50-64y",?62," 65+y",?72,"TOTAL",!
+14 WRITE !,"Seasonal"
+15 WRITE ?14,$$C($GET(APCLIMMG("I","A","6-23m")),0,7)
+16 WRITE ?22,$$C($GET(APCLIMMG("I","A","24-59m")),0,7)
+17 WRITE ?30,$$C($GET(APCLIMMG("I","A","60m-18y")),0,7)
+18 WRITE ?38,$$C($GET(APCLIMMG("I","A","19-24y")),0,7)
+19 WRITE ?46,$$C($GET(APCLIMMG("I","A","25-49y")),0,7)
+20 WRITE ?54,$$C($GET(APCLIMMG("I","A","50-64y")),0,7)
+21 WRITE ?62,$$C($GET(APCLIMMG("I","A","65+y")),0,7)
+22 WRITE ?72,$$C($GET(APCLIMMG("I","A","TOTAL")),0,7),!
+23 WRITE "Flu",!
+24 WRITE $$REPEAT^XLFSTR("-",79),!
+25 ;W !,"H1N1"
+26 ;W ?14,$$C($G(APCLIMMG("H","A","6-23m")),0,7)
+27 ;W ?22,$$C($G(APCLIMMG("H","A","24-59m")),0,7)
+28 ;W ?30,$$C($G(APCLIMMG("H","A","60m-18y")),0,7)
+29 ;W ?38,$$C($G(APCLIMMG("H","A","19-24y")),0,7)
+30 ;W ?46,$$C($G(APCLIMMG("H","A","25-49y")),0,7)
+31 ;W ?54,$$C($G(APCLIMMG("H","A","50-64y")),0,7)
+32 ;W ?62,$$C($G(APCLIMMG("H","A","65+y")),0,7)
+33 ;W ?72,$$C($G(APCLIMMG("H","A","TOTAL")),0,7),!
+34 ;W $$REPEAT^XLFSTR("-",79),!
LOCAGE WRITE !
+1 SET APCLLOC=""
FOR
SET APCLLOC=$ORDER(APCLIMML(APCLLOC))
IF APCLLOC=""!($DATA(APCLQUIT))
QUIT
Begin DoDot:1
+2 IF $Y>(IOSL-14)
DO HEADER^APCLSILR
+3 WRITE !!,APCLLOC
+4 WRITE !!,"Age",?14," 6-23m",?22,"24-59m",?30,"60m-18y",?38,"19-24y",?46,"25-49y",?54,"50-64y",?62," 65+y",?72,"TOTAL",!
+5 WRITE !,"Seasonal"
+6 WRITE ?14,$$C($GET(APCLIMML(APCLLOC,"I","A","6-23m")),0,7)
+7 WRITE ?22,$$C($GET(APCLIMML(APCLLOC,"I","A","24-59m")),0,7)
+8 WRITE ?30,$$C($GET(APCLIMML(APCLLOC,"I","A","60m-18y")),0,7)
+9 WRITE ?38,$$C($GET(APCLIMML(APCLLOC,"I","A","19-24y")),0,7)
+10 WRITE ?46,$$C($GET(APCLIMML(APCLLOC,"I","A","25-49y")),0,7)
+11 WRITE ?54,$$C($GET(APCLIMML(APCLLOC,"I","A","50-64y")),0,7)
+12 WRITE ?62,$$C($GET(APCLIMML(APCLLOC,"I","A","65+y")),0,7)
+13 WRITE ?72,$$C($GET(APCLIMML(APCLLOC,"I","A","TOTAL")),0,7),!
+14 WRITE "Flu",!
+15 WRITE $$REPEAT^XLFSTR("-",79),!
+16 ;W !,"H1N1"
+17 ;W ?14,$$C($G(APCLIMML(APCLLOC,"H","A","6-23m")),0,7)
+18 ;W ?22,$$C($G(APCLIMML(APCLLOC,"H","A","24-59m")),0,7)
+19 ;W ?30,$$C($G(APCLIMML(APCLLOC,"H","A","60m-18y")),0,7)
+20 ;W ?38,$$C($G(APCLIMML(APCLLOC,"H","A","19-24y")),0,7)
+21 ;W ?46,$$C($G(APCLIMML(APCLLOC,"H","A","25-49y")),0,7)
+22 ;W ?54,$$C($G(APCLIMML(APCLLOC,"H","A","50-64y")),0,7)
+23 ;W ?62,$$C($G(APCLIMML(APCLLOC,"H","A","65+y")),0,7)
+24 ;W ?72,$$C($G(APCLIMML(APCLLOC,"H","A","TOTAL")),0,7),!
+25 ;W $$REPEAT^XLFSTR("-",79),!
End DoDot:1
+26 QUIT
+27 DO HEADER^APCLSILR
+28 WRITE "TABLE 7: Potential Adverse Events"
+29 WRITE !!,"This table contains a tally of all patients who were seen for a"
+30 WRITE !,"diagnosis that may be considered to be an adverse event. Adverse"
+31 WRITE !,"Event diagnoses are:"
+32 WRITE !,"ITP: 287.31"
+33 WRITE !,"2nd TP: 287.4"
+34 WRITE !,"TP: 287.5"
+35 WRITE !,"Bells Palsy: 351.0"
+36 WRITE !,"GBS: 357.0"
+37 WRITE !,"Febrile Seizures Simple: 780.31 < 5 yrs"
+38 WRITE !,"Febrile Seizures Complex: 780.32 < 5 yrs"
+39 IF $Y>(IOSL-16)
DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
+40 DO TAB7SUB
+41 WRITE !,$$REPEAT^XLFSTR("-",79)
+42 WRITE !
+43 IF '$DATA(APCLTAB7)
WRITE !!,"There were no visits for adverse events during the time period.",!!
QUIT
+44 FOR X="ITP: 287.31","2nd TP: 287.4","TP: 287.5","Bells Palsy: 351.0","GBS: 357.0","Febrile Seizures Simple: 780.31 < 5 yrs","Febrile Seizures Complex: 780.32 < 5 yrs"
Begin DoDot:1
+45 IF '$DATA(APCLTAB7(X,1))
SET APCLTAB7(X,1)=0
+46 IF '$DATA(APCLTAB7(X,0))
SET APCLTAB7(X,0)=0
End DoDot:1
+47 FOR APCLX="ITP: 287.31","2nd TP: 287.4","TP: 287.5","Bells Palsy: 351.0","GBS: 357.0","Febrile Seizures Simple: 780.31 < 5 yrs","Febrile Seizures Complex: 780.32 < 5 yrs"
IF $DATA(APCLQUIT)
QUIT
Begin DoDot:1
+48 IF $LENGTH(APCLX)<25
WRITE APCLX
+49 IF $LENGTH(APCLX)>24
WRITE $PIECE(APCLX,":",1),!,$PIECE(APCLX,":",2)
+50 WRITE ?26,$$C($GET(APCLTAB7(APCLX,1)),0,7),?46,$$C($GET(APCLTAB7(APCLX,0)),0,7)
+51 WRITE ?66,$$C(($GET(APCLTAB7(APCLX,0))+$GET(APCLTAB7(APCLX,1))),0,7),!
+52 WRITE $$REPEAT^XLFSTR("-",79),!
+53 QUIT
End DoDot:1
+54 IF $DATA(APCLQUIT)
QUIT
+55 ;write footer
+56 IF $Y>(IOSL-6)
DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
+57 WRITE !!,"Note: Follow up investigation is needed to determine if the adverse event"
+58 WRITE !,"could be associated with vaccine adverse events that may be a result of"
+59 WRITE !,"vaccination should be reported to the Vaccine Adverse Event Reporting"
+60 WRITE !,"System (VAERS)."
+61 WRITE !
+62 QUIT
TAB7SUB ;
+1 WRITE !!,"TABLE 7: Potential Adverse Events"
+2 WRITE !,"Potential Adverse",?26,"Seasonal flu",?46,"No seasonal flu",?66,"Total # of"
+3 WRITE !,"Events",?26,"vaccine in the ",?46,"vaccine in the",?66,"Adverse Events"
+4 WRITE !?26,"60 days prior to",?46,"60 days prior to"
+5 WRITE !?26,"adverse event",?46,"adverse event"
+6 WRITE !,$$REPEAT^XLFSTR("-",79)
+7 WRITE !
+8 QUIT
TAB8 ;EP - WRITE OUT TABLE 8
+1 DO HEADER^APCLSILR
+2 WRITE "TABLE 8: Potential Adverse Events from live virus seasonal Flu vaccine"
+3 WRITE !!,"This table contains a tally of all patients who were seen for a"
+4 WRITE !,"diagnosis that may be considered to be an adverse event after"
+5 WRITE !,"receiving the Seasonal Flu Live Virus vaccine."
+6 WRITE !,"The adverse event diagnoses are:"
+7 WRITE !?5,"Asthma (ICD Codes): 493.0*, 493.9*"
+8 WRITE !?5,"Wheezing (ICD Codes): 786.07"
+9 WRITE !?5,"Influenza (ICD Codes): 488.1 (H1N1)"
+10 WRITE !
+11 IF $Y>(IOSL-16)
DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
+12 WRITE !,"Potential Adverse",?26,"Live virus vaccine",?46,"No Live virus",?66,"Total # of"
+13 WRITE !,"Events",?26,"(CVX code 111) 14",?46,"vaccine (CVX code",?66,"Adverse Events"
+14 WRITE !?26,"days prior to",?46,"111) 14 days prior"
+15 WRITE !?26,"adverse event",?46,"to adverse event"
+16 WRITE !
+17 WRITE !,$$REPEAT^XLFSTR("-",79)
+18 WRITE !
+19 IF '$DATA(APCLTAB8)
WRITE !!,"There were no visits for adverse events during the time period.",!!
QUIT
+20 FOR X="Asthma","Wheezing","Influenza"
Begin DoDot:1
+21 IF '$DATA(APCLTAB8(X,1))
SET APCLTAB8(X,1)=0
+22 IF '$DATA(APCLTAB8(X,0))
SET APCLTAB8(X,0)=0
End DoDot:1
+23 SET APCLX=""
FOR
SET APCLX=$ORDER(APCLTAB8(APCLX))
IF APCLX=""!($DATA(APCLQUIT))
QUIT
Begin DoDot:1
+24 WRITE APCLX,?26,$$C($GET(APCLTAB8(APCLX,1)),0,7),?46,$$C($GET(APCLTAB8(APCLX,0)),0,7)
+25 WRITE ?66,$$C(($GET(APCLTAB8(APCLX,1))+$GET(APCLTAB8(APCLX,0))),0,7),!
+26 WRITE $$REPEAT^XLFSTR("-",79),!
+27 QUIT
End DoDot:1
+28 IF $DATA(APCLQUIT)
QUIT
+29 ;write footer
+30 IF $Y>(IOSL-6)
DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
+31 WRITE !!,"Note: Follow up investigation is needed to determine if the adverse event"
+32 WRITE !,"could be associated with vaccine adverse events that may be a result of"
+33 WRITE !,"vaccination should be reported to the Vaccine Adverse Event Reporting"
+34 WRITE !,"System (VAERS)."
+35 WRITE !
+36 QUIT
TAB8SUB ;
+1 WRITE "TABLE 8: Potential Adverse Events Related to H1N1 Live Virus"
+2 WRITE !,"Adverse",?40,"Patients who received"
+3 WRITE !,"Events",?40,"H1N1 Live"
+4 WRITE !?40,"Nasal Vaccine"
+5 WRITE !,$$REPEAT^XLFSTR("-",79)
+6 WRITE !
+7 QUIT
TAB9 ;EP - WRITE OUT TABLE 7
+1 ;table 9 taken out in patch 27
QUIT
+2 DO HEADER^APCLSILR
+3 WRITE "TABLE 9: Adverse Events without an ILI / H1N1 vaccination"
+4 WRITE !!,"This table contains a tally of all patient visits during the time"
+5 WRITE !,"period ",$$FMTE^XLFDT(APCLBD)," to ",$$FMTE^XLFDT(APCLED)
+6 WRITE !,"where a potential ILI or H1N1 adverse event is diagnosed for a "
+7 WRITE !,"patient that does not have a documented H1N1 or ILI vaccination. "
+8 WRITE !,"These adverse events diagnoses are:"
+9 WRITE !?5,"Thrombocytopenia (ICD Codes): 287.31; 287.4; 287.5"
+10 WRITE !?5,"Encephalitis/Myelitis (ICD Codes): 323.5; 323.51; 323.52; 323.6; 323.61;"
+11 WRITE !?10,"323.62; 323.63; 323.8; 323.81; 323.82; 323.9; 341.2"
+12 WRITE !?10,"Neuritis (ICD Codes): 351.0; 357.0; specifically Bell's palsy,"
+13 WRITE !?10,"Guillain-Barre' syndrome, postinfectious polyneuritis"
+14 WRITE !?5,"Optic Neuritis (ICD Codes): 377.30; 377.31; 377.32; 377.39"
+15 WRITE !?5,"Anaphylactic Shock (ICD Codes): 995.0; 999.4"
+16 WRITE !?5,"Other diagnosis in the SURVEILLANCE ADV EV NO H1N1 taxonomy: 798*; 674.90;"
+17 WRITE !?10,"674.92; 674.94;"
+18 WRITE !,"When finding the date of the most recent H1N1 vaccine, the search starts"
+19 WRITE !,"on the 1st of June prior to the end date selected by the user. If the"
+20 WRITE !,"patient does not have a documented H1N1 vaccine after June 1 it is "
+21 WRITE !,"assumed that they did not have a vaccination this 'flu season'."
+22 IF $Y>(IOSL-16)
DO HEADER^APCLSILR
IF $DATA(APCLQUIT)
QUIT
+23 WRITE !,"Diagnosis or",?40,"No ILI or H1N1 Vaccination"
+24 WRITE !,"Conditions",?40,"# visits"
+25 WRITE !,$$REPEAT^XLFSTR("-",79)
+26 WRITE !
+27 FOR X="Thrombocytopenia","Anaphylactic Shock","Sudden Death","Optic Neuritis","Encephalitis/Myelitis"
Begin DoDot:1
+28 IF '$DATA(APCLTAB9(X))
SET APCLTAB9(X)=0
End DoDot:1
+29 SET APCLX=""
FOR
SET APCLX=$ORDER(APCLTAB9(APCLX))
IF APCLX=""!($DATA(APCLQUIT))
QUIT
Begin DoDot:1
+30 WRITE APCLX,?40,$$C($GET(APCLTAB9(APCLX)),0,7),!,!
+31 WRITE $$REPEAT^XLFSTR("-",79),!
+32 QUIT
End DoDot:1
+33 QUIT
TAB9SUB ;
+1 WRITE "TABLE 9: Adverse Events without an ILI / H1N1 vaccination"
+2 WRITE !,"Diagnosis or",?40,"No ILI or H1N1 Vaccination"
+3 WRITE !,"Conditions",?40,"# visits"
+4 WRITE !,$$REPEAT^XLFSTR("-",79)
+5 WRITE !
+6 QUIT