- BGP9SDP ; IHS/CMI/LAB - IHS summary page 11 Dec 2006 1:24 PM ;
- ;;9.0;IHS CLINICAL REPORTING;**1**;JUL 01, 2009
- ;
- START ;
- I '$G(BGPAREAA) Q
- I BGPRTYPE'=1 Q
- S BGPQUIT="",BGPGPG=0
- D HEADER
- NEW P8,P4,P7,P12
- S P8=$S('$G(BGPNGR09):8,1:13)
- S P4=$S('$G(BGPNGR09):4,1:14)
- S P7=$S('$G(BGPNGR09):7,1:15)
- S P12=$S('$G(BGPNGR09):12,1:16)
- S BGPC=0 F S BGPC=$O(^TMP($J,"SUMMARY DETAIL PAGE",BGPC)) Q:BGPC'=+BGPC!(BGPQUIT) D
- .I $Y>(BGPIOSL-3) D HEADER 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",BGPC,BGPO)) Q:BGPO=""!(BGPQUIT) D
- ..S BGPPC=$O(^TMP($J,"SUMMARY DETAIL PAGE",BGPC,BGPO,0))
- ..I $Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
- ..W !!?1,$P(^BGPINDNC(BGPPC,14),U,P4)
- ..I $P(^BGPINDNC(BGPPC,14),U,P7)]"" W !,$P(^BGPINDNC(BGPPC,14),U,P7)
- ..I $P(^BGPINDNC(BGPPC,14),U,P12)]"" W !,$P(^BGPINDNC(BGPPC,14),U,P12)
- ..S F=$O(^TMP($J,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,0))
- ..S F=$P(^TMP($J,"SUMMARY DETAIL PAGE",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."):"",1:"%"),?55,$P(^BGPINDNC(BGPPC,14),U,P8),?65,$P(^BGPINDNC(BGPPC,14),U,2),?74,$P(^BGPINDNC(BGPPC,14),U,3)
- ..I $P(^BGPINDNC(BGPPC,14),U,9)]""!($P(^BGPINDNC(BGPPC,14),U,10)]"")!($P(^BGPINDNC(BGPPC,14),U,11)]"") W !?55,$TR($P(^BGPINDNC(BGPPC,14),U,9),"$","^"),?64,$TR($P(^BGPINDNC(BGPPC,14),U,10),"$","^"),?73,$P(^BGPINDNC(BGPPC,14),U,11)
- ..S BGPSN=0 F S BGPSN=$O(^TMP($J,"SUMMARY DETAIL PAGE",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.") D I 1
- ....I $Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
- ....W !?2,BGPSASU,?8,$E(BGPSNAM,1,12)
- ....W ?20,$J($P(^TMP($J,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U),7,0)
- ....W ?29,$J($P(^TMP($J,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U,2),7,0)
- ....W ?38,$J($P(^TMP($J,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U,3),7,0)
- ...E D
- ....I $Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
- ....W !?2,BGPSASU,?8,$E(BGPSNAM,1,12)
- ....W ?20,$J($P(^TMP($J,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U),7,1),"%"
- ....W ?29,$J($P(^TMP($J,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U,2),7,1),"%"
- ....W ?38,$J($P(^TMP($J,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U,3),7,1),"%"
- I $Y>(BGPIOSL-9) D HEADER Q:BGPQUIT
- I $G(BGPNGR09) D FOOTER10^BGP9DSP Q
- W !!," * Measure definition changed in 2007."
- W !!,"** Not official GPRA measure but included to show percentage of refusals with",!,"respect to GPRA measure."
- W !!," + Site Previous and Site Baseline values are not applicable for this measure."
- W !
- Q
- ;
- D HEADER^BGP9DPH
- D H1
- Q
- H1 ;
- I BGPRTYPE=1 S X="OFFICIAL GPRA MEASURES CLINICAL PERFORMANCE DETAIL" W !,$$CTR(X,80)
- W !?22," Site",?32,"Site",?40,"Site",?46,"Area",?55,$S('$G(BGPNGR09):"GPRA09",1:"GPRA10"),?64,"Nat'l",?74,"2010"
- W !?22,"Current",?32,"Prev",?40,"Base",?46,"Current",?55,"Target"_$S($G(BGPNGR09):"*",1:""),?65,"2008",?74,"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")
- ;----------
- BGP9SDP ; IHS/CMI/LAB - IHS summary page 11 Dec 2006 1:24 PM ;
- +1 ;;9.0;IHS CLINICAL REPORTING;**1**;JUL 01, 2009
- +2 ;
- START ;
- +1 IF '$GET(BGPAREAA)
- QUIT
- +2 IF BGPRTYPE'=1
- QUIT
- +3 SET BGPQUIT=""
- SET BGPGPG=0
- +4 DO HEADER
- +5 NEW P8,P4,P7,P12
- +6 SET P8=$SELECT('$GET(BGPNGR09):8,1:13)
- +7 SET P4=$SELECT('$GET(BGPNGR09):4,1:14)
- +8 SET P7=$SELECT('$GET(BGPNGR09):7,1:15)
- +9 SET P12=$SELECT('$GET(BGPNGR09):12,1:16)
- +10 SET BGPC=0
- FOR
- SET BGPC=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC))
- IF BGPC'=+BGPC!(BGPQUIT)
- QUIT
- Begin DoDot:1
- +11 IF $Y>(BGPIOSL-3)
- DO HEADER
- IF BGPQUIT
- QUIT
- +12 SET BGPC1=$ORDER(^BGPSCAT("C",BGPC,0))
- +13 WRITE !
- +14 WRITE !,$PIECE(^BGPSCAT(BGPC1,0),U)
- +15 SET BGPO=""
- FOR
- SET BGPO=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO))
- IF BGPO=""!(BGPQUIT)
- QUIT
- Begin DoDot:2
- +16 SET BGPPC=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,0))
- +17 IF $Y>(BGPIOSL-3)
- DO HEADER
- IF BGPQUIT
- QUIT
- +18 WRITE !!?1,$PIECE(^BGPINDNC(BGPPC,14),U,P4)
- +19 IF $PIECE(^BGPINDNC(BGPPC,14),U,P7)]""
- WRITE !,$PIECE(^BGPINDNC(BGPPC,14),U,P7)
- +20 IF $PIECE(^BGPINDNC(BGPPC,14),U,P12)]""
- WRITE !,$PIECE(^BGPINDNC(BGPPC,14),U,P12)
- +21 SET F=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,0))
- +22 SET F=$PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,F),U,4)
- +23 WRITE ?46,F,$SELECT($PIECE(^BGPINDNC(BGPPC,0),U,4)["014."!($PIECE(^BGPINDNC(BGPPC,0),U,4)["023.")!($PIECE(^BGPINDNC(BGPPC,0),U,4)["016."):"",1:"%"),?55,$PIECE(^BGPINDNC(BGPPC,14),U,P8),?65,$PIECE(^BGPINDNC(BGPPC,14),U,2),?74,...
- ... $PIECE(^BGPINDNC(BGPPC,14),U,3)
- +24 IF $PIECE(^BGPINDNC(BGPPC,14),U,9)]""!($PIECE(^BGPINDNC(BGPPC,14),U,10)]"")!($PIECE(^BGPINDNC(BGPPC,14),U,11)]"")
- WRITE !?55,$TRANSLATE($PIECE(^BGPINDNC(BGPPC,14),U,9),"$","^"),?64,$TRANSLATE($PIECE(^BGPINDNC(BGPPC,14),U,10),"$","^"),?73,$PIECE(^BGPINDNC(BGPPC,14),U,11)
- +25 SET BGPSN=0
- FOR
- SET BGPSN=$ORDER(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN))
- IF BGPSN'=+BGPSN!(BGPQUIT)
- QUIT
- Begin DoDot:3
- +26 SET BGPSASU=$PIECE(^BGPGPDCN(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(^BGPGPDCN(BGPSN,0),U,17):"+"_BGPSNAM,1:BGPSNAM)
- +27 IF $PIECE(^BGPINDNC(BGPPC,0),U,4)["014."!($PIECE(^BGPINDNC(BGPPC,0),U,4)["023.")!($PIECE(^BGPINDNC(BGPPC,0),U,4)["016.")
- Begin DoDot:4
- +28 IF $Y>(BGPIOSL-3)
- DO HEADER
- IF BGPQUIT
- QUIT
- +29 WRITE !?2,BGPSASU,?8,$EXTRACT(BGPSNAM,1,12)
- +30 WRITE ?20,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U),7,0)
- +31 WRITE ?29,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U,2),7,0)
- +32 WRITE ?38,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U,3),7,0)
- End DoDot:4
- IF 1
- +33 IF '$TEST
- Begin DoDot:4
- +34 IF $Y>(BGPIOSL-3)
- DO HEADER
- IF BGPQUIT
- QUIT
- +35 WRITE !?2,BGPSASU,?8,$EXTRACT(BGPSNAM,1,12)
- +36 WRITE ?20,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U),7,1),"%"
- +37 WRITE ?29,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U,2),7,1),"%"
- +38 WRITE ?38,$JUSTIFY($PIECE(^TMP($JOB,"SUMMARY DETAIL PAGE",BGPC,BGPO,BGPPC,BGPSN),U,3),7,1),"%"
- End DoDot:4
- End DoDot:3
- End DoDot:2
- End DoDot:1
- +39 IF $Y>(BGPIOSL-9)
- DO HEADER
- IF BGPQUIT
- QUIT
- +40 IF $GET(BGPNGR09)
- DO FOOTER10^BGP9DSP
- QUIT
- +41 WRITE !!," * Measure definition changed in 2007."
- +42 WRITE !!,"** Not official GPRA measure but included to show percentage of refusals with",!,"respect to GPRA measure."
- +43 WRITE !!," + Site Previous and Site Baseline values are not applicable for this measure."
- +44 WRITE !
- +45 QUIT
- +46 ;
- +1 DO HEADER^BGP9DPH
- +2 DO H1
- +3 QUIT
- H1 ;
- +1 IF BGPRTYPE=1
- SET X="OFFICIAL GPRA MEASURES CLINICAL PERFORMANCE DETAIL"
- WRITE !,$$CTR(X,80)
- +2 WRITE !?22," Site",?32,"Site",?40,"Site",?46,"Area",?55,$SELECT('$GET(BGPNGR09):"GPRA09",1:"GPRA10"),?64,"Nat'l",?74,"2010"
- +3 WRITE !?22,"Current",?32,"Prev",?40,"Base",?46,"Current",?55,"Target"_$SELECT($GET(BGPNGR09):"*",1:""),?65,"2008",?74,"Target"
- +4 WRITE !,$TRANSLATE($JUSTIFY("",80)," ","-")
- +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 ;----------