BGPDP24 ; IHS/CMI/LAB - print ind 24 ;
;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
;
;
I24 ;EP ;
;Q:'$D(BGPIND(24))
D HEADER^BGPDPH
W !,"Indicator 24: Adult Immunizations-Pneumovax and Flu Vaccine in Diabetics"
W !!,"Denominator 1 is all active users age 65 and over."
W !!,"Denominator 2 is all patients in the active user population diagnosed with",!,"diabetes (Indicator 1) who are aged 18 or older at the beginning of the ",!,"time period."
W !,"Increase pneumococcal and influenza vaccination levels among adults ages 65",!,"and older and Diabetics ages 18 and older.",!
I $Y>(IOSL-5) D HEADER^BGPDPH Q:BGPQUIT
D H1^BGPDPH
S BGPCYD=$$V(BGPRPT,17,1)
S BGPCYN=$$V(BGPRPT,17,2),BGPCYP=$S(BGPCYD:((BGPCYN/BGPCYD)*100),1:"")
S BGP98D=$$V(BGPRPT,87,1)
S BGP98N=$$V(BGPRPT,87,2),BGP98P=$S(BGP98D:((BGP98N/BGP98D)*100),1:"")
S BGPPRD=$$V(BGPRPT,47,1)
S BGPPRN=$$V(BGPRPT,47,2),BGPPRP=$S(BGPPRD:((BGPPRN/BGPPRD)*100),1:"")
W !,"# Active Users",!?3,"ages 65 and over",?22,$$C(BGP98D,0,8),?37,$$C(BGPPRD,0,8),?52,$$C(BGPCYD,0,8)
W !!,"# With Pneumovax",!?2,"documented by the",!?2,"end of time period"
D H2^BGPDPH
S BGPCYD=$$V(BGPRPT,17,1)
S BGPCYN=$$V(BGPRPT,17,3),BGPCYP=$S(BGPCYD:((BGPCYN/BGPCYD)*100),1:"")
S BGP98D=$$V(BGPRPT,87,1)
S BGP98N=$$V(BGPRPT,87,3),BGP98P=$S(BGP98D:((BGP98N/BGP98D)*100),1:"")
S BGPPRD=$$V(BGPRPT,47,1)
S BGPPRN=$$V(BGPRPT,47,3),BGPPRP=$S(BGPPRD:((BGPPRN/BGPPRD)*100),1:"")
I $Y>(IOSL-5) D HEADER^BGPDPH Q:BGPQUIT
W !!,"# With Flu Vaccine",!?2,"documented by the",!?2,"end of time period"
D H2^BGPDPH
DM ;
S BGPCYD=$$V(BGPRPT,17,5)
S BGPCYN=$$V(BGPRPT,17,6),BGPCYP=$S(BGPCYD:((BGPCYN/BGPCYD)*100),1:"")
S BGP98D=$$V(BGPRPT,87,5)
S BGP98N=$$V(BGPRPT,87,6),BGP98P=$S(BGP98D:((BGP98N/BGP98D)*100),1:"")
S BGPPRD=$$V(BGPRPT,47,5)
S BGPPRN=$$V(BGPRPT,47,6),BGPPRP=$S(BGPPRD:((BGPPRN/BGPPRD)*100),1:"")
W !!!,"# Active Users",!?3,"ages 18 and over",!?3,"with Diabetes",?22,$$C(BGP98D,0,8),?37,$$C(BGPPRD,0,8),?52,$$C(BGPCYD,0,8)
W !!,"# With Pneumovax",!?2,"documented by the",!?2,"end of time period"
D H2^BGPDPH
S BGPCYD=$$V(BGPRPT,17,5)
S BGPCYN=$$V(BGPRPT,17,7),BGPCYP=$S(BGPCYD:((BGPCYN/BGPCYD)*100),1:"")
S BGP98D=$$V(BGPRPT,87,5)
S BGP98N=$$V(BGPRPT,87,7),BGP98P=$S(BGP98D:((BGP98N/BGP98D)*100),1:"")
S BGPPRD=$$V(BGPRPT,47,5)
S BGPPRN=$$V(BGPRPT,47,7),BGPPRP=$S(BGPPRD:((BGPPRN/BGPPRD)*100),1:"")
I $Y>(IOSL-5) D HEADER^BGPDPH Q:BGPQUIT
W !!,"# With Flu Vaccine",!?2,"documented by the",!?2,"end of time period"
D H2^BGPDPH
Q
CALC(N,O) ;ENTRY POINT
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
V(R,N,P) ;
NEW Y
I $G(BGPAREAA),'$G(BGPSUMR) G VA
Q $P($G(^BGPD(R,N)),U,P)
VA ;
NEW X,C,V,MT,FT,M,F,B S X=0,C="" F S X=$O(BGPSUL(X)) Q:X'=+X D
.S V=$P($G(^BGPD(X,N)),U,P)
.I C="" S C=V Q
.S MT=$P(C,"!"),FT=$P(C,"!",2),M=$P(V,"!"),F=$P(V,"!",2)
.F B=1:1:6 S $P(MT,"~",B)=$P(MT,"~",B)+$P(M,"~",B)
.F B=1:1:6 S $P(FT,"~",B)=$P(FT,"~",B)+$P(F,"~",B)
.S C=MT_"!"_FT
.Q
Q C
C(X,X2,X3) ;
D COMMA^%DTC
Q X
BGPDP24 ; IHS/CMI/LAB - print ind 24 ;
+1 ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
+2 ;
+3 ;
I24 ;EP ;
+1 ;Q:'$D(BGPIND(24))
+2 DO HEADER^BGPDPH
+3 WRITE !,"Indicator 24: Adult Immunizations-Pneumovax and Flu Vaccine in Diabetics"
+4 WRITE !!,"Denominator 1 is all active users age 65 and over."
+5 WRITE !!,"Denominator 2 is all patients in the active user population diagnosed with",!,"diabetes (Indicator 1) who are aged 18 or older at the beginning of the ",!,"time period."
+6 WRITE !,"Increase pneumococcal and influenza vaccination levels among adults ages 65",!,"and older and Diabetics ages 18 and older.",!
+7 IF $Y>(IOSL-5)
DO HEADER^BGPDPH
IF BGPQUIT
QUIT
+8 DO H1^BGPDPH
+9 SET BGPCYD=$$V(BGPRPT,17,1)
+10 SET BGPCYN=$$V(BGPRPT,17,2)
SET BGPCYP=$SELECT(BGPCYD:((BGPCYN/BGPCYD)*100),1:"")
+11 SET BGP98D=$$V(BGPRPT,87,1)
+12 SET BGP98N=$$V(BGPRPT,87,2)
SET BGP98P=$SELECT(BGP98D:((BGP98N/BGP98D)*100),1:"")
+13 SET BGPPRD=$$V(BGPRPT,47,1)
+14 SET BGPPRN=$$V(BGPRPT,47,2)
SET BGPPRP=$SELECT(BGPPRD:((BGPPRN/BGPPRD)*100),1:"")
+15 WRITE !,"# Active Users",!?3,"ages 65 and over",?22,$$C(BGP98D,0,8),?37,$$C(BGPPRD,0,8),?52,$$C(BGPCYD,0,8)
+16 WRITE !!,"# With Pneumovax",!?2,"documented by the",!?2,"end of time period"
+17 DO H2^BGPDPH
+18 SET BGPCYD=$$V(BGPRPT,17,1)
+19 SET BGPCYN=$$V(BGPRPT,17,3)
SET BGPCYP=$SELECT(BGPCYD:((BGPCYN/BGPCYD)*100),1:"")
+20 SET BGP98D=$$V(BGPRPT,87,1)
+21 SET BGP98N=$$V(BGPRPT,87,3)
SET BGP98P=$SELECT(BGP98D:((BGP98N/BGP98D)*100),1:"")
+22 SET BGPPRD=$$V(BGPRPT,47,1)
+23 SET BGPPRN=$$V(BGPRPT,47,3)
SET BGPPRP=$SELECT(BGPPRD:((BGPPRN/BGPPRD)*100),1:"")
+24 IF $Y>(IOSL-5)
DO HEADER^BGPDPH
IF BGPQUIT
QUIT
+25 WRITE !!,"# With Flu Vaccine",!?2,"documented by the",!?2,"end of time period"
+26 DO H2^BGPDPH
DM ;
+1 SET BGPCYD=$$V(BGPRPT,17,5)
+2 SET BGPCYN=$$V(BGPRPT,17,6)
SET BGPCYP=$SELECT(BGPCYD:((BGPCYN/BGPCYD)*100),1:"")
+3 SET BGP98D=$$V(BGPRPT,87,5)
+4 SET BGP98N=$$V(BGPRPT,87,6)
SET BGP98P=$SELECT(BGP98D:((BGP98N/BGP98D)*100),1:"")
+5 SET BGPPRD=$$V(BGPRPT,47,5)
+6 SET BGPPRN=$$V(BGPRPT,47,6)
SET BGPPRP=$SELECT(BGPPRD:((BGPPRN/BGPPRD)*100),1:"")
+7 WRITE !!!,"# Active Users",!?3,"ages 18 and over",!?3,"with Diabetes",?22,$$C(BGP98D,0,8),?37,$$C(BGPPRD,0,8),?52,$$C(BGPCYD,0,8)
+8 WRITE !!,"# With Pneumovax",!?2,"documented by the",!?2,"end of time period"
+9 DO H2^BGPDPH
+10 SET BGPCYD=$$V(BGPRPT,17,5)
+11 SET BGPCYN=$$V(BGPRPT,17,7)
SET BGPCYP=$SELECT(BGPCYD:((BGPCYN/BGPCYD)*100),1:"")
+12 SET BGP98D=$$V(BGPRPT,87,5)
+13 SET BGP98N=$$V(BGPRPT,87,7)
SET BGP98P=$SELECT(BGP98D:((BGP98N/BGP98D)*100),1:"")
+14 SET BGPPRD=$$V(BGPRPT,47,5)
+15 SET BGPPRN=$$V(BGPRPT,47,7)
SET BGPPRP=$SELECT(BGPPRD:((BGPPRN/BGPPRD)*100),1:"")
+16 IF $Y>(IOSL-5)
DO HEADER^BGPDPH
IF BGPQUIT
QUIT
+17 WRITE !!,"# With Flu Vaccine",!?2,"documented by the",!?2,"end of time period"
+18 DO H2^BGPDPH
+19 QUIT
CALC(N,O) ;ENTRY POINT
+1 NEW Z
+2 IF O=0!(N=0)!(O="")!(N="")
QUIT "**"
+3 NEW X,X2,X3
+4 SET X=N
SET X2=1
SET X3=0
DO COMMA^%DTC
SET N=X
+5 SET X=O
SET X2=1
SET X3=0
DO COMMA^%DTC
SET O=X
+6 IF +O=0
QUIT "**"
+7 SET Z=(((N-O)/O)*100)
SET Z=$FNUMBER(Z,"+,",1)
+8 QUIT Z
V(R,N,P) ;
+1 NEW Y
+2 IF $GET(BGPAREAA)
IF '$GET(BGPSUMR)
GOTO VA
+3 QUIT $PIECE($GET(^BGPD(R,N)),U,P)
VA ;
+1 NEW X,C,V,MT,FT,M,F,B
SET X=0
SET C=""
FOR
SET X=$ORDER(BGPSUL(X))
IF X'=+X
QUIT
Begin DoDot:1
+2 SET V=$PIECE($GET(^BGPD(X,N)),U,P)
+3 IF C=""
SET C=V
QUIT
+4 SET MT=$PIECE(C,"!")
SET FT=$PIECE(C,"!",2)
SET M=$PIECE(V,"!")
SET F=$PIECE(V,"!",2)
+5 FOR B=1:1:6
SET $PIECE(MT,"~",B)=$PIECE(MT,"~",B)+$PIECE(M,"~",B)
+6 FOR B=1:1:6
SET $PIECE(FT,"~",B)=$PIECE(FT,"~",B)+$PIECE(F,"~",B)
+7 SET C=MT_"!"_FT
+8 QUIT
End DoDot:1
+9 QUIT C
C(X,X2,X3) ;
+1 DO COMMA^%DTC
+2 QUIT X