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

BGP9SDPO.m

Go to the documentation of this file.
BGP9SDPO ; IHS/CMI/LAB - IHS summary page ;
 ;;9.0;IHS CLINICAL REPORTING;;JUL 1, 2009
 ;
START ;
 I '$G(BGPAREAA) Q
 I BGPRTYPE'=7 Q
 S BGPQUIT="",BGPGPG=0
 D HEADER
 S BGPC=0 F  S BGPC=$O(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC)) Q:BGPC'=+BGPC!(BGPQUIT)  D
 .I $Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
 .S BGPC1=$O(^BGPSCAT("D",BGPC,0))
 .W !
 .W !,$P(^BGPSCAT(BGPC1,0),U)
 .S BGPO="" F  S BGPO=$O(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO)) Q:BGPO=""!(BGPQUIT)  D
 ..S BGPPC=$O(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,0))
 ..I $Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
 ..W !!,$P(^BGPINDNC(BGPPC,19),U,4)
 ..I $P(^BGPINDNC(BGPPC,19),U,7)]"" W !,$P(^BGPINDNC(BGPPC,19),U,7)
 ..I $P(^BGPINDNC(BGPPC,19),U,12)]"" W !,$P(^BGPINDNC(BGPPC,19),U,12)
 ..S F=$O(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,BGPPC,0))
 ..S F=$P(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,BGPPC,F),U,4)
 ..W ?46,F,$S($P(^BGPINDNC(BGPPC,0),U,4)["014."!($P(^BGPINDNC(BGPPC,0),U,4)["023.")!($P(^BGPINDNC(BGPPC,0),U,4)["016.")!($P($G(^BGPINDNC(BGPPC,19)),U,13)):"",1:"%")
 ..W ?55,$P(^BGPINDNC(BGPPC,19),U,2),?65,$P(^BGPINDNC(BGPPC,19),U,3)
 ..I $P(^BGPINDNC(BGPPC,19),U,9)]""!($P(^BGPINDNC(BGPPC,19),U,10)]"")!($P(^BGPINDNC(BGPPC,19),U,11)]"") W !?55,$TR($P(^BGPINDNC(BGPPC,19),U,10),"$","^"),?65,$P(^BGPINDNC(BGPPC,19),U,11)
 ..S BGPSN=0 F  S BGPSN=$O(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,BGPPC,BGPSN)) Q:BGPSN'=+BGPSN!(BGPQUIT)  D
 ...S BGPSASU=$P(^BGPGPDCN(BGPSN,0),U,9),X=$O(^AUTTLOC("C",BGPSASU,0)) S BGPSNAM=$S(X:$P(^DIC(4,X,0),U),1:"?????"),BGPSNAM=$S($P(^BGPGPDCN(BGPSN,0),U,17):"+"_BGPSNAM,1:BGPSNAM)
 ...I $P(^BGPINDNC(BGPPC,0),U,4)["014."!($P(^BGPINDNC(BGPPC,0),U,4)["023.")!($P(^BGPINDNC(BGPPC,0),U,4)["016.")!($P($G(^BGPINDNC(BGPPC,19)),U,13)) D  I 1
 ....I $Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
 ....W !?1,BGPSASU,?8,$E(BGPSNAM,1,12)
 ....W ?20,$J($P(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,BGPPC,BGPSN),U),7,0)
 ....W ?29,$J($P(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,BGPPC,BGPSN),U,2),7,0)
 ....W ?38,$J($P(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,BGPPC,BGPSN),U,3),7,0)
 ...E  D
 ....I $Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
 ....W !?1,BGPSASU,?8,$E(BGPSNAM,1,12)
 ....W ?20,$J($P(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,BGPPC,BGPSN),U),7,1),"%"
 ....W ?29,$J($P(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,BGPPC,BGPSN),U,2),7,1),"%"
 ....W ?38,$J($P(^TMP($J,"SUMMARY DETAIL PAGE OTHER",BGPC,BGPO,BGPPC,BGPSN),U,3),7,1),"%"
 I $Y>(BGPIOSL-2) D HEADER Q:BGPQUIT
 W !
 Q
 ;
 D HEADER^BGP9DPH
 D H1
 Q
H1 ;
 I BGPRTYPE=1 S X="SELECTED OTHER NATIONAL MEASURES CLINICAL PERFORMANCE DETAIL" W !,$$CTR(X,80)
 W !?22," Site",?32,"Site",?40,"Site",?46,"Area",?55,"National",?66,"2010"
 W !?22,"Current",?32,"Prev",?40,"Base",?46,"Current",?55,"2008",?66,"Target"
 W !,$TR($J("",80)," ","-")
 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")
 ;----------