Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BGP6DSPD

BGP6DSPD.m

Go to the documentation of this file.
BGP6DSPD ; IHS/CMI/LAB - IHS summary page ;
 ;;16.1;IHS CLINICAL REPORTING;;MAR 22, 2016;Build 170
 ;
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
 D W^BGP6DP("GPRA DEVELOPMENTAL MEASURES",0,2,BGPPTYPE)
 D W^BGP6DP("---------------------------",0,1,BGPPTYPE)
 S BGPC=0 F  S BGPC=$O(^TMP($J,"SUMMARY 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^BGP6DP("",0,1,BGPPTYPE)
 .D W^BGP6DP($P(^BGPSCAT(BGPC1,0),U),0,1,BGPPTYPE)
 .S BGPO="" F  S BGPO=$O(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO)) Q:BGPO=""!(BGPQUIT)  D
 ..S BGPPC=$O(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,0))
 ..Q:$P($G(^BGPINDMC(BGPPC,22)),U,13)  ;part measure displays last
 ..I BGPPTYPE="P",$Y>(BGPIOSL-4) D HEADER Q:BGPQUIT
 ..I $P(^BGPINDMC(BGPPC,0),U,4)["014.A"!($P(^BGPINDMC(BGPPC,0),U,4)["023.")!($P(^BGPINDMC(BGPPC,0),U,4)="016.A.1")!($P(^BGPINDMC(BGPPC,0),U,4)="016.A.5")!($P($G(^BGPINDMC(BGPPC,19)),U,13)) D  I 1
 ...D W^BGP6DP($P(^BGPINDMC(BGPPC,22),U,4),0,1,BGPPTYPE,1,1)
 ...I $P(^BGPINDMC(BGPPC,22),U,7)]"" D W^BGP6DP($P(^BGPINDMC(BGPPC,22),U,7),0,1,BGPPTYPE,1,1)  ;W !?1,$P(^BGPINDMC(BGPPC,22),U,7)
 ...I $P(^BGPINDMC(BGPPC,22),U,12)]"" D W^BGP6DP($P(^BGPINDMC(BGPPC,22),U,12),0,1,BGPPTYPE,1,1)
 ...I BGPPTYPE="P" D
 ....D W^BGP6DP($J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U),7,0),0,0,BGPPTYPE,1,28)
 ....D W^BGP6DP($J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U,2),7,0),0,0,BGPPTYPE,1,36)
 ....D W^BGP6DP($J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U,3),7,0),0,0,BGPPTYPE,1,43)
 ....;D W^BGP6DP($P(^BGPINDMC(BGPPC,22),U,2),0,0,BGPPTYPE,1,57)
 ...I BGPPTYPE="D" D
 ....D W^BGP6DP($P(^TMP($J,"SUMMARYDEL DEVEL",BGPC,BGPO,BGPPC),U),0,0,BGPPTYPE,2)
 ....D W^BGP6DP($P(^TMP($J,"SUMMARYDEL DEVEL",BGPC,BGPO,BGPPC),U,2),0,0,BGPPTYPE,3)
 ....D W^BGP6DP($P(^TMP($J,"SUMMARYDEL DEVEL",BGPC,BGPO,BGPPC),U,3),0,0,BGPPTYPE,4)
 ....D W^BGP6DP($P(^BGPINDMC(BGPPC,22),U,2),0,0,BGPPTYPE,5)
 ....;D S(X,1,1)
 ..E  D
 ...D W^BGP6DP($P(^BGPINDMC(BGPPC,22),U,4),0,1,BGPPTYPE,1,1)
 ...I $P(^BGPINDMC(BGPPC,22),U,7)]"" D W^BGP6DP($P(^BGPINDMC(BGPPC,22),U,7),0,1,BGPPTYPE,1,1)  ;W !?1,$P(^BGPINDMC(BGPPC,22),U,7)
 ...I $P(^BGPINDMC(BGPPC,22),U,12)]"" D W^BGP6DP($P(^BGPINDMC(BGPPC,22),U,12),0,1,BGPPTYPE,1,1)  ;W !?1,$P(^BGPINDMC(BGPPC,22),U,7)
 ...I BGPPTYPE="P" D
 ....D W^BGP6DP($J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U),7,1)_"%",0,0,BGPPTYPE,1,28)
 ....D W^BGP6DP($J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U,2),7,1)_"%",0,0,BGPPTYPE,1,36)
 ....D W^BGP6DP($J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U,3),7,1)_"%",0,0,BGPPTYPE,1,43)
 ....;D W^BGP6DP($TR($P(^BGPINDMC(BGPPC,22),U,2),"$","^"),0,0,BGPPTYPE,1,57)
 ...I BGPPTYPE="D" D
 ....D W^BGP6DP($P(^TMP($J,"SUMMARYDEL DEVEL",BGPC,BGPO,BGPPC),U)_"%",0,0,BGPPTYPE,2,28)
 ....D W^BGP6DP($P(^TMP($J,"SUMMARYDEL DEVEL",BGPC,BGPO,BGPPC),U,2)_"%",0,0,BGPPTYPE,3,36)
 ....D W^BGP6DP($P(^TMP($J,"SUMMARYDEL DEVEL",BGPC,BGPO,BGPPC),U,3)_"%",0,0,BGPPTYPE,4,43)
 ....;D W^BGP6DP($TR($P(^BGPINDMC(BGPPC,22),U,2),"$","^"),0,0,BGPPTYPE,5,57)
 ...I $P(^BGPINDMC(BGPPC,22),U,9)]""!($P(^BGPINDMC(BGPPC,22),U,10)]"")!($P(^BGPINDMC(BGPPC,22),U,11)]"") D
 ....;D W^BGP6DP($TR($P(^BGPINDMC(BGPPC,22),U,10),"$","^"),0,0,BGPPTYPE,5,57),W^BGP6DP($P(^BGPINDMC(BGPPC,22),U,11),0,0,BGPPTYPE,6,68)
 ....D W^BGP6DP("",0,0,BGPPTYPE)
 I BGPPTYPE="P",$Y>(BGPIOSL-2) D HEADER Q:BGPQUIT
 D W^BGP6DP("* Not GPRA Developmental measure but included to show percentage of",0,2,BGPPTYPE)
 D W^BGP6DP("refusals with respect to GPRA Developmental measure.",0,1,BGPPTYPE)
 D W^BGP6DP("",0,1,BGPPTYPE)
 Q
 ;D PART
 ;Q
 ;
 D HEADER^BGP6DPH
 D H1
 Q
H1 ;
 S X="GPRA DEVELOPMENTAL CLINICAL PERFORMANCE SUMMARY" D W^BGP6DP(X,1,1,BGPPTYPE)
 I $G(BGPAREAA) D W^BGP6DP("Area",0,1,BGPPTYPE,2,29),W^BGP6DP("Area",0,0,BGPPTYPE,3,38),W^BGP6DP("Area",0,0,BGPPTYPE,4,47)  ;,W^BGP6DP("Nat'l",0,0,BGPPTYPE,5,57)
 I '$G(BGPAREAA) D W^BGP6DP("Site",0,1,BGPPTYPE,2,29),W^BGP6DP("Site",0,0,BGPPTYPE,3,38),W^BGP6DP("Site",0,0,BGPPTYPE,4,47)  ;,W^BGP6DP("Nat'l",0,0,BGPPTYPE,5,57)
 D W^BGP6DP("Current",0,1,BGPPTYPE,2,29),W^BGP6DP("Previous",0,0,BGPPTYPE,3,37),W^BGP6DP("Baseline",0,0,BGPPTYPE,4,46)  ;,W^BGP6DP("2015",0,0,BGPPTYPE,5,57)
 D W^BGP6DP($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):14,1:8)
 S BGPC=0 F  S BGPC=$O(^TMP($J,"SUMMARY 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 DEVEL",BGPC,BGPO)) Q:BGPO=""!(BGPQUIT)  D
 ..S BGPPC=$O(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,0))
 ..Q:'$P($G(^BGPINDMC(BGPPC,22)),U,13)  ;part measures only
 ..I $Y>(BGPIOSL-4) D HEADERP Q:BGPQUIT
 ..I $P(^BGPINDMC(BGPPC,0),U,4)["014.A"!($P(^BGPINDMC(BGPPC,0),U,4)["023.")!($P(^BGPINDMC(BGPPC,0),U,4)["016")!($P($G(^BGPINDMC(BGPPC,19)),U,13)) D  I 1
 ...W !,$P(^BGPINDMC(BGPPC,22),U,4)
 ...I $P(^BGPINDMC(BGPPC,22),U,7)]"" W !,$P(^BGPINDMC(BGPPC,22),U,7)
 ...I $P(^BGPINDMC(BGPPC,22),U,12)]"" W !,$P(^BGPINDMC(BGPPC,22),U,12)
 ...W ?28,$J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U),7,0)
 ...W ?36,$J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U,2),7,0)
 ...W ?43,$J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U,3),7,0)
 ...W ?53,$P(^BGPINDMC(BGPPC,22),U,P1),?64,$P(^BGPINDMC(BGPPC,22),U,2),?73,$P(^BGPINDMC(BGPPC,22),U,3)
 ..E  D
 ...W !,$P(^BGPINDMC(BGPPC,22),U,4)
 ...I $P(^BGPINDMC(BGPPC,22),U,7)]"" W !,$P(^BGPINDMC(BGPPC,22),U,7)
 ...I $P(^BGPINDMC(BGPPC,22),U,12)]"" W !,$P(^BGPINDMC(BGPPC,22),U,12)
 ...W ?28,$J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U),7,1),"%"
 ...W ?36,$J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U,2),7,1),"%"
 ...W ?43,$J($P(^TMP($J,"SUMMARY DEVEL",BGPC,BGPO,BGPPC),U,3),7,1),"%"
 ...W ?53,$TR($P(^BGPINDMC(BGPPC,22),U,P1),"$","^"),?64,$TR($P(^BGPINDMC(BGPPC,22),U,2),"$","^"),?73,$P(^BGPINDMC(BGPPC,22),U,3)
 ...I $P(^BGPINDMC(BGPPC,22),U,9)]""!($P(^BGPINDMC(BGPPC,22),U,10)]"")!($P(^BGPINDMC(BGPPC,22),U,11)]"") W !?53,$TR($P(^BGPINDMC(BGPPC,22),U,9),"$","^"),?64,$TR($P(^BGPINDMC(BGPPC,22),U,10),"$","^"),?73,$P(^BGPINDMC(BGPPC,22),U,11)
 I $Y>(BGPIOSL-9) D HEADERP Q:BGPQUIT
 W !
 I $G(BGPNGR09) D
 .W !," * PART 2016 target represented here is a preliminary target since it will be"
 .W !,"adjusted for FY 2016 actual results and FY 2016 appropriations."
 W !,$S($G(BGPNGR09):"**",1:"*")," Federally Administered Activities measure.  National 2015 rate is for federal"
 W !,"sites only."
 W ! Q
 ;
HEADERP ;EP
 D HEADER^BGP6DPH
 D H1P
 Q
H1P ;
 S X="GPRA DEVELOPMENTAL & PART MEASURES CLINICAL PERFORMANCE SUMMARY" W !,$$CTR(X,80)
 I $G(BGPAREAA) W !?28," Area",?36," Area",?45," Area",?53,$S($G(BGPNGR09):"PART",1:"PART"),?64,"Nat'l",?73,"2015"
 I '$G(BGPAREAA) W !?28," Site",?36," Site",?45," Site",?53,$S($G(BGPNGR09):"PART",1:"PART"),?64,"Nat'l",?73,"2015"
 W !?28,"Current",?36,"Previous",?45,"Baseline",?53,"Target",?64,"2015",?73,"Target"
 W !,$TR($J("",80)," ","-")
 W !!,"PART MEASURE"
 W !,"------------"
 W !
 Q