BGP7SDPD ; IHS/CMI/LAB - IHS summary page ;
;;17.1;IHS CLINICAL REPORTING;;MAY 10, 2017;Build 29
;
START ;
I '$G(BGPAREAA) Q
I BGPRTYPE'=1 Q
S BGPQUIT=""
D HEADER
D W^BGP7DP("GPRA DEVELOPMENTAL MEASURES",0,2,BGPPTYPE)
D W^BGP7DP("---------------------------",0,1,BGPPTYPE)
S BGPC=0 F S BGPC=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC)) Q:BGPC'=+BGPC!(BGPQUIT) D
.I BGPPTYPE="P",$Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
.S BGPC1=$O(^BGPSCAT("C",BGPC,0))
.D W^BGP7DP("",0,1,BGPPTYPE)
.D W^BGP7DP($P(^BGPSCAT(BGPC1,0),U),0,1,BGPPTYPE)
.S BGPO="" F S BGPO=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO)) Q:BGPO=""!(BGPQUIT) D
..S BGPPC=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,0))
..;Q:$P($G(^BGPINDGC(BGPPC,22)),U,13) ;part measure displays last
..I BGPPTYPE="P",$Y>(BGPIOSL-4) D HEADER Q:BGPQUIT
..I BGPPTYPE="P" D
...D W^BGP7DP($P(^BGPINDGC(BGPPC,22),U,4),0,2,BGPPTYPE,1,1)
...I $P(^BGPINDGC(BGPPC,22),U,7)]"" D W^BGP7DP($P(^BGPINDGC(BGPPC,22),U,7),0,1,BGPPTYPE,1,1) ;W !?1,$P(^BGPINDGC(BGPPC,22),U,7)
...I $P(^BGPINDGC(BGPPC,22),U,12)]"" D W^BGP7DP($P(^BGPINDGC(BGPPC,22),U,12),0,1,BGPPTYPE,1,1)
...S F=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,0))
...S F=$P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,F),U,4)
...D W^BGP7DP(F_$S($P(^BGPINDGC(BGPPC,0),U,4)["014.A"!($P(^BGPINDGC(BGPPC,0),U,4)["023.")!($P(^BGPINDGC(BGPPC,0),U,4)="016.A.1")!($P(^BGPINDGC(BGPPC,0),U,4)="016.A.5")!($P($G(^BGPINDGC(BGPPC,19)),U,13)):"",1:"%"),0,0,BGPPTYPE,5,50)
...D W^BGP7DP($P(^BGPINDGC(BGPPC,22),U,2),0,0,BGPPTYPE,6,60) ;,?65,$P(^BGPINDGC(BGPPC,22),U,3)
...I $P(^BGPINDGC(BGPPC,22),U,9)]""!($P(^BGPINDGC(BGPPC,22),U,10)]"")!($P(^BGPINDGC(BGPPC,22),U,11)]"") D W^BGP7DP($TR($P(^BGPINDGC(BGPPC,22),U,10),"$","^"),0,1,BGPPTYPE,6,60)
...S BGPSN=0 F S BGPSN=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN)) Q:BGPSN'=+BGPSN!(BGPQUIT) D
....S BGPSASU=$P(^BGPGPDCG(BGPSN,0),U,9),X=$O(^AUTTLOC("C",BGPSASU,0)) S BGPSNAM=$S(X:$P(^DIC(4,X,0),U),1:"?????"),BGPSNAM=$S($P(^BGPGPDCG(BGPSN,0),U,17):"+"_BGPSNAM,1:BGPSNAM)
....I $P(^BGPINDGC(BGPPC,0),U,4)["014.A"!($P(^BGPINDGC(BGPPC,0),U,4)["023.")!($P(^BGPINDGC(BGPPC,0),U,4)="016.A.1")!($P($G(^BGPINDGC(BGPPC,19)),U,13)) D I 1
.....I $Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
.....D W^BGP7DP(BGPSASU,0,1,BGPPTYPE,1,2)
.....D W^BGP7DP($E(BGPSNAM,1,12),0,0,BGPPTYPE,2,8)
.....D W^BGP7DP($J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U),7,0),0,0,BGPPTYPE,2,20)
.....D W^BGP7DP($J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2),7,0),0,0,BGPPTYPE,3,29)
.....D W^BGP7DP($J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3),7,0),0,0,BGPPTYPE,4,38)
....E D
.....I $Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
.....D W^BGP7DP(BGPSASU,0,1,BGPPTYPE,1,2)
.....D W^BGP7DP($E(BGPSNAM,1,12),0,0,BGPPTYPE,2,8)
.....D W^BGP7DP($J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U),7,1)_"%",0,0,BGPPTYPE,2,20)
.....D W^BGP7DP($J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2),7,1)_"%",0,0,BGPPTYPE,3,29)
.....D W^BGP7DP($J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3),7,1)_"%",0,0,BGPPTYPE,4,38)
..I BGPPTYPE="D" D
...D W^BGP7DP("",0,1,BGPPTYPE)
...S XX=" "_$P(^BGPINDGC(BGPPC,22),U,4)
...I $P(^BGPINDGC(BGPPC,22),U,7)]"" D W^BGP7DP(XX,0,1,BGPPTYPE,1) S XX=" "_$P(^BGPINDGC(BGPPC,22),U,7)
...I $P(^BGPINDGC(BGPPC,22),U,12)]"" D W^BGP7DP(XX,0,1,BGPPTYPE,1) S XX=" "_$P(^BGPINDGC(BGPPC,22),U,12)
...S F=$O(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,0))
...S F=$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,F),U,4)
...S $P(XX,U,5)=F_$S($P(^BGPINDGC(BGPPC,0),U,4)["014.A"!($P(^BGPINDGC(BGPPC,0),U,4)["023.")!($P(^BGPINDGC(BGPPC,0),U,4)="016.A.1")!($P($G(^BGPINDGC(BGPPC,19)),U,13)):"",1:"%")
...S $P(XX,U,6)=$P(^BGPINDGC(BGPPC,22),U,2) ;,$P(XX,U,7)=$P(^BGPINDGC(BGPPC,22),U,3)
...S BGPSN=0,BGPCNT=0 F S BGPSN=$O(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN)) Q:BGPSN'=+BGPSN S BGPCNT=BGPCNT+1 D
....S BGPSASU=$P(^BGPGPDCG(BGPSN,0),U,9),X=$O(^AUTTLOC("C",BGPSASU,0)),BGPSNAM=$S(X:$P(^DIC(4,X,0),U),1:"?????"),BGPSNAM=$S($P(^BGPGPDCG(BGPSN,0),U,17):"+"_BGPSNAM,1:BGPSNAM)
....I $P(^BGPINDGC(BGPPC,0),U,4)["014.A"!($P(^BGPINDGC(BGPPC,0),U,4)["023.")!($P(^BGPINDGC(BGPPC,0),U,4)="016.A.1")!($P(^BGPINDGC(BGPPC,0),U,4)="016.A.5")!($P($G(^BGPINDGC(BGPPC,19)),U,13)) D I 1
.....S X="",$P(X,U,1)=BGPSASU_" "_BGPSNAM
.....S $P(X,U,2)=+$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U)
.....S $P(X,U,3)=+$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2)
.....S $P(X,U,4)=+$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3)
.....;S $P(X,U,5)=$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,4)
....E D
.....S $P(X,U,1)=BGPSASU_" "_BGPSNAM
.....S $P(X,U,2)=$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U)_"%"
.....S $P(X,U,3)=$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2)_"%"
.....S $P(X,U,4)=$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3)_"%"
.....;S $P(X,U,5)=$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,4)_"%"
.....;S $P(X,U,5)=$P(^BGPINDGC(BGPPC,22),U,2),$P(X,U,6)=$P(^BGPINDGC(BGPPC,22),U,3)
.....;I BGPCNT=1 D S(XX,1,1) D
....I BGPCNT=1 D W^BGP7DP(XX,0,1,BGPPTYPE,1)
....S Y="" I $P(^BGPINDGC(BGPPC,22),U,9)]""!($P(^BGPINDGC(BGPPC,22),U,10)]"")!($P(^BGPINDGC(BGPPC,22),U,11)]"") S $P(Y,U,6)=$TR($P(^BGPINDGC(BGPPC,22),U,9),"$","^") D
.....S $P(Y,U,8)=$P(^BGPINDGC(BGPPC,22),U,11)
....I Y]"" D W^BGP7DP(Y,0,1,BGPPTYPE,1) ;D S(Y,1,1)
....D W^BGP7DP(X,0,1,BGPPTYPE,1) ;D S(X,1,1)
D W^BGP7DP(" ",0,1,BGPPTYPE) ;S X=" " D S(X,1,1)
I BGPPTYPE="P",$Y>(BGPIOSL-2) D HEADER Q:BGPQUIT
D W^BGP7DP("* Not GPRA Developmental measure but included to show percentage of",0,2,BGPPTYPE)
D W^BGP7DP("refusals with respect to GPRA Developmental measure.",0,1,BGPPTYPE)
D W^BGP7DP("",0,1,BGPPTYPE)
Q
;
D HEADER^BGP7DPH
D H1
Q
H1 ;
S X="GPRA DEVELOPMENTAL MEASURES CLINICAL PERFORMANCE DETAIL" D W^BGP7DP(X,1,1,BGPPTYPE)
D W^BGP7DP("Site",0,1,BGPPTYPE,2,21),W^BGP7DP("Site",0,0,BGPPTYPE,3,32),W^BGP7DP("Site",0,0,BGPPTYPE,4,40),W^BGP7DP("Area",0,0,BGPPTYPE,5,50) ;,W^BGP7DP("Nat'l",0,0,BGPPTYPE,6,60)
D W^BGP7DP("Current",0,1,BGPPTYPE,2,22),W^BGP7DP("Prev",0,0,BGPPTYPE,3,32),W^BGP7DP("Base",0,0,BGPPTYPE,4,40),W^BGP7DP("Current",0,0,BGPPTYPE,5,50) ;W^BGP7DP("2016",0,0,BGPPTYPE,6,60)
D W^BGP7DP($TR($J("",80)," ","-"),0,1,BGPPTYPE)
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")
;----------
PART ;
D HEADERP
S P1=$S($G(BGPNGR09):8,1:8)
S BGPC=0 F S BGPC=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC)) Q:BGPC'=+BGPC!(BGPQUIT) D
.I $Y>(BGPIOSL-3) D HEADERP Q:BGPQUIT
.S BGPC1=$O(^BGPSCAT("C",BGPC,0))
.;W !
.;W !,$P(^BGPSCAT(BGPC1,0),U)
.S BGPO="" F S BGPO=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO)) Q:BGPO=""!(BGPQUIT) D
..S BGPPC=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,0))
..Q:'$P($G(^BGPINDGC(BGPPC,22)),U,13)
..I $Y>(BGPIOSL-3) D HEADERP Q:BGPQUIT
..W !!?1,$P(^BGPINDGC(BGPPC,22),U,4)
..I $P(^BGPINDGC(BGPPC,22),U,7)]"" W !,$P(^BGPINDGC(BGPPC,22),U,7)
..I $P(^BGPINDGC(BGPPC,22),U,12)]"" W !,$P(^BGPINDGC(BGPPC,22),U,12)
..S F=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,0))
..S F=$P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,F),U,4)
..W ?50,F,$S($P(^BGPINDGC(BGPPC,0),U,4)["014.A"!($P(^BGPINDGC(BGPPC,0),U,4)["023.")!($P(^BGPINDGC(BGPPC,0),U,4)="016.A.1"):"",1:"%"),?60,$P(^BGPINDGC(BGPPC,22),U,P1),?65,$P(^BGPINDGC(BGPPC,22),U,2),?74,$P(^BGPINDGC(BGPPC,22),U,3)
..I $P(^BGPINDGC(BGPPC,22),U,9)]""!($P(^BGPINDGC(BGPPC,22),U,10)]"")!($P(^BGPINDGC(BGPPC,22),U,11)]"") W !?60,$TR($P(^BGPINDGC(BGPPC,22),U,9),"$","^"),?64,$TR($P(^BGPINDGC(BGPPC,22),U,10),"$","^"),?73,$P(^BGPINDGC(BGPPC,22),U,11)
..S BGPSN=0 F S BGPSN=$O(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN)) Q:BGPSN'=+BGPSN!(BGPQUIT) D
...S BGPSASU=$P(^BGPGPDCG(BGPSN,0),U,9),X=$O(^AUTTLOC("C",BGPSASU,0)) S BGPSNAM=$S(X:$P(^DIC(4,X,0),U),1:"?????"),BGPSNAM=$S($P(^BGPGPDCG(BGPSN,0),U,17):"+"_BGPSNAM,1:BGPSNAM)
...I $P(^BGPINDGC(BGPPC,0),U,4)["014.A"!($P(^BGPINDGC(BGPPC,0),U,4)["023.")!($P(^BGPINDGC(BGPPC,0),U,4)="016.A.1") D I 1
....I $Y>(BGPIOSL-3) D HEADERP Q:BGPQUIT
....W !?2,BGPSASU,?8,$E(BGPSNAM,1,12)
....W ?20,$J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U),7,0)
....W ?29,$J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2),7,0)
....W ?38,$J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3),7,0)
...E D
....I $Y>(BGPIOSL-3) D HEADERP Q:BGPQUIT
....W !?2,BGPSASU,?8,$E(BGPSNAM,1,12)
....W ?20,$J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U),7,1),"%"
....W ?29,$J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2),7,1),"%"
....W ?38,$J($P(^TMP($J,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3),7,1),"%"
I $Y>(BGPIOSL-5) D HEADERP Q:BGPQUIT
W !
;I $G(BGPNGR09) D
;.W !," * PART 2017 target represented here is a preliminary target since it will be"
;.W !,"adjusted for FY 2017 actual results and FY 2017 appropriations."
W !,$S($G(BGPNGR09):"*",1:"*")," Federally Administered Activities measure. National 2015 rate is for federal"
W !,"sites only."
W ! Q
Q
;
D HEADER^BGP7DPH
D H1P
Q
H1P ;
I BGPRTYPE=1 S X="GPRA DEVELOPMENTAL & PART MEASURES CLINICAL PERFORMANCE DETAIL" W !,$$CTR(X,80)
W !?22," Site",?32,"Site",?40,"Site",?50,"Area",?60,$S($G(BGPNGR09):"PART10",1:"PART09"),?64,"Nat'l",?74,"2016"
W !?22,"Current",?32,"Prev",?40,"Base",?50,"Current",?60,"Target"_$S($G(BGPNGR09):"*",1:""),?65,"2016",?74,"Target"
W !,$TR($J("",80)," ","-")
W !!,"PART MEASURE"
W !,"------------"
Q
BGP7SDPD ; IHS/CMI/LAB - IHS summary page ;
+1 ;;17.1;IHS CLINICAL REPORTING;;MAY 10, 2017;Build 29
+2 ;
START ;
+1 IF '$GET(BGPAREAA)
QUIT
+2 IF BGPRTYPE'=1
QUIT
+3 SET BGPQUIT=""
+4 DO HEADER
+5 DO W^BGP7DP("GPRA DEVELOPMENTAL MEASURES",0,2,BGPPTYPE)
+6 DO W^BGP7DP("---------------------------",0,1,BGPPTYPE)
+7 SET BGPC=0
FOR
SET BGPC=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC))
IF BGPC'=+BGPC!(BGPQUIT)
QUIT
Begin DoDot:1
+8 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-3)
DO HEADER
IF BGPQUIT
QUIT
+9 SET BGPC1=$ORDER(^BGPSCAT("C",BGPC,0))
+10 DO W^BGP7DP("",0,1,BGPPTYPE)
+11 DO W^BGP7DP($PIECE(^BGPSCAT(BGPC1,0),U),0,1,BGPPTYPE)
+12 SET BGPO=""
FOR
SET BGPO=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO))
IF BGPO=""!(BGPQUIT)
QUIT
Begin DoDot:2
+13 SET BGPPC=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,0))
+14 ;Q:$P($G(^BGPINDGC(BGPPC,22)),U,13) ;part measure displays last
+15 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-4)
DO HEADER
IF BGPQUIT
QUIT
+16 IF BGPPTYPE="P"
Begin DoDot:3
+17 DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,22),U,4),0,2,BGPPTYPE,1,1)
+18 ;W !?1,$P(^BGPINDGC(BGPPC,22),U,7)
IF $PIECE(^BGPINDGC(BGPPC,22),U,7)]""
DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,22),U,7),0,1,BGPPTYPE,1,1)
+19 IF $PIECE(^BGPINDGC(BGPPC,22),U,12)]""
DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,22),U,12),0,1,BGPPTYPE,1,1)
+20 SET F=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,0))
+21 SET F=$PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,F),U,4)
+22 DO W^BGP7DP(F_$SELECT($PIECE(^BGPINDGC(BGPPC,0),U,4)["014.A"!($PIECE(^BGPINDGC(BGPPC,0),U,4)["023.")!($PIECE(^BGPINDGC(BGPPC,0),U,4)="016.A.1")!($PIECE(^BGPINDGC(BGPPC,0),U,4)="016.A.5")!(...
... $PIECE($GET(^BGPINDGC(BGPPC,19)),U,13)):"",1:"%"),0,0,BGPPTYPE,5,50)
+23 ;,?65,$P(^BGPINDGC(BGPPC,22),U,3)
DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,22),U,2),0,0,BGPPTYPE,6,60)
+24 IF $PIECE(^BGPINDGC(BGPPC,22),U,9)]""!($PIECE(^BGPINDGC(BGPPC,22),U,10)]"")!($PIECE(^BGPINDGC(BGPPC,22),U,11)]"")
DO W^BGP7DP($TRANSLATE($PIECE(^BGPINDGC(BGPPC,22),U,10),"$","^"),0,1,BGPPTYPE,6,60)
+25 SET BGPSN=0
FOR
SET BGPSN=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN))
IF BGPSN'=+BGPSN!(BGPQUIT)
QUIT
Begin DoDot:4
+26 SET BGPSASU=$PIECE(^BGPGPDCG(BGPSN,0),U,9)
SET X=$ORDER(^AUTTLOC("C",BGPSASU,0))
SET BGPSNAM=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
SET BGPSNAM=$SELECT($PIECE(^BGPGPDCG(BGPSN,0),U,17):"+"_BGPSNAM,1:BGPSNAM)
+27 IF $PIECE(^BGPINDGC(BGPPC,0),U,4)["014.A"!($PIECE(^BGPINDGC(BGPPC,0),U,4)["023.")!($PIECE(^BGPINDGC(BGPPC,0),U,4)="016.A.1")!($PIECE($GET(^BGPINDGC(BGPPC,19)),U,13))
Begin DoDot:5
+28 IF $Y>(BGPIOSL-3)
DO HEADER
IF BGPQUIT
QUIT
+29 DO W^BGP7DP(BGPSASU,0,1,BGPPTYPE,1,2)
+30 DO W^BGP7DP($EXTRACT(BGPSNAM,1,12),0,0,BGPPTYPE,2,8)
+31 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U),7,0),0,0,BGPPTYPE,2,20)
+32 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2),7,0),0,0,BGPPTYPE,3,29)
+33 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3),7,0),0,0,BGPPTYPE,4,38)
End DoDot:5
IF 1
+34 IF '$TEST
Begin DoDot:5
+35 IF $Y>(BGPIOSL-3)
DO HEADER
IF BGPQUIT
QUIT
+36 DO W^BGP7DP(BGPSASU,0,1,BGPPTYPE,1,2)
+37 DO W^BGP7DP($EXTRACT(BGPSNAM,1,12),0,0,BGPPTYPE,2,8)
+38 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U),7,1)_"%",0,0,BGPPTYPE,2,20)
+39 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2),7,1)_"%",0,0,BGPPTYPE,3,29)
+40 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3),7,1)_"%",0,0,BGPPTYPE,4,38)
End DoDot:5
End DoDot:4
End DoDot:3
+41 IF BGPPTYPE="D"
Begin DoDot:3
+42 DO W^BGP7DP("",0,1,BGPPTYPE)
+43 SET XX=" "_$PIECE(^BGPINDGC(BGPPC,22),U,4)
+44 IF $PIECE(^BGPINDGC(BGPPC,22),U,7)]""
DO W^BGP7DP(XX,0,1,BGPPTYPE,1)
SET XX=" "_$PIECE(^BGPINDGC(BGPPC,22),U,7)
+45 IF $PIECE(^BGPINDGC(BGPPC,22),U,12)]""
DO W^BGP7DP(XX,0,1,BGPPTYPE,1)
SET XX=" "_$PIECE(^BGPINDGC(BGPPC,22),U,12)
+46 SET F=$ORDER(^TMP($JOB,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,0))
+47 SET F=$PIECE(^TMP($JOB,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,F),U,4)
+48 SET $PIECE(XX,U,5)=F_$SELECT($PIECE(^BGPINDGC(BGPPC,0),U,4)["014.A"!($PIECE(^BGPINDGC(BGPPC,0),U,4)["023.")!($PIECE(^BGPINDGC(BGPPC,0),U,4)="016.A.1")!($PIECE($GET(^BGPINDGC(BGPPC,19)),U,13)):"",1:"%")
+49 ;,$P(XX,U,7)=$P(^BGPINDGC(BGPPC,22),U,3)
SET $PIECE(XX,U,6)=$PIECE(^BGPINDGC(BGPPC,22),U,2)
+50 SET BGPSN=0
SET BGPCNT=0
FOR
SET BGPSN=$ORDER(^TMP($JOB,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN))
IF BGPSN'=+BGPSN
QUIT
SET BGPCNT=BGPCNT+1
Begin DoDot:4
+51 SET BGPSASU=$PIECE(^BGPGPDCG(BGPSN,0),U,9)
SET X=$ORDER(^AUTTLOC("C",BGPSASU,0))
SET BGPSNAM=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
SET BGPSNAM=$SELECT($PIECE(^BGPGPDCG(BGPSN,0),U,17):"+"_BGPSNAM,1:BGPSNAM)
+52 IF $PIECE(^BGPINDGC(BGPPC,0),U,4)["014.A"!($PIECE(^BGPINDGC(BGPPC,0),U,4)["023.")!($PIECE(^BGPINDGC(BGPPC,0),U,4)="016.A.1")!($PIECE(^BGPINDGC(BGPPC,0),U,4)="016.A.5")!($PIECE($GET(^BGPINDGC(BGPPC,19)),U,13))
Begin DoDot:5
+53 SET X=""
SET $PIECE(X,U,1)=BGPSASU_" "_BGPSNAM
+54 SET $PIECE(X,U,2)=+$PIECE(^TMP($JOB,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U)
+55 SET $PIECE(X,U,3)=+$PIECE(^TMP($JOB,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2)
+56 SET $PIECE(X,U,4)=+$PIECE(^TMP($JOB,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3)
+57 ;S $P(X,U,5)=$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,4)
End DoDot:5
IF 1
+58 IF '$TEST
Begin DoDot:5
+59 SET $PIECE(X,U,1)=BGPSASU_" "_BGPSNAM
+60 SET $PIECE(X,U,2)=$PIECE(^TMP($JOB,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U)_"%"
+61 SET $PIECE(X,U,3)=$PIECE(^TMP($JOB,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2)_"%"
+62 SET $PIECE(X,U,4)=$PIECE(^TMP($JOB,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3)_"%"
+63 ;S $P(X,U,5)=$P(^TMP($J,"SUMMARYDEL DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,4)_"%"
+64 ;S $P(X,U,5)=$P(^BGPINDGC(BGPPC,22),U,2),$P(X,U,6)=$P(^BGPINDGC(BGPPC,22),U,3)
+65 ;I BGPCNT=1 D S(XX,1,1) D
End DoDot:5
+66 IF BGPCNT=1
DO W^BGP7DP(XX,0,1,BGPPTYPE,1)
+67 SET Y=""
IF $PIECE(^BGPINDGC(BGPPC,22),U,9)]""!($PIECE(^BGPINDGC(BGPPC,22),U,10)]"")!($PIECE(^BGPINDGC(BGPPC,22),U,11)]"")
SET $PIECE(Y,U,6)=$TRANSLATE($PIECE(^BGPINDGC(BGPPC,22),U,9),"$","^")
Begin DoDot:5
+68 SET $PIECE(Y,U,8)=$PIECE(^BGPINDGC(BGPPC,22),U,11)
End DoDot:5
+69 ;D S(Y,1,1)
IF Y]""
DO W^BGP7DP(Y,0,1,BGPPTYPE,1)
+70 ;D S(X,1,1)
DO W^BGP7DP(X,0,1,BGPPTYPE,1)
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+71 ;S X=" " D S(X,1,1)
DO W^BGP7DP(" ",0,1,BGPPTYPE)
+72 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HEADER
IF BGPQUIT
QUIT
+73 DO W^BGP7DP("* Not GPRA Developmental measure but included to show percentage of",0,2,BGPPTYPE)
+74 DO W^BGP7DP("refusals with respect to GPRA Developmental measure.",0,1,BGPPTYPE)
+75 DO W^BGP7DP("",0,1,BGPPTYPE)
+76 QUIT
+77 ;
+1 DO HEADER^BGP7DPH
+2 DO H1
+3 QUIT
H1 ;
+1 SET X="GPRA DEVELOPMENTAL MEASURES CLINICAL PERFORMANCE DETAIL"
DO W^BGP7DP(X,1,1,BGPPTYPE)
+2 ;,W^BGP7DP("Nat'l",0,0,BGPPTYPE,6,60)
DO W^BGP7DP("Site",0,1,BGPPTYPE,2,21)
DO W^BGP7DP("Site",0,0,BGPPTYPE,3,32)
DO W^BGP7DP("Site",0,0,BGPPTYPE,4,40)
DO W^BGP7DP("Area",0,0,BGPPTYPE,5,50)
+3 ;W^BGP7DP("2016",0,0,BGPPTYPE,6,60)
DO W^BGP7DP("Current",0,1,BGPPTYPE,2,22)
DO W^BGP7DP("Prev",0,0,BGPPTYPE,3,32)
DO W^BGP7DP("Base",0,0,BGPPTYPE,4,40)
DO W^BGP7DP("Current",0,0,BGPPTYPE,5,50)
+4 DO W^BGP7DP($TRANSLATE($JUSTIFY("",80)," ","-"),0,1,BGPPTYPE)
+5 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 ;----------
PART ;
+1 DO HEADERP
+2 SET P1=$SELECT($GET(BGPNGR09):8,1:8)
+3 SET BGPC=0
FOR
SET BGPC=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC))
IF BGPC'=+BGPC!(BGPQUIT)
QUIT
Begin DoDot:1
+4 IF $Y>(BGPIOSL-3)
DO HEADERP
IF BGPQUIT
QUIT
+5 SET BGPC1=$ORDER(^BGPSCAT("C",BGPC,0))
+6 ;W !
+7 ;W !,$P(^BGPSCAT(BGPC1,0),U)
+8 SET BGPO=""
FOR
SET BGPO=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO))
IF BGPO=""!(BGPQUIT)
QUIT
Begin DoDot:2
+9 SET BGPPC=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,0))
+10 IF '$PIECE($GET(^BGPINDGC(BGPPC,22)),U,13)
QUIT
+11 IF $Y>(BGPIOSL-3)
DO HEADERP
IF BGPQUIT
QUIT
+12 WRITE !!?1,$PIECE(^BGPINDGC(BGPPC,22),U,4)
+13 IF $PIECE(^BGPINDGC(BGPPC,22),U,7)]""
WRITE !,$PIECE(^BGPINDGC(BGPPC,22),U,7)
+14 IF $PIECE(^BGPINDGC(BGPPC,22),U,12)]""
WRITE !,$PIECE(^BGPINDGC(BGPPC,22),U,12)
+15 SET F=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,0))
+16 SET F=$PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,F),U,4)
+17 WRITE ?50,F,$SELECT($PIECE(^BGPINDGC(BGPPC,0),U,4)["014.A"!($PIECE(^BGPINDGC(BGPPC,0),U,4)["023.")!($PIECE(^BGPINDGC(BGPPC,0),U,4)="016.A.1"):"",1:"%"),?60,$PIECE(^BGPINDGC(BGPPC,22),U,P1),?65,...
... $PIECE(^BGPINDGC(BGPPC,22),U,2),?74,$PIECE(^BGPINDGC(BGPPC,22),U,3)
+18 IF $PIECE(^BGPINDGC(BGPPC,22),U,9)]""!($PIECE(^BGPINDGC(BGPPC,22),U,10)]"")!($PIECE(^BGPINDGC(BGPPC,22),U,11)]"")
WRITE !?60,$TRANSLATE($PIECE(^BGPINDGC(BGPPC,22),U,9),"$","^"),?64,$TRANSLATE($PIECE(^BGPINDGC(BGPPC,22),U,10),"$","^"),?73,$PIECE(^BGPINDGC(BGPPC,22),U,11)
+19 SET BGPSN=0
FOR
SET BGPSN=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN))
IF BGPSN'=+BGPSN!(BGPQUIT)
QUIT
Begin DoDot:3
+20 SET BGPSASU=$PIECE(^BGPGPDCG(BGPSN,0),U,9)
SET X=$ORDER(^AUTTLOC("C",BGPSASU,0))
SET BGPSNAM=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
SET BGPSNAM=$SELECT($PIECE(^BGPGPDCG(BGPSN,0),U,17):"+"_BGPSNAM,1:BGPSNAM)
+21 IF $PIECE(^BGPINDGC(BGPPC,0),U,4)["014.A"!($PIECE(^BGPINDGC(BGPPC,0),U,4)["023.")!($PIECE(^BGPINDGC(BGPPC,0),U,4)="016.A.1")
Begin DoDot:4
+22 IF $Y>(BGPIOSL-3)
DO HEADERP
IF BGPQUIT
QUIT
+23 WRITE !?2,BGPSASU,?8,$EXTRACT(BGPSNAM,1,12)
+24 WRITE ?20,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U),7,0)
+25 WRITE ?29,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2),7,0)
+26 WRITE ?38,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3),7,0)
End DoDot:4
IF 1
+27 IF '$TEST
Begin DoDot:4
+28 IF $Y>(BGPIOSL-3)
DO HEADERP
IF BGPQUIT
QUIT
+29 WRITE !?2,BGPSASU,?8,$EXTRACT(BGPSNAM,1,12)
+30 WRITE ?20,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U),7,1),"%"
+31 WRITE ?29,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,2),7,1),"%"
+32 WRITE ?38,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE DEVEL",BGPC,BGPO,BGPPC,BGPSN),U,3),7,1),"%"
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+33 IF $Y>(BGPIOSL-5)
DO HEADERP
IF BGPQUIT
QUIT
+34 WRITE !
+35 ;I $G(BGPNGR09) D
+36 ;.W !," * PART 2017 target represented here is a preliminary target since it will be"
+37 ;.W !,"adjusted for FY 2017 actual results and FY 2017 appropriations."
+38 WRITE !,$SELECT($GET(BGPNGR09):"*",1:"*")," Federally Administered Activities measure. National 2015 rate is for federal"
+39 WRITE !,"sites only."
+40 WRITE !
QUIT
+41 QUIT
+42 ;
+1 DO HEADER^BGP7DPH
+2 DO H1P
+3 QUIT
H1P ;
+1 IF BGPRTYPE=1
SET X="GPRA DEVELOPMENTAL & PART MEASURES CLINICAL PERFORMANCE DETAIL"
WRITE !,$$CTR(X,80)
+2 WRITE !?22," Site",?32,"Site",?40,"Site",?50,"Area",?60,$SELECT($GET(BGPNGR09):"PART10",1:"PART09"),?64,"Nat'l",?74,"2016"
+3 WRITE !?22,"Current",?32,"Prev",?40,"Base",?50,"Current",?60,"Target"_$SELECT($GET(BGPNGR09):"*",1:""),?65,"2016",?74,"Target"
+4 WRITE !,$TRANSLATE($JUSTIFY("",80)," ","-")
+5 WRITE !!,"PART MEASURE"
+6 WRITE !,"------------"
+7 QUIT