CIMGAGPM ; CMI/TUCSON/LAB - aberdeen gpra print ; [ 03/15/00 7:28 AM ]
;;1.0;ABERDEEN GPRA REPORT;;JAN 22, 2000
;
;
PHN ;
Q:CIMQUIT
D HEADER Q:CIMQUIT
W !,"19/2000 Public Health Nursing",!,"Assure the total number of public health nursing services provided to ",!,"individuals in all settings and the total number of home visits are",!,"increased by 5% over the FY 1998 workload baselines",!
W !,"Public Health Nursing - # served by PHS in any Setting"
W !?44,"% CHANGE"
S CIMDO=0 F S CIMDO=$O(CIMSUL(CIMDO)) Q:CIMDO'=+CIMDO!(CIMQUIT) D
.S CIMGX=$$V(CIMDO,1,1),CIMGY=$$V(CIMDO,12,1)
.S CIMG1=$$V(CIMDO,19,25),CIMG1B=$$V(CIMDO,20,25)
.S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
.D LOCW Q:CIMQUIT
.W ?44,$J($$CALC(CIMG1P,CIMG1BP),7)
A ;
Q:CIMQUIT
D HEADER Q:CIMQUIT
W !,"19/2000 Public Health Nursing",!,"Assure the total number of public health nursing services provided to ",!,"individuals in all settings and the total number of home visits are",!,"increased by 5% over the FY 1998 workload baselines",!
W !,"Public Health Nursing - # served by PHN in HOME setting"
W !?44,"% CHANGE"
S CIMDO=0 F S CIMDO=$O(CIMSUL(CIMDO)) Q:CIMDO'=+CIMDO!(CIMQUIT) D
.S CIMG1=$$V(CIMDO,19,26),CIMG1B=$$V(CIMDO,20,26)
.S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
.D LOCW Q:CIMQUIT
.W ?44,$J($$CALC(CIMG1P,CIMG1BP),7)
B ;
Q:CIMQUIT
D HEADER Q:CIMQUIT
W !,"19/2000 Public Health Nursing",!,"Assure the total number of public health nursing services provided to ",!,"individuals in all settings and the total number of home visits are",!,"increased by 5% over the FY 1998 workload baselines",!
W !,"Public Health Nursing - # PHN Visits any Setting"
W !?44,"% CHANGE"
S CIMDO=0 F S CIMDO=$O(CIMSUL(CIMDO)) Q:CIMDO'=+CIMDO!(CIMQUIT) D
.D LOCW Q:CIMQUIT
.S X=$$V(CIMDO,20,18),Y=$$V(CIMDO,19,18),%=$S(X:((Y-X)/X)*100,1:"") W ?44,$J(%,5,1)
Q:CIMQUIT
D HEADER Q:CIMQUIT
W !,"19/2000 Public Health Nursing",!,"Assure the total number of public health nursing services provided to ",!,"individuals in all settings and the total number of home visits are",!,"increased by 5% over the FY 1998 workload baselines",!
W !,"Public Health Nursing - # PHN Visits in the HOME"
W !?44,"% CHANGE"
S CIMDO=0 F S CIMDO=$O(CIMSUL(CIMDO)) Q:CIMDO'=+CIMDO!(CIMQUIT) D
.D LOCW Q:CIMQUIT
.S X=$$V(CIMDO,20,19),Y=$$V(CIMDO,19,19),%=$S(X:((Y-X)/X)*100,1:"") W ?44,$J(%,5,1)
FLUPNEU ;
Q:CIMQUIT
D HEADER Q:CIMQUIT
W !,"21/2000 Adult Immunization",!,"Produce an overall pneumoccal and influenza vaccination level of at least 60%",!,"for adults aged 65 and older.",!
W !,"Adult Immunizations - Pneumovax ever"
W !?44,"Total Percent"
S CIMDO=0 F S CIMDO=$O(CIMSUL(CIMDO)) Q:CIMDO'=+CIMDO!(CIMQUIT) D
.S CIMGX=$$V(CIMDO,19,20),CIMGY=$$V(CIMDO,20,20)
.S CIMG1=$$V(CIMDO,19,21),CIMG1B=$$V(CIMDO,20,21)
.S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
.D LOCW Q:CIMQUIT
.W ?44,$J(CIMG1P,6,1)
Q:CIMQUIT
D HEADER Q:CIMQUIT
W !,"21/2000 Adult Immunization",!,"Produce an overall pneumoccal and influenza vaccination level of at least 60%",!,"for adults aged 65 and older.",!
W !,"Adult Immunizations - Flu Vaccine"
W !?44,"Total Percent"
S CIMDO=0 F S CIMDO=$O(CIMSUL(CIMDO)) Q:CIMDO'=+CIMDO!(CIMQUIT) D
.S CIMG1=$$V(CIMDO,19,22),CIMG1B=$$V(CIMDO,20,22)
.S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
.D LOCW Q:CIMQUIT W ?44,$J(CIMG1P,6,1)
SMOKER ;
Q:CIMQUIT
D HEADER Q:CIMQUIT
W !!,"24/2000 Smoking",!,"Determine Area-age specific prevalance rates for the",!,"usage of tobacco products.",!
I $Y>(IOSL-5) D HEADER Q:CIMQUIT
W !,"Prevalance of Usage of Tobacco Products"
W !?44,"% CHANGE"
S CIMDO=0 F S CIMDO=$O(CIMSUL(CIMDO)) Q:CIMDO'=+CIMDO!(CIMQUIT) D
.S CIMGX=$$V(CIMDO,22,10),CIMGY=$$V(CIMDO,23,10)
.S CIMG1=$$V(CIMDO,22,1),CIMG1B=$$V(CIMDO,23,1)
.S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
.D LOCW Q:CIMQUIT W ?44,$J($$CALC(CIMG1P,CIMG1BP),7)
Q
CALC(N,O) ;ENTRY POINT
;N is new
;O is old
NEW Z
I O=0!(N=0)!(O="")!(N="") Q "**"
NEW X,X2,X3
S X=N,X2=1,X3=0 D COMMA^%DTC S N=X
S X=O,X2=1,X3=0 D COMMA^%DTC S O=X
I +O=0 Q "**"
S Z=(((N-O)/O)*100),Z=$FN(Z,"+,",1)
Q Z
LOCW ;
I $Y>(IOSL-3) D HEADER Q:CIMQUIT
W !?3,$P(^CIMAGP(CIMDO,0),U,5)
S X=$P(^CIMAGP(CIMDO,0),U,5)
I X="" W ?11,"?????" Q
S X=$O(^AUTTLOC("C",X,0))
I X="" W ?11,"?????" Q
W ?11,$E($P(^DIC(4,X,0),U),1,20)
Q
V(R,N,P) ;
Q $P($G(^CIMAGP(R,N)),U,P)
C(X,X2,X3) ;
D COMMA^%DTC
Q X
G:'CIMGPG HEADER1
K DIR I $E(IOST)="C",IO=IO(0),'$D(ZTQUEUED) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S CIMQUIT=1 Q
W:$D(IOF) @IOF S CIMGPG=CIMGPG+1
W !?3,$P(^VA(200,DUZ,0),U,2),?35,$$FMTE^XLFDT(DT),?70,"Page ",CIMGPG,!
W !,$$CTR("*** ABERDEEN AREA GPRA INDICATORS ***",80),!
W $S(CIMSUCNT=1:$$CTR(CIMSUNM),1:$$CTR("AREA AGGREGATE")),!
S X="Reporting Period: "_$$FMTE^XLFDT(CIMBD)_" to "_$$FMTE^XLFDT(CIMED) W $$CTR(X,80),!
S X="Baseline Period: "_$$FMTE^XLFDT(CIM98B)_" to "_$$FMTE^XLFDT(CIM98E) W $$CTR(X,80),!
W !,$TR($J("",80)," ","-")
Q
CTR(X,Y) ;EP - Center X in a field Y wide.
Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
;----------
USR() ;EP - Return name of current user from ^VA(200.
Q $S($G(DUZ):$S($D(^VA(200,DUZ,0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0")
;----------
LOC() ;EP - Return location name from file 4 based on DUZ(2).
Q $S($G(DUZ(2)):$S($D(^DIC(4,DUZ(2),0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ(2) UNDEFINED OR 0")
;----------
CIMGAGPM ; CMI/TUCSON/LAB - aberdeen gpra print ; [ 03/15/00 7:28 AM ]
+1 ;;1.0;ABERDEEN GPRA REPORT;;JAN 22, 2000
+2 ;
+3 ;
PHN ;
+1 IF CIMQUIT
QUIT
+2 DO HEADER
IF CIMQUIT
QUIT
+3 WRITE !,"19/2000 Public Health Nursing",!,"Assure the total number of public health nursing services provided to ",!,"individuals in all settings and the total number of home visits are",!,"increased by 5% over the FY 1998 workload baselines",!
+4 WRITE !,"Public Health Nursing - # served by PHS in any Setting"
+5 WRITE !?44,"% CHANGE"
+6 SET CIMDO=0
FOR
SET CIMDO=$ORDER(CIMSUL(CIMDO))
IF CIMDO'=+CIMDO!(CIMQUIT)
QUIT
Begin DoDot:1
+7 SET CIMGX=$$V(CIMDO,1,1)
SET CIMGY=$$V(CIMDO,12,1)
+8 SET CIMG1=$$V(CIMDO,19,25)
SET CIMG1B=$$V(CIMDO,20,25)
+9 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+10 DO LOCW
IF CIMQUIT
QUIT
+11 WRITE ?44,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7)
End DoDot:1
A ;
+1 IF CIMQUIT
QUIT
+2 DO HEADER
IF CIMQUIT
QUIT
+3 WRITE !,"19/2000 Public Health Nursing",!,"Assure the total number of public health nursing services provided to ",!,"individuals in all settings and the total number of home visits are",!,"increased by 5% over the FY 1998 workload baselines",!
+4 WRITE !,"Public Health Nursing - # served by PHN in HOME setting"
+5 WRITE !?44,"% CHANGE"
+6 SET CIMDO=0
FOR
SET CIMDO=$ORDER(CIMSUL(CIMDO))
IF CIMDO'=+CIMDO!(CIMQUIT)
QUIT
Begin DoDot:1
+7 SET CIMG1=$$V(CIMDO,19,26)
SET CIMG1B=$$V(CIMDO,20,26)
+8 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+9 DO LOCW
IF CIMQUIT
QUIT
+10 WRITE ?44,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7)
End DoDot:1
B ;
+1 IF CIMQUIT
QUIT
+2 DO HEADER
IF CIMQUIT
QUIT
+3 WRITE !,"19/2000 Public Health Nursing",!,"Assure the total number of public health nursing services provided to ",!,"individuals in all settings and the total number of home visits are",!,"increased by 5% over the FY 1998 workload baselines",!
+4 WRITE !,"Public Health Nursing - # PHN Visits any Setting"
+5 WRITE !?44,"% CHANGE"
+6 SET CIMDO=0
FOR
SET CIMDO=$ORDER(CIMSUL(CIMDO))
IF CIMDO'=+CIMDO!(CIMQUIT)
QUIT
Begin DoDot:1
+7 DO LOCW
IF CIMQUIT
QUIT
+8 SET X=$$V(CIMDO,20,18)
SET Y=$$V(CIMDO,19,18)
SET %=$SELECT(X:((Y-X)/X)*100,1:"")
WRITE ?44,$JUSTIFY(%,5,1)
End DoDot:1
+9 IF CIMQUIT
QUIT
+10 DO HEADER
IF CIMQUIT
QUIT
+11 WRITE !,"19/2000 Public Health Nursing",!,"Assure the total number of public health nursing services provided to ",!,"individuals in all settings and the total number of home visits are",!,"increased by 5% over the FY 1998 workload baselines",!
+12 WRITE !,"Public Health Nursing - # PHN Visits in the HOME"
+13 WRITE !?44,"% CHANGE"
+14 SET CIMDO=0
FOR
SET CIMDO=$ORDER(CIMSUL(CIMDO))
IF CIMDO'=+CIMDO!(CIMQUIT)
QUIT
Begin DoDot:1
+15 DO LOCW
IF CIMQUIT
QUIT
+16 SET X=$$V(CIMDO,20,19)
SET Y=$$V(CIMDO,19,19)
SET %=$SELECT(X:((Y-X)/X)*100,1:"")
WRITE ?44,$JUSTIFY(%,5,1)
End DoDot:1
FLUPNEU ;
+1 IF CIMQUIT
QUIT
+2 DO HEADER
IF CIMQUIT
QUIT
+3 WRITE !,"21/2000 Adult Immunization",!,"Produce an overall pneumoccal and influenza vaccination level of at least 60%",!,"for adults aged 65 and older.",!
+4 WRITE !,"Adult Immunizations - Pneumovax ever"
+5 WRITE !?44,"Total Percent"
+6 SET CIMDO=0
FOR
SET CIMDO=$ORDER(CIMSUL(CIMDO))
IF CIMDO'=+CIMDO!(CIMQUIT)
QUIT
Begin DoDot:1
+7 SET CIMGX=$$V(CIMDO,19,20)
SET CIMGY=$$V(CIMDO,20,20)
+8 SET CIMG1=$$V(CIMDO,19,21)
SET CIMG1B=$$V(CIMDO,20,21)
+9 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+10 DO LOCW
IF CIMQUIT
QUIT
+11 WRITE ?44,$JUSTIFY(CIMG1P,6,1)
End DoDot:1
+12 IF CIMQUIT
QUIT
+13 DO HEADER
IF CIMQUIT
QUIT
+14 WRITE !,"21/2000 Adult Immunization",!,"Produce an overall pneumoccal and influenza vaccination level of at least 60%",!,"for adults aged 65 and older.",!
+15 WRITE !,"Adult Immunizations - Flu Vaccine"
+16 WRITE !?44,"Total Percent"
+17 SET CIMDO=0
FOR
SET CIMDO=$ORDER(CIMSUL(CIMDO))
IF CIMDO'=+CIMDO!(CIMQUIT)
QUIT
Begin DoDot:1
+18 SET CIMG1=$$V(CIMDO,19,22)
SET CIMG1B=$$V(CIMDO,20,22)
+19 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+20 DO LOCW
IF CIMQUIT
QUIT
WRITE ?44,$JUSTIFY(CIMG1P,6,1)
End DoDot:1
SMOKER ;
+1 IF CIMQUIT
QUIT
+2 DO HEADER
IF CIMQUIT
QUIT
+3 WRITE !!,"24/2000 Smoking",!,"Determine Area-age specific prevalance rates for the",!,"usage of tobacco products.",!
+4 IF $Y>(IOSL-5)
DO HEADER
IF CIMQUIT
QUIT
+5 WRITE !,"Prevalance of Usage of Tobacco Products"
+6 WRITE !?44,"% CHANGE"
+7 SET CIMDO=0
FOR
SET CIMDO=$ORDER(CIMSUL(CIMDO))
IF CIMDO'=+CIMDO!(CIMQUIT)
QUIT
Begin DoDot:1
+8 SET CIMGX=$$V(CIMDO,22,10)
SET CIMGY=$$V(CIMDO,23,10)
+9 SET CIMG1=$$V(CIMDO,22,1)
SET CIMG1B=$$V(CIMDO,23,1)
+10 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+11 DO LOCW
IF CIMQUIT
QUIT
WRITE ?44,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7)
End DoDot:1
+12 QUIT
CALC(N,O) ;ENTRY POINT
+1 ;N is new
+2 ;O is old
+3 NEW Z
+4 IF O=0!(N=0)!(O="")!(N="")
QUIT "**"
+5 NEW X,X2,X3
+6 SET X=N
SET X2=1
SET X3=0
DO COMMA^%DTC
SET N=X
+7 SET X=O
SET X2=1
SET X3=0
DO COMMA^%DTC
SET O=X
+8 IF +O=0
QUIT "**"
+9 SET Z=(((N-O)/O)*100)
SET Z=$FNUMBER(Z,"+,",1)
+10 QUIT Z
LOCW ;
+1 IF $Y>(IOSL-3)
DO HEADER
IF CIMQUIT
QUIT
+2 WRITE !?3,$PIECE(^CIMAGP(CIMDO,0),U,5)
+3 SET X=$PIECE(^CIMAGP(CIMDO,0),U,5)
+4 IF X=""
WRITE ?11,"?????"
QUIT
+5 SET X=$ORDER(^AUTTLOC("C",X,0))
+6 IF X=""
WRITE ?11,"?????"
QUIT
+7 WRITE ?11,$EXTRACT($PIECE(^DIC(4,X,0),U),1,20)
+8 QUIT
V(R,N,P) ;
+1 QUIT $PIECE($GET(^CIMAGP(R,N)),U,P)
C(X,X2,X3) ;
+1 DO COMMA^%DTC
+2 QUIT X
+1 IF 'CIMGPG
GOTO HEADER1
+2 KILL DIR
IF $EXTRACT(IOST)="C"
IF IO=IO(0)
IF '$DATA(ZTQUEUED)
WRITE !
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET CIMQUIT=1
QUIT
+1 IF $DATA(IOF)
WRITE @IOF
SET CIMGPG=CIMGPG+1
+2 WRITE !?3,$PIECE(^VA(200,DUZ,0),U,2),?35,$$FMTE^XLFDT(DT),?70,"Page ",CIMGPG,!
+3 WRITE !,$$CTR("*** ABERDEEN AREA GPRA INDICATORS ***",80),!
+4 WRITE $SELECT(CIMSUCNT=1:$$CTR(CIMSUNM),1:$$CTR("AREA AGGREGATE")),!
+5 SET X="Reporting Period: "_$$FMTE^XLFDT(CIMBD)_" to "_$$FMTE^XLFDT(CIMED)
WRITE $$CTR(X,80),!
+6 SET X="Baseline Period: "_$$FMTE^XLFDT(CIM98B)_" to "_$$FMTE^XLFDT(CIM98E)
WRITE $$CTR(X,80),!
+7 WRITE !,$TRANSLATE($JUSTIFY("",80)," ","-")
+8 QUIT
CTR(X,Y) ;EP - Center X in a field Y wide.
+1 QUIT $JUSTIFY("",$SELECT($DATA(Y):Y,1:IOM)-$LENGTH(X)\2)_X
+2 ;----------
USR() ;EP - Return name of current user from ^VA(200.
+1 QUIT $SELECT($GET(DUZ):$SELECT($DATA(^VA(200,DUZ,0)):$PIECE(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0")
+2 ;----------
LOC() ;EP - Return location name from file 4 based on DUZ(2).
+1 QUIT $SELECT($GET(DUZ(2)):$SELECT($DATA(^DIC(4,DUZ(2),0)):$PIECE(^(0),U),1:"UNKNOWN"),1:"DUZ(2) UNDEFINED OR 0")
+2 ;----------