BGP7DSPN ; IHS/CMI/LAB - IHS summary page ;
;;17.1;IHS CLINICAL REPORTING;;MAY 10, 2017;Build 29
;
START ;
I BGPRTYPE'=1 Q
I $G(BGPNPL) Q ;not on gpra pat list
I $G(BGPCPPL) Q ;not on comp list
S BGPQUIT=""
D HEADER
S BGPC=0 F S BGPC=$O(^TMP($J,"SUMMARY NON",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 NON",BGPC,BGPO)) Q:BGPO=""!(BGPQUIT) D
..S BGPPC=$O(^TMP($J,"SUMMARY NON",BGPC,BGPO,0))
..I BGPPTYPE="P",$Y>(BGPIOSL-4) D HEADER Q:BGPQUIT
..I $P(^BGPINDGC(BGPPC,0),U,4)["014.A"!($P(^BGPINDGC(BGPPC,0),U,4)["023.")!($P(^BGPINDGC(BGPPC,0),U,4)["016.A.5")!($P($G(^BGPINDGC(BGPPC,19)),U,13)) D I 1
...D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,4),0,1,BGPPTYPE,1,1)
...I $P(^BGPINDGC(BGPPC,15),U,7)]"" D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,7),0,1,BGPPTYPE,1,1) ;W !?1,$P(^BGPINDGC(BGPPC,15),U,7)
...I BGPPTYPE="P" D
....D W^BGP7DP($J($P(^TMP($J,"SUMMARY NON",BGPC,BGPO,BGPPC),U),7,0),0,0,BGPPTYPE,1,26)
....D W^BGP7DP($J($P(^TMP($J,"SUMMARY NON",BGPC,BGPO,BGPPC),U,2),7,0),0,0,BGPPTYPE,1,34)
....D W^BGP7DP($J($P(^TMP($J,"SUMMARY NON",BGPC,BGPO,BGPPC),U,3),7,0),0,0,BGPPTYPE,1,41)
....D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,2),0,0,BGPPTYPE,1,57)
....D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,3),0,0,BGPPTYPE,1,68)
...I BGPPTYPE="D" D
....D W^BGP7DP($P(^TMP($J,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U),0,0,BGPPTYPE,2)
....D W^BGP7DP($P(^TMP($J,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U,2),0,0,BGPPTYPE,3)
....D W^BGP7DP($P(^TMP($J,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U,3),0,0,BGPPTYPE,4)
....D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,2),0,0,BGPPTYPE,5)
....D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,3),0,0,BGPPTYPE,6)
....;D S(X,1,1)
..E D
...D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,4),0,1,BGPPTYPE,1,1)
...I $P(^BGPINDGC(BGPPC,15),U,7)]"" D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,7),0,1,BGPPTYPE,1,1) ;W !?1,$P(^BGPINDGC(BGPPC,15),U,7)
...I BGPPTYPE="P" D
....D W^BGP7DP($J($P(^TMP($J,"SUMMARY NON",BGPC,BGPO,BGPPC),U),7,1)_"%",0,0,BGPPTYPE,1,26)
....D W^BGP7DP($J($P(^TMP($J,"SUMMARY NON",BGPC,BGPO,BGPPC),U,2),7,1)_"%",0,0,BGPPTYPE,1,34)
....D W^BGP7DP($J($P(^TMP($J,"SUMMARY NON",BGPC,BGPO,BGPPC),U,3),7,1)_"%",0,0,BGPPTYPE,1,41)
....D W^BGP7DP($TR($P(^BGPINDGC(BGPPC,15),U,2),"$","^"),0,0,BGPPTYPE,1,57)
....D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,3),0,0,BGPPTYPE,1,68)
...I BGPPTYPE="D" D
....D W^BGP7DP($P(^TMP($J,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U)_"%",0,0,BGPPTYPE,2,26)
....D W^BGP7DP($P(^TMP($J,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U,2)_"%",0,0,BGPPTYPE,3,34)
....D W^BGP7DP($P(^TMP($J,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U,3)_"%",0,0,BGPPTYPE,4,41)
....D W^BGP7DP($TR($P(^BGPINDGC(BGPPC,15),U,2),"$","^"),0,0,BGPPTYPE,5,57)
....D W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,3),0,0,BGPPTYPE,6,68)
...I $P(^BGPINDGC(BGPPC,15),U,9)]""!($P(^BGPINDGC(BGPPC,15),U,10)]"")!($P(^BGPINDGC(BGPPC,15),U,11)]"") D
....D W^BGP7DP($TR($P(^BGPINDGC(BGPPC,15),U,10),"$","^"),0,0,BGPPTYPE,5,57),W^BGP7DP($P(^BGPINDGC(BGPPC,15),U,11),0,0,BGPPTYPE,6,68)
....D W^BGP7DP("",0,0,BGPPTYPE)
I BGPPTYPE="P",$Y>(BGPIOSL-2) D HEADER Q:BGPQUIT
D W^BGP7DP(" *Non-GPRA measure included in the IHS GPRA report submitted to OMB to",0,2,BGPPTYPE)
D W^BGP7DP("provide context to other GPRA measures.",0,1,BGPPTYPE)
D W^BGP7DP("",0,1,BGPPTYPE)
Q
;
D HEADER^BGP7DPH
D H1
Q
;
H1 ;
S X="SELECTED NON-GPRA MEASURES CLINICAL PERFORMANCE SUMMARY" D W^BGP7DP(X,1,1,BGPPTYPE)
I $G(BGPAREAA) D W^BGP7DP("Area",0,1,BGPPTYPE,2,27),W^BGP7DP("Area",0,0,BGPPTYPE,3,35),W^BGP7DP("Area",0,0,BGPPTYPE,4,44),W^BGP7DP("Nat'l",0,0,BGPPTYPE,5,57),W^BGP7DP("2020",0,0,BGPPTYPE,6,68)
I '$G(BGPAREAA) D W^BGP7DP("Site",0,1,BGPPTYPE,2,27),W^BGP7DP("Site",0,0,BGPPTYPE,3,35),W^BGP7DP("Site",0,0,BGPPTYPE,4,44),W^BGP7DP("Nat'l",0,0,BGPPTYPE,5,57),W^BGP7DP("2020",0,0,BGPPTYPE,6,68)
D W^BGP7DP("Current",0,1,BGPPTYPE,2,26),W^BGP7DP("Previous",0,0,BGPPTYPE,3,34),W^BGP7DP("Baseline",0,0,BGPPTYPE,4,43),W^BGP7DP("2016",0,0,BGPPTYPE,5,57),W^BGP7DP("Target",0,0,BGPPTYPE,6,68)
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")
;----------
BGP7DSPN ; IHS/CMI/LAB - IHS summary page ;
+1 ;;17.1;IHS CLINICAL REPORTING;;MAY 10, 2017;Build 29
+2 ;
START ;
+1 IF BGPRTYPE'=1
QUIT
+2 ;not on gpra pat list
IF $GET(BGPNPL)
QUIT
+3 ;not on comp list
IF $GET(BGPCPPL)
QUIT
+4 SET BGPQUIT=""
+5 DO HEADER
+6 SET BGPC=0
FOR
SET BGPC=$ORDER(^TMP($JOB,"SUMMARY NON",BGPC))
IF BGPC'=+BGPC!(BGPQUIT)
QUIT
Begin DoDot:1
+7 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-3)
DO HEADER
IF BGPQUIT
QUIT
+8 SET BGPC1=$ORDER(^BGPSCAT("C",BGPC,0))
+9 DO W^BGP7DP("",0,1,BGPPTYPE)
+10 DO W^BGP7DP($PIECE(^BGPSCAT(BGPC1,0),U),0,1,BGPPTYPE)
+11 SET BGPO=""
FOR
SET BGPO=$ORDER(^TMP($JOB,"SUMMARY NON",BGPC,BGPO))
IF BGPO=""!(BGPQUIT)
QUIT
Begin DoDot:2
+12 SET BGPPC=$ORDER(^TMP($JOB,"SUMMARY NON",BGPC,BGPO,0))
+13 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-4)
DO HEADER
IF BGPQUIT
QUIT
+14 IF $PIECE(^BGPINDGC(BGPPC,0),U,4)["014.A"!($PIECE(^BGPINDGC(BGPPC,0),U,4)["023.")!($PIECE(^BGPINDGC(BGPPC,0),U,4)["016.A.5")!($PIECE($GET(^BGPINDGC(BGPPC,19)),U,13))
Begin DoDot:3
+15 DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,4),0,1,BGPPTYPE,1,1)
+16 ;W !?1,$P(^BGPINDGC(BGPPC,15),U,7)
IF $PIECE(^BGPINDGC(BGPPC,15),U,7)]""
DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,7),0,1,BGPPTYPE,1,1)
+17 IF BGPPTYPE="P"
Begin DoDot:4
+18 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY NON",BGPC,BGPO,BGPPC),U),7,0),0,0,BGPPTYPE,1,26)
+19 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY NON",BGPC,BGPO,BGPPC),U,2),7,0),0,0,BGPPTYPE,1,34)
+20 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY NON",BGPC,BGPO,BGPPC),U,3),7,0),0,0,BGPPTYPE,1,41)
+21 DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,2),0,0,BGPPTYPE,1,57)
+22 DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,3),0,0,BGPPTYPE,1,68)
End DoDot:4
+23 IF BGPPTYPE="D"
Begin DoDot:4
+24 DO W^BGP7DP($PIECE(^TMP($JOB,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U),0,0,BGPPTYPE,2)
+25 DO W^BGP7DP($PIECE(^TMP($JOB,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U,2),0,0,BGPPTYPE,3)
+26 DO W^BGP7DP($PIECE(^TMP($JOB,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U,3),0,0,BGPPTYPE,4)
+27 DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,2),0,0,BGPPTYPE,5)
+28 DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,3),0,0,BGPPTYPE,6)
+29 ;D S(X,1,1)
End DoDot:4
End DoDot:3
IF 1
+30 IF '$TEST
Begin DoDot:3
+31 DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,4),0,1,BGPPTYPE,1,1)
+32 ;W !?1,$P(^BGPINDGC(BGPPC,15),U,7)
IF $PIECE(^BGPINDGC(BGPPC,15),U,7)]""
DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,7),0,1,BGPPTYPE,1,1)
+33 IF BGPPTYPE="P"
Begin DoDot:4
+34 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY NON",BGPC,BGPO,BGPPC),U),7,1)_"%",0,0,BGPPTYPE,1,26)
+35 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY NON",BGPC,BGPO,BGPPC),U,2),7,1)_"%",0,0,BGPPTYPE,1,34)
+36 DO W^BGP7DP($JUSTIFY($PIECE(^TMP($JOB,"SUMMARY NON",BGPC,BGPO,BGPPC),U,3),7,1)_"%",0,0,BGPPTYPE,1,41)
+37 DO W^BGP7DP($TRANSLATE($PIECE(^BGPINDGC(BGPPC,15),U,2),"$","^"),0,0,BGPPTYPE,1,57)
+38 DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,3),0,0,BGPPTYPE,1,68)
End DoDot:4
+39 IF BGPPTYPE="D"
Begin DoDot:4
+40 DO W^BGP7DP($PIECE(^TMP($JOB,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U)_"%",0,0,BGPPTYPE,2,26)
+41 DO W^BGP7DP($PIECE(^TMP($JOB,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U,2)_"%",0,0,BGPPTYPE,3,34)
+42 DO W^BGP7DP($PIECE(^TMP($JOB,"SUMMARYDEL NON",BGPC,BGPO,BGPPC),U,3)_"%",0,0,BGPPTYPE,4,41)
+43 DO W^BGP7DP($TRANSLATE($PIECE(^BGPINDGC(BGPPC,15),U,2),"$","^"),0,0,BGPPTYPE,5,57)
+44 DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,3),0,0,BGPPTYPE,6,68)
End DoDot:4
+45 IF $PIECE(^BGPINDGC(BGPPC,15),U,9)]""!($PIECE(^BGPINDGC(BGPPC,15),U,10)]"")!($PIECE(^BGPINDGC(BGPPC,15),U,11)]"")
Begin DoDot:4
+46 DO W^BGP7DP($TRANSLATE($PIECE(^BGPINDGC(BGPPC,15),U,10),"$","^"),0,0,BGPPTYPE,5,57)
DO W^BGP7DP($PIECE(^BGPINDGC(BGPPC,15),U,11),0,0,BGPPTYPE,6,68)
+47 DO W^BGP7DP("",0,0,BGPPTYPE)
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+48 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HEADER
IF BGPQUIT
QUIT
+49 DO W^BGP7DP(" *Non-GPRA measure included in the IHS GPRA report submitted to OMB to",0,2,BGPPTYPE)
+50 DO W^BGP7DP("provide context to other GPRA measures.",0,1,BGPPTYPE)
+51 DO W^BGP7DP("",0,1,BGPPTYPE)
+52 QUIT
+53 ;
+1 DO HEADER^BGP7DPH
+2 DO H1
+3 QUIT
+4 ;
H1 ;
+1 SET X="SELECTED NON-GPRA MEASURES CLINICAL PERFORMANCE SUMMARY"
DO W^BGP7DP(X,1,1,BGPPTYPE)
+2 IF $GET(BGPAREAA)
DO W^BGP7DP("Area",0,1,BGPPTYPE,2,27)
DO W^BGP7DP("Area",0,0,BGPPTYPE,3,35)
DO W^BGP7DP("Area",0,0,BGPPTYPE,4,44)
DO W^BGP7DP("Nat'l",0,0,BGPPTYPE,5,57)
DO W^BGP7DP("2020",0,0,BGPPTYPE,6,68)
+3 IF '$GET(BGPAREAA)
DO W^BGP7DP("Site",0,1,BGPPTYPE,2,27)
DO W^BGP7DP("Site",0,0,BGPPTYPE,3,35)
DO W^BGP7DP("Site",0,0,BGPPTYPE,4,44)
DO W^BGP7DP("Nat'l",0,0,BGPPTYPE,5,57)
DO W^BGP7DP("2020",0,0,BGPPTYPE,6,68)
+4 DO W^BGP7DP("Current",0,1,BGPPTYPE,2,26)
DO W^BGP7DP("Previous",0,0,BGPPTYPE,3,34)
DO W^BGP7DP("Baseline",0,0,BGPPTYPE,4,43)
DO W^BGP7DP("2016",0,0,BGPPTYPE,5,57)
DO W^BGP7DP("Target",0,0,BGPPTYPE,6,68)
+5 DO W^BGP7DP($TRANSLATE($JUSTIFY("",80)," ","-"),0,1,BGPPTYPE)
+6 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 ;----------