BUD9RP7Q ; IHS/CMI/LAB - UDS REPORT DRIVER TABLE 6B ;
;;10.0;IHS/RPMS UNIFORM DATA SYSTEM;;FEB 04, 2016;Build 50
;
;
;
DMRACE1 ;EP - called from taskman
;S BUDPREN=1,BUDSITE=2582,BUDBD=3030101,BUDED=3031231
;S BUDQUIT=0
D HEADER^BUD9RPTP Q:BUDQUIT D T7H^BUD9RP7P
W ?29,"|Unreported/",?49,"|",?69,"|",!
W ?29,"|Refused to",?49,"|",?55,"Total",?69,"|",!
W ?29,"| Report",?49,"|",?69,"|",!
D LINE^BUD9RP7P
I $Y>(IOSL-3) D HEADER^BUD9RPTP Q:BUDQUIT D T7H^BUD9RP7P
W ?69,"|",!
W $$CTR("SECTION C: DIABETES BY RACE AND HISPANIC/LATINO IDENTITY",69),?69,"|",! ;,?79,"|",!
D LINE^BUD9RP7P
W $$CTR("Patients 18 to 75 diagnosed with Type I or Type II diabetes:",69),?69,"|",!,$$CTR("Most recent test results",69),?69,"|",! ;,?79,"|",!
D LINE^BUD9RP7P
W ?2,"9",?5,"Total patients",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"with diabetes",?29,"|",$$C($P($G(BUDSECTC(9)),U,16)),?49,"|",$$C($P($G(BUDSECTC(9)),U,17)),?69,"|",! ;,?79,"|",!
D LINE1^BUD9RP7P
I $Y>(IOSL-3) D HEADER^BUD9RPTP Q:BUDQUIT D T7H^BUD9RP7P
W ?1,"10",?5,"Charts sampled or",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"EHR total",?29,"|",$$C($P($G(BUDSECTC(10)),U,16)),?49,"|",$$C($P($G(BUDSECTC(10)),U,17)),?69,"|",! ;,?79,"|",!
D LINE1^BUD9RP7P
I $Y>(IOSL-3) D HEADER^BUD9RPTP Q:BUDQUIT D T7H^BUD9RP7P
W ?1,"11",?5,"Patients with ",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"HBA1c < 7%",?29,"|",$$C($P($G(BUDSECTC(11)),U,16)),?49,"|",$$C($P($G(BUDSECTC(11)),U,17)),?69,"|",! ;,?79,"|",!
D LINE1^BUD9RP7P
I $Y>(IOSL-3) D HEADER^BUD9RPTP Q:BUDQUIT D T7H^BUD9RP7P
W ?1,"12",?5,"Patients with ",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"7% >= HBA1c <= 9%",?29,"|",$$C($P($G(BUDSECTC(12)),U,16)),?49,"|",$$C($P($G(BUDSECTC(12)),U,17)),?69,"|",! ;,?79,"|",!
D LINE1^BUD9RP7P
I $Y>(IOSL-3) D HEADER^BUD9RPTP Q:BUDQUIT D T7H^BUD9RP7P
W ?1,"13",?5,"Patients with ",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"HBA1c > 9% OR No",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"test during year",?29,"|",$$C($P($G(BUDSECTC(13)),U,16)),?49,"|",$$C($P($G(BUDSECTC(13)),U,17)),?69,"|",! ;,?79,"|",!
D LINE1^BUD9RP7P
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")
;----------
PAUSE ;
K DIR S DIR(0)="E",DIR("A")="PRESS ENTER" KILL DA D ^DIR KILL DIR
Q
C(X,Y) ;
I $G(Y)=1,+X=0 Q ""
I $G(Y)=2 Q "********"
S X2=0,X3=8
D COMMA^%DTC
Q X
BUD9RP7Q ; IHS/CMI/LAB - UDS REPORT DRIVER TABLE 6B ;
+1 ;;10.0;IHS/RPMS UNIFORM DATA SYSTEM;;FEB 04, 2016;Build 50
+2 ;
+3 ;
+4 ;
DMRACE1 ;EP - called from taskman
+1 ;S BUDPREN=1,BUDSITE=2582,BUDBD=3030101,BUDED=3031231
+2 ;S BUDQUIT=0
+3 DO HEADER^BUD9RPTP
IF BUDQUIT
QUIT
DO T7H^BUD9RP7P
+4 WRITE ?29,"|Unreported/",?49,"|",?69,"|",!
+5 WRITE ?29,"|Refused to",?49,"|",?55,"Total",?69,"|",!
+6 WRITE ?29,"| Report",?49,"|",?69,"|",!
+7 DO LINE^BUD9RP7P
+8 IF $Y>(IOSL-3)
DO HEADER^BUD9RPTP
IF BUDQUIT
QUIT
DO T7H^BUD9RP7P
+9 WRITE ?69,"|",!
+10 ;,?79,"|",!
WRITE $$CTR("SECTION C: DIABETES BY RACE AND HISPANIC/LATINO IDENTITY",69),?69,"|",!
+11 DO LINE^BUD9RP7P
+12 ;,?79,"|",!
WRITE $$CTR("Patients 18 to 75 diagnosed with Type I or Type II diabetes:",69),?69,"|",!,$$CTR("Most recent test results",69),?69,"|",!
+13 DO LINE^BUD9RP7P
+14 ;,?79,"|",!
WRITE ?2,"9",?5,"Total patients",?29,"|",?49,"|",?69,"|",!
+15 ;,?79,"|",!
WRITE ?5,"with diabetes",?29,"|",$$C($PIECE($GET(BUDSECTC(9)),U,16)),?49,"|",$$C($PIECE($GET(BUDSECTC(9)),U,17)),?69,"|",!
+16 DO LINE1^BUD9RP7P
+17 IF $Y>(IOSL-3)
DO HEADER^BUD9RPTP
IF BUDQUIT
QUIT
DO T7H^BUD9RP7P
+18 ;,?79,"|",!
WRITE ?1,"10",?5,"Charts sampled or",?29,"|",?49,"|",?69,"|",!
+19 ;,?79,"|",!
WRITE ?5,"EHR total",?29,"|",$$C($PIECE($GET(BUDSECTC(10)),U,16)),?49,"|",$$C($PIECE($GET(BUDSECTC(10)),U,17)),?69,"|",!
+20 DO LINE1^BUD9RP7P
+21 IF $Y>(IOSL-3)
DO HEADER^BUD9RPTP
IF BUDQUIT
QUIT
DO T7H^BUD9RP7P
+22 ;,?79,"|",!
WRITE ?1,"11",?5,"Patients with ",?29,"|",?49,"|",?69,"|",!
+23 ;,?79,"|",!
WRITE ?5,"HBA1c < 7%",?29,"|",$$C($PIECE($GET(BUDSECTC(11)),U,16)),?49,"|",$$C($PIECE($GET(BUDSECTC(11)),U,17)),?69,"|",!
+24 DO LINE1^BUD9RP7P
+25 IF $Y>(IOSL-3)
DO HEADER^BUD9RPTP
IF BUDQUIT
QUIT
DO T7H^BUD9RP7P
+26 ;,?79,"|",!
WRITE ?1,"12",?5,"Patients with ",?29,"|",?49,"|",?69,"|",!
+27 ;,?79,"|",!
WRITE ?5,"7% >= HBA1c <= 9%",?29,"|",$$C($PIECE($GET(BUDSECTC(12)),U,16)),?49,"|",$$C($PIECE($GET(BUDSECTC(12)),U,17)),?69,"|",!
+28 DO LINE1^BUD9RP7P
+29 IF $Y>(IOSL-3)
DO HEADER^BUD9RPTP
IF BUDQUIT
QUIT
DO T7H^BUD9RP7P
+30 ;,?79,"|",!
WRITE ?1,"13",?5,"Patients with ",?29,"|",?49,"|",?69,"|",!
+31 ;,?79,"|",!
WRITE ?5,"HBA1c > 9% OR No",?29,"|",?49,"|",?69,"|",!
+32 ;,?79,"|",!
WRITE ?5,"test during year",?29,"|",$$C($PIECE($GET(BUDSECTC(13)),U,16)),?49,"|",$$C($PIECE($GET(BUDSECTC(13)),U,17)),?69,"|",!
+33 DO LINE1^BUD9RP7P
+34 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 ;----------
PAUSE ;
+1 KILL DIR
SET DIR(0)="E"
SET DIR("A")="PRESS ENTER"
KILL DA
DO ^DIR
KILL DIR
+2 QUIT
C(X,Y) ;
+1 IF $GET(Y)=1
IF +X=0
QUIT ""
+2 IF $GET(Y)=2
QUIT "********"
+3 SET X2=0
SET X3=8
+4 DO COMMA^%DTC
+5 QUIT X