BUDCRP7P ; IHS/CMI/LAB - UDS REPORT DRIVER TABLE 6B 03 Dec 2015 6:10 AM 30 Dec 2015 8:12 PM ;
;;10.0;IHS/RPMS UNIFORM DATA SYSTEM;;FEB 04, 2016;Build 50
;
;
PRINT ;EP
;S BUDPREN=1,BUDSITE=2582,BUDBD=3030101,BUDED=3031231
S BUDQUIT=0
D HEADER^BUDCRPTP Q:BUDQUIT D T7H
W ?29,"|Unreported/Refused",?49,"|",?69,"|",!
W ?29,"|to Report Race and",?49,"|",?55,"Total",?69,"|",!
W ?29,"|Identity (h)",?49,"|",?56,"(i)",?69,"|",!
D LINE
W "HIV Positive",?29,"|",?49,"|",?69,"|",!,"Pregnant Women",?29,"|*******************",?49,"|",$$C($P($G(BUDSECTH(1)),U,18)),?69,"|",! ;,?79,"|",!
D LINE1
W "(NO PRENATAL CARE PROVIDED? CHECK HERE: "_$S(BUDPREN=0:"X",1:""),")",?69,"|",!
D LINE
W $$CTR("SECTION A: DELIVERIES AND BIRTH WEIGHT BY RACE",80),?69,"|",!,$$CTR("AND HISPANIC/LATINO IDENTITY",80),?69,"|",!
D LINE
;W $$CTR("Deliveries and Babies by birth weight"),?69,"|",!
;D LINE
W ?2,"1",?5,"Prenatal care patients",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"who delivered during ",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"the year",?29,"| ",BUDXX,?49,"| ",BUDXX,?69,"|",! ;,?79,"|",!
D LINE1
I $Y>(IOSL-3) D HEADER^BUDCRPTP Q:BUDQUIT D T7H
W ?2,"2",?5,"Deliveries performed",?29,"|",?69,"|",! ;,?79,"|",!
W ?5,"by Grantee Provider",?29,"|***************************************",?69,"|",! ;,?79,"|",!
D LINE2
I $Y>(IOSL-3) D HEADER^BUDCRPTP Q:BUDQUIT D T7H
W ?2,"3",?5,"Live Births <1500",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"grams",?29,"| ",BUDXX,?49,"| ",BUDXX,?69,"|",! ;,?79,"|",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
D LINE1
I $Y>(IOSL-3) D HEADER^BUDCRPTP Q:BUDQUIT D T7H
W ?2,"4",?5,"Live Births 1500-",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"2499 grams",?29,"| ",BUDXX,?49,"| ",BUDXX,?69,"|",! ;,?79,"|",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
D LINE1
I $Y>(IOSL-3) D HEADER^BUDCRPTP Q:BUDQUIT D T7H
W ?2,"5",?5,"Live Births >=2500",?29,"| ",BUDXX,?49,"| ",BUDXX,?69,"|",! ;,?79,"|",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
D LINE1
;SECTION B
I $Y>(IOSL-16) D HEADER^BUDCRPTP Q:BUDQUIT D T7H
W ?69,"|",!
W $$CTR("SECTION B: HYPERTENSION BY RACE AND HISPANIC/LATINO IDENTITY",70),?69,"|",! ;,?79,"|",!
D LINE
W $$CTR("Patients 18 to 85 diagnosed with hypertension whose last ",70),?69,"|",! ;,?79,"|",!
W $$CTR("blood pressure was less than 140/90",70),?69,"|",! ;,?79,"|",!
D LINE
W ?2,"6",?5,"Total hypertensive",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"patients",?29,"|",$$C($P($G(BUDSECTB(6)),U,17)),?49,"|",$$C($P($G(BUDSECTB(6)),U,18)),?69,"|",! ;,?79,"|",!
D LINE1
I $Y>(IOSL-3) D HEADER^BUDCRPTP Q:BUDQUIT D T7H
W ?2,"7",?5,"Charts sampled /",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
W ?5,"EHR total",?29,"|",$$C($P($G(BUDSECTB(7)),U,17)),?49,"|",$$C($P($G(BUDSECTB(7)),U,18)),?69,"|",! ;,?79,"|",!
D LINE1
I $Y>(IOSL-3) D HEADER^BUDCRPTP Q:BUDQUIT D T7H
W ?2,"8",?5,"Patients with ",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
;W ?5,"controlled blood",?29,"|",?49,"|",?69,"|",?79,"|",!
W ?5,"HTN controlled",?29,"|",$$C($P($G(BUDSECTB(8)),U,17)),?49,"|",$$C($P($G(BUDSECTB(8)),U,18)),?69,"|",!
D LINE1
D DMRACE1^BUDCRP7Q ;rest of page 1
Q
;
;
T7H ;EP
W !,$$CTR("TABLE 7 - HEALTH OUTCOMES AND DISPARITIES"),!,$$REPEAT^XLFSTR("_",69),! ;,!?41,"HISPANIC/LATINO (1)",!
Q
LINE ;EP
W $$REPEAT^XLFSTR("_",69),?69,"|",!
Q
LINE1 ;EP
W $$REPEAT^XLFSTR("_",29),?29,"|",$$REPEAT^XLFSTR("_",19),?49,"|",$$REPEAT^XLFSTR("_",19),?69,"|",! ;$$REPEAT^XLFSTR("_",9),?79,"|",!
Q
LINE2 ;EP
W $$REPEAT^XLFSTR("_",29),?29,"|",$$REPEAT^XLFSTR("_",39),?69,"|",! ;_________",?79,"|",!
Q
;
LINE3 ;EP
W $$REPEAT^XLFSTR("_",29),?29,"|",$$REPEAT^XLFSTR("_",49),?79,"|",!
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
BUDCRP7P ; IHS/CMI/LAB - UDS REPORT DRIVER TABLE 6B 03 Dec 2015 6:10 AM 30 Dec 2015 8:12 PM ;
+1 ;;10.0;IHS/RPMS UNIFORM DATA SYSTEM;;FEB 04, 2016;Build 50
+2 ;
+3 ;
PRINT ;EP
+1 ;S BUDPREN=1,BUDSITE=2582,BUDBD=3030101,BUDED=3031231
+2 SET BUDQUIT=0
+3 DO HEADER^BUDCRPTP
IF BUDQUIT
QUIT
DO T7H
+4 WRITE ?29,"|Unreported/Refused",?49,"|",?69,"|",!
+5 WRITE ?29,"|to Report Race and",?49,"|",?55,"Total",?69,"|",!
+6 WRITE ?29,"|Identity (h)",?49,"|",?56,"(i)",?69,"|",!
+7 DO LINE
+8 ;,?79,"|",!
WRITE "HIV Positive",?29,"|",?49,"|",?69,"|",!,"Pregnant Women",?29,"|*******************",?49,"|",$$C($PIECE($GET(BUDSECTH(1)),U,18)),?69,"|",!
+9 DO LINE1
+10 WRITE "(NO PRENATAL CARE PROVIDED? CHECK HERE: "_$SELECT(BUDPREN=0:"X",1:""),")",?69,"|",!
+11 DO LINE
+12 WRITE $$CTR("SECTION A: DELIVERIES AND BIRTH WEIGHT BY RACE",80),?69,"|",!,$$CTR("AND HISPANIC/LATINO IDENTITY",80),?69,"|",!
+13 DO LINE
+14 ;W $$CTR("Deliveries and Babies by birth weight"),?69,"|",!
+15 ;D LINE
+16 ;,?79,"|",!
WRITE ?2,"1",?5,"Prenatal care patients",?29,"|",?49,"|",?69,"|",!
+17 ;,?79,"|",!
WRITE ?5,"who delivered during ",?29,"|",?49,"|",?69,"|",!
+18 ;,?79,"|",!
WRITE ?5,"the year",?29,"| ",BUDXX,?49,"| ",BUDXX,?69,"|",!
+19 DO LINE1
+20 IF $Y>(IOSL-3)
DO HEADER^BUDCRPTP
IF BUDQUIT
QUIT
DO T7H
+21 ;,?79,"|",!
WRITE ?2,"2",?5,"Deliveries performed",?29,"|",?69,"|",!
+22 ;,?79,"|",!
WRITE ?5,"by Grantee Provider",?29,"|***************************************",?69,"|",!
+23 DO LINE2
+24 IF $Y>(IOSL-3)
DO HEADER^BUDCRPTP
IF BUDQUIT
QUIT
DO T7H
+25 ;,?79,"|",!
WRITE ?2,"3",?5,"Live Births <1500",?29,"|",?49,"|",?69,"|",!
+26 ;,?79,"|",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
WRITE ?5,"grams",?29,"| ",BUDXX,?49,"| ",BUDXX,?69,"|",!
+27 DO LINE1
+28 IF $Y>(IOSL-3)
DO HEADER^BUDCRPTP
IF BUDQUIT
QUIT
DO T7H
+29 ;,?79,"|",!
WRITE ?2,"4",?5,"Live Births 1500-",?29,"|",?49,"|",?69,"|",!
+30 ;,?79,"|",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
WRITE ?5,"2499 grams",?29,"| ",BUDXX,?49,"| ",BUDXX,?69,"|",!
+31 DO LINE1
+32 IF $Y>(IOSL-3)
DO HEADER^BUDCRPTP
IF BUDQUIT
QUIT
DO T7H
+33 ;,?79,"|",?29,"|",?49,"|",?69,"|",! ;,?79,"|",!
WRITE ?2,"5",?5,"Live Births >=2500",?29,"| ",BUDXX,?49,"| ",BUDXX,?69,"|",!
+34 DO LINE1
+35 ;SECTION B
+36 IF $Y>(IOSL-16)
DO HEADER^BUDCRPTP
IF BUDQUIT
QUIT
DO T7H
+37 WRITE ?69,"|",!
+38 ;,?79,"|",!
WRITE $$CTR("SECTION B: HYPERTENSION BY RACE AND HISPANIC/LATINO IDENTITY",70),?69,"|",!
+39 DO LINE
+40 ;,?79,"|",!
WRITE $$CTR("Patients 18 to 85 diagnosed with hypertension whose last ",70),?69,"|",!
+41 ;,?79,"|",!
WRITE $$CTR("blood pressure was less than 140/90",70),?69,"|",!
+42 DO LINE
+43 ;,?79,"|",!
WRITE ?2,"6",?5,"Total hypertensive",?29,"|",?49,"|",?69,"|",!
+44 ;,?79,"|",!
WRITE ?5,"patients",?29,"|",$$C($PIECE($GET(BUDSECTB(6)),U,17)),?49,"|",$$C($PIECE($GET(BUDSECTB(6)),U,18)),?69,"|",!
+45 DO LINE1
+46 IF $Y>(IOSL-3)
DO HEADER^BUDCRPTP
IF BUDQUIT
QUIT
DO T7H
+47 ;,?79,"|",!
WRITE ?2,"7",?5,"Charts sampled /",?29,"|",?49,"|",?69,"|",!
+48 ;,?79,"|",!
WRITE ?5,"EHR total",?29,"|",$$C($PIECE($GET(BUDSECTB(7)),U,17)),?49,"|",$$C($PIECE($GET(BUDSECTB(7)),U,18)),?69,"|",!
+49 DO LINE1
+50 IF $Y>(IOSL-3)
DO HEADER^BUDCRPTP
IF BUDQUIT
QUIT
DO T7H
+51 ;,?79,"|",!
WRITE ?2,"8",?5,"Patients with ",?29,"|",?49,"|",?69,"|",!
+52 ;W ?5,"controlled blood",?29,"|",?49,"|",?69,"|",?79,"|",!
+53 WRITE ?5,"HTN controlled",?29,"|",$$C($PIECE($GET(BUDSECTB(8)),U,17)),?49,"|",$$C($PIECE($GET(BUDSECTB(8)),U,18)),?69,"|",!
+54 DO LINE1
+55 ;rest of page 1
DO DMRACE1^BUDCRP7Q
+56 QUIT
+57 ;
+58 ;
T7H ;EP
+1 ;,!?41,"HISPANIC/LATINO (1)",!
WRITE !,$$CTR("TABLE 7 - HEALTH OUTCOMES AND DISPARITIES"),!,$$REPEAT^XLFSTR("_",69),!
+2 QUIT
LINE ;EP
+1 WRITE $$REPEAT^XLFSTR("_",69),?69,"|",!
+2 QUIT
LINE1 ;EP
+1 ;$$REPEAT^XLFSTR("_",9),?79,"|",!
WRITE $$REPEAT^XLFSTR("_",29),?29,"|",$$REPEAT^XLFSTR("_",19),?49,"|",$$REPEAT^XLFSTR("_",19),?69,"|",!
+2 QUIT
LINE2 ;EP
+1 ;_________",?79,"|",!
WRITE $$REPEAT^XLFSTR("_",29),?29,"|",$$REPEAT^XLFSTR("_",39),?69,"|",!
+2 QUIT
+3 ;
LINE3 ;EP
+1 WRITE $$REPEAT^XLFSTR("_",29),?29,"|",$$REPEAT^XLFSTR("_",49),?79,"|",!
+2 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