CIMGAGPO ; CMI/TUCSON/LAB - aberdeen gpra print ; [ 01/28/00 11:15 AM ]
;;1.0;ABERDEEN GPRA REPORT;;JAN 22, 2000
;
;
IND33 ;
D HEADER Q:CIMQUIT
W !,"3/3 Diabetes",!,"Increase the proportion of I/T/U clients with diagnosed",!,"diabetes and hypertension that have achieved diabetic blood",!,"pressure control.",!
W !,"Blood Pressure Control"
W !?38,"BASELINE",?45," %",?56,"REPORT",?64," %",?71,"% CHANGE",!?38,"PERIOD",?56,"PERIOD"
S CIMGX=$$V(CIMRPT,1,10),CIMGY=$$V(CIMRPT,12,10)
S CIMG1=$$V(CIMRPT,17,1),CIMG1B=$$V(CIMRPT,18,1)
S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
W !?3,"# diagnosed diabetes",?36,$$C(CIMGY,0,9),?54,$$C(CIMGX,0,9)
W !?3,"# w/ diagnosed Hypertension",?36,$$C(CIMG1B,0,9),?44,$J(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$J(CIMG1P,6,1),?72,$J($$CALC(CIMG1P,CIMG1BP),7),!
S CIMGX=$$V(CIMRPT,17,1),CIMGY=$$V(CIMRPT,18,1)
S CIMG1=$$V(CIMRPT,17,2),CIMG1B=$$V(CIMRPT,18,2)
S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
W !?3,"# w/ Blood Pressure recorded within",!?5,"1 year of end of time period",?36,$$C(CIMG1B,0,9),?44,$J(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$J(CIMG1P,6,1),?72,$J($$CALC(CIMG1P,CIMG1BP),7),!
S CIMGX=$$V(CIMRPT,17,2),CIMGY=$$V(CIMRPT,18,2)
S CIMG1=$$V(CIMRPT,17,3),CIMG1B=$$V(CIMRPT,18,3)
S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
W !?3,"# w/ Ideal Control",?36,$$C(CIMG1B,0,9),?44,$J(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$J(CIMG1P,6,1),?72,$J($$CALC(CIMG1P,CIMG1BP),7)
S CIMG1=$$V(CIMRPT,17,4),CIMG1B=$$V(CIMRPT,18,4)
S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
W !?3,"# w/ Target Control",?36,$$C(CIMG1B,0,9),?44,$J(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$J(CIMG1P,6,1),?72,$J($$CALC(CIMG1P,CIMG1BP),7)
S CIMG1=$$V(CIMRPT,17,5),CIMG1B=$$V(CIMRPT,18,5)
S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
W !?3,"# w/ Adequate Control",?36,$$C(CIMG1B,0,9),?44,$J(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$J(CIMG1P,6,1),?72,$J($$CALC(CIMG1P,CIMG1BP),7)
S CIMG1=$$V(CIMRPT,17,6),CIMG1B=$$V(CIMRPT,18,6)
S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
W !?3,"# w/ Inadequate Control",?36,$$C(CIMG1B,0,9),?44,$J(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$J(CIMG1P,6,1),?72,$J($$CALC(CIMG1P,CIMG1BP),7)
S CIMG1=$$V(CIMRPT,17,7),CIMG1B=$$V(CIMRPT,18,7)
S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
W !?3,"# w/ Markedly Poor Control",?36,$$C(CIMG1B,0,9),?44,$J(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$J(CIMG1P,6,1),?72,$J($$CALC(CIMG1P,CIMG1BP),7)
IND44 ;hgb
D HEADER Q:CIMQUIT
W !,"4/4 Diabetes",!,"Increase the proportion of I/T/U clients with diagnosed",!,"diabetes who have been assessed for dyslipidemia by 3% over BASELINE level.",!
W !,"Assessmed for Dyslipidemia"
W !?38,"BASELINE",?45," %",?56,"REPORT",?64," %",?71,"% CHANGE",!?38,"PERIOD",?56,"PERIOD"
S CIMGX=$$V(CIMRPT,1,10),CIMGY=$$V(CIMRPT,12,10)
S CIMG1=$$V(CIMRPT,19,1),CIMG1B=$$V(CIMRPT,20,1)
S CIMG1P=$S(CIMGX:((CIMG1/CIMGX)*100),1:""),CIMG1BP=$S(CIMGY:((CIMG1B/CIMGY)*100),1:"")
W !?3,"# diagnosed diabetes",?36,$$C(CIMGY,0,9),?54,$$C(CIMGX,0,9)
W !?3,"# assessed for dyslipidemia within",!?5,"1 year of end of time period",?36,$$C(CIMG1B,0,9),?44,$J(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$J(CIMG1P,6,1),?72,$J($$CALC(CIMG1P,CIMG1BP),7)
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) ;
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 $$CTR($P(^DIC(4,DUZ(2),0),U)),!
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
CIMGAGPO ; CMI/TUCSON/LAB - aberdeen gpra print ; [ 01/28/00 11:15 AM ]
+1 ;;1.0;ABERDEEN GPRA REPORT;;JAN 22, 2000
+2 ;
+3 ;
IND33 ;
+1 DO HEADER
IF CIMQUIT
QUIT
+2 WRITE !,"3/3 Diabetes",!,"Increase the proportion of I/T/U clients with diagnosed",!,"diabetes and hypertension that have achieved diabetic blood",!,"pressure control.",!
+3 WRITE !,"Blood Pressure Control"
+4 WRITE !?38,"BASELINE",?45," %",?56,"REPORT",?64," %",?71,"% CHANGE",!?38,"PERIOD",?56,"PERIOD"
+5 SET CIMGX=$$V(CIMRPT,1,10)
SET CIMGY=$$V(CIMRPT,12,10)
+6 SET CIMG1=$$V(CIMRPT,17,1)
SET CIMG1B=$$V(CIMRPT,18,1)
+7 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+8 WRITE !?3,"# diagnosed diabetes",?36,$$C(CIMGY,0,9),?54,$$C(CIMGX,0,9)
+9 WRITE !?3,"# w/ diagnosed Hypertension",?36,$$C(CIMG1B,0,9),?44,$JUSTIFY(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$JUSTIFY(CIMG1P,6,1),?72,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7),!
+10 SET CIMGX=$$V(CIMRPT,17,1)
SET CIMGY=$$V(CIMRPT,18,1)
+11 SET CIMG1=$$V(CIMRPT,17,2)
SET CIMG1B=$$V(CIMRPT,18,2)
+12 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+13 WRITE !?3,"# w/ Blood Pressure recorded within",!?5,"1 year of end of time period",?36,$$C(CIMG1B,0,9),?44,$JUSTIFY(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$JUSTIFY(CIMG1P,6,1),?72,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7),!
+14 SET CIMGX=$$V(CIMRPT,17,2)
SET CIMGY=$$V(CIMRPT,18,2)
+15 SET CIMG1=$$V(CIMRPT,17,3)
SET CIMG1B=$$V(CIMRPT,18,3)
+16 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+17 WRITE !?3,"# w/ Ideal Control",?36,$$C(CIMG1B,0,9),?44,$JUSTIFY(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$JUSTIFY(CIMG1P,6,1),?72,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7)
+18 SET CIMG1=$$V(CIMRPT,17,4)
SET CIMG1B=$$V(CIMRPT,18,4)
+19 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+20 WRITE !?3,"# w/ Target Control",?36,$$C(CIMG1B,0,9),?44,$JUSTIFY(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$JUSTIFY(CIMG1P,6,1),?72,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7)
+21 SET CIMG1=$$V(CIMRPT,17,5)
SET CIMG1B=$$V(CIMRPT,18,5)
+22 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+23 WRITE !?3,"# w/ Adequate Control",?36,$$C(CIMG1B,0,9),?44,$JUSTIFY(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$JUSTIFY(CIMG1P,6,1),?72,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7)
+24 SET CIMG1=$$V(CIMRPT,17,6)
SET CIMG1B=$$V(CIMRPT,18,6)
+25 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+26 WRITE !?3,"# w/ Inadequate Control",?36,$$C(CIMG1B,0,9),?44,$JUSTIFY(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$JUSTIFY(CIMG1P,6,1),?72,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7)
+27 SET CIMG1=$$V(CIMRPT,17,7)
SET CIMG1B=$$V(CIMRPT,18,7)
+28 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+29 WRITE !?3,"# w/ Markedly Poor Control",?36,$$C(CIMG1B,0,9),?44,$JUSTIFY(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$JUSTIFY(CIMG1P,6,1),?72,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7)
IND44 ;hgb
+1 DO HEADER
IF CIMQUIT
QUIT
+2 WRITE !,"4/4 Diabetes",!,"Increase the proportion of I/T/U clients with diagnosed",!,"diabetes who have been assessed for dyslipidemia by 3% over BASELINE level.",!
+3 WRITE !,"Assessmed for Dyslipidemia"
+4 WRITE !?38,"BASELINE",?45," %",?56,"REPORT",?64," %",?71,"% CHANGE",!?38,"PERIOD",?56,"PERIOD"
+5 SET CIMGX=$$V(CIMRPT,1,10)
SET CIMGY=$$V(CIMRPT,12,10)
+6 SET CIMG1=$$V(CIMRPT,19,1)
SET CIMG1B=$$V(CIMRPT,20,1)
+7 SET CIMG1P=$SELECT(CIMGX:((CIMG1/CIMGX)*100),1:"")
SET CIMG1BP=$SELECT(CIMGY:((CIMG1B/CIMGY)*100),1:"")
+8 WRITE !?3,"# diagnosed diabetes",?36,$$C(CIMGY,0,9),?54,$$C(CIMGX,0,9)
+9 WRITE !?3,"# assessed for dyslipidemia within",!?5,"1 year of end of time period",?36,$$C(CIMG1B,0,9),?44,$JUSTIFY(CIMG1BP,6,1),?54,$$C(CIMG1,0,9),?62,$JUSTIFY(CIMG1P,6,1),?72,$JUSTIFY($$CALC(CIMG1P,CIMG1BP),7)
+10 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 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 $$CTR($PIECE(^DIC(4,DUZ(2),0),U)),!
+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