BGP2HEH ; IHS/CMI/LAB - cover page for HEDIS ;
;;12.1;IHS CLINICAL REPORTING;;MAY 17, 2012;Build 66
;
;
I $G(BGPAREAA) G AREACP
S BGPHPG=0 ;cmi/maw 3/19/2010 if not area this variable is not set
;W:$D(IOF) @IOF
S BGPQHDR=""
W !!,$$CTR("Cover Page",80)
W:BGPRTYPE=3 !!,$$CTR("*** IHS 2012 HEDIS Performance Report ***",80)
W !,$$CTR($$RPTVER^BGP2BAN,80)
W !,$$CTR("Date Report Run: "_$$FMTE^XLFDT(DT),80)
W !,$$CTR("Site where Run: "_$P(^DIC(4,DUZ(2),0),U),80)
W !,$$CTR("Report Generated by: "_$$USR,80)
S X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) W !,$$CTR(X,80)
S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) W !,$$CTR(X,80)
S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) W !,$$CTR(X,80)
I BGPRTYPE=3 W !!,"Measures: HEDIS Performance Measures"
W !,"Population: ",$S(BGPBEN=1:"AI/AN Only (Classification 01)",BGPBEN=2:"non AI/AN Only (Classification NOT 01)",BGPBEN=3:"All (Both AI/AN and non AI/AN)",1:"")
D ENDTIME
D HEDISHDR
I $G(BGPEXPT) W !!,"A file will be created called BG121",$P(^AUTTLOC(DUZ(2),0),U,10)_".HE"_BGPRPT,".",!,"It will reside in the public/export directory.",!,"This file should be sent to your Area Office.",!
I '$D(BGPGUI),BGPROT'="P" W !!,"A delimited output file called ",BGPDELF,!,"has been placed in the "_$$GETDEDIR^BGP2UTL2()_" directory for your use in Excel or some",!,"other software package.",!,"See your site manager to access this file.",!
I $G(BGPALLPT) W !!,"All Communities Included.",!
I '$G(BGPALLPT),'$G(BGPSEAT) W !!?10,"Community Taxonomy Name: ",$P(^ATXAX(BGPTAXI,0),U)
I '$G(BGPALLPT),'$G(BGPSEAT) W !?10,"The following communities are included in this report:",! D
.S BGPZZ="",N=0,Y="" F S BGPZZ=$O(BGPTAX(BGPZZ)) Q:BGPZZ="" S N=N+1,Y=Y_$S(N=1:"",1:";")_BGPZZ
.S BGPZZ=0,C=0 F BGPZZ=1:3:N D
..I $Y>(BGPIOSL-3) D EOP
..W !?10,$E($P(Y,";",BGPZZ),1,20),?30,$E($P(Y,";",(BGPZZ+1)),1,20),?60,$E($P(Y,";",(BGPZZ+2)),1,20)
..Q
I $G(BGPMFITI) W !?10,"MFI Visit Location Taxonomy Name: ",$P(^ATXAX(BGPMFITI,0),U)
I $G(BGPMFITI) W !?10,"The following locations are used for patient visits in this report:",! D
.S BGPZZ="",N=0,Y="" F S BGPZZ=$O(^ATXAX(BGPMFITI,21,"B",BGPZZ)) Q:BGPZZ="" S N=N+1,Y=Y_$S(N=1:"",1:";")_$P($G(^DIC(4,BGPZZ,0)),U)
.S BGPZZ=0,C=0 F BGPZZ=1:3:N D
..I $Y>(BGPIOSL-3) D EOP
..W !?10,$E($P(Y,";",BGPZZ),1,20),?30,$E($P(Y,";",(BGPZZ+1)),1,20),?60,$E($P(Y,";",(BGPZZ+2)),1,20)
..Q
K BGPX,BGPQUIT
Q
HEDISHDR ;
W !
I $G(BGPAREAA) S BGPNODEP=$S(BGPCHSO&('BGPCHSN):27,(BGPCHSO+BGPCHSN)=2:32,1:16)
I '$G(BGPAREAA) S BGPNODEP=$S(BGPCHSO:27,1:16)
S BGPX=$O(^BGPCTRL("B",2012,0))
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY D
.I $Y>(BGPIOSL-2) D HDR Q:BGPQHDR
.W !,^BGPCTRL(BGPX,BGPNODEP,BGPY,0)
.Q
Q
ENDTIME ;
I $D(BGPET) S BGPTS=(86400*($P(BGPET,",")-$P(BGPBT,",")))+($P(BGPET,",",2)-$P(BGPBT,",",2)),BGPHR=$P(BGPTS/3600,".") S:BGPHR="" BGPHR=0 D
.S BGPTS=BGPTS-(BGPHR*3600),BGPM=$P(BGPTS/60,".") S:BGPM="" BGPM=0 S BGPTS=BGPTS-(BGPM*60),BGPS=BGPTS W !!,"RUN TIME (H.M.S): ",BGPHR,".",BGPM,".",BGPS
Q
AREACP ;EP - area cover page
;
S BGPIOSL=$S($G(BGPGUI):55,1:IOSL)
S BGPHPG=0,BGPQHDR="" D HDR
Q:BGPQUIT
I BGPRTYPE=3 W !!,"Measures: HEDIS Performance Measures"
W !,"Population: ",$S(BGPBEN=1:"AI/AN Only (Classification 01)",BGPBEN=2:"non AI/AN Only (Classification NOT 01)",BGPBEN=3:"All (Both AI/AN and non AI/AN)",1:"")
D ENDTIME
S BGPCHSO="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I $P(^BGPHEDCB(X,0),U,17) S BGPCHSO=1
S BGPCHSN="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I '$P(^BGPHEDCB(X,0),U,17) S BGPCHSN=1
D HEDISHDR
;I $G(BGPEXPT) W !!,"A file will be created called BG121",$P(^AUTTLOC(DUZ(2),0),U,10)_".HE"_BGPRPT,".",!,"It will reside in the public/export directory.",!,"This file should be sent to your Area Office.",!
I '$D(BGPGUI),BGPROT'="P" W !!,"A delimited output file called ",BGPDELF,!,"has been placed in the "_$$GETDEDIR^BGP2UTL2()_" directory for your use in Excel or some",!,"other software package.",!,"See your site manager to access this file.",!
W !!?1,"Report includes data from the following facilities:"
NEW BGPX
S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX=""!(BGPQHDR) D
.S BGPC=BGPC+1
.S X=$P(^BGPHEDCB(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
.W !?3,BGPC,". ",$S($P(^BGPHEDCB(BGPX,0),U,17):"*",1:""),X
W !!?1,"The following communities are included in this report:"
NEW BGPX
S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX=""!(BGPQHDR) D
.S BGPC=BGPC+1
.S X=$P(^BGPHEDCB(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
.I $Y>(BGPIOSL-4) D HDR Q:BGPQHDR
.W !!?3,BGPC,". ",$S($P(^BGPHEDCB(BGPX,0),U,17):"*",1:""),X
.W !?3,"Community Taxonomy Name: ",$P(^BGPHEDCB(BGPX,0),U,18)
.;W !?5,"Communities: " W !?5,"Communities: "
.S BGPXX=0,BGPXN=0,BGPXY="" F S BGPXX=$O(^BGPHEDCB(BGPX,9999,BGPXX)) Q:BGPXX'=+BGPXX S BGPXN=BGPXN+1,BGPXY=BGPXY_$S(BGPXN=1:"",1:";")_$P(^BGPHEDCB(BGPX,9999,BGPXX,0),U)
.S BGPX1=0,C=0 F BGPX1=1:3:BGPXN D
..I $Y>(BGPIOSL-4) D HDR Q:BGPQHDR
..W !?10,$E($P(BGPXY,";",BGPX1),1,20),?30,$E($P(BGPXY,";",(BGPX1+1)),1,20),?60,$E($P(BGPXY,";",(BGPX1+2)),1,20)
.I $O(^BGPHEDCB(BGPX,1111,0)) D
..I $Y>(BGPIOSL-4) D HDR Q:BGPQHDR
..W !!?5,"MFI Visit Locations: " S BGPXX=0,BGPXN=0,BGPXY="" F S BGPXX=$O(^BGPHEDCB(BGPX,1111,BGPXX)) Q:BGPXX'=+BGPXX S BGPXN=BGPXN+1,BGPXY=BGPXY_$S(BGPXN=1:"",1:";")_$P(^BGPHEDCB(BGPX,1111,BGPXX,0),U)
..S BGPX1=0,C=0 F BGPX1=1:3:BGPXN W !?10,$E($P(BGPXY,";",BGPX1),1,18),?30,$E($P(BGPXY,";",(BGPX1+1)),1,20),?60,$E($P(BGPXY,";",(BGPX1+2)),1,18)
.Q
K BGPX,BGPQUIT
Q
CTR(X,Y) ;EP - Center X in a field Y wide.
Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
;----------
HDR ;
;
NEW X
I 'BGPHPG G HDR1
I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S BGPQHDR=1 Q
HDR1 ;
S BGPHPG=BGPHPG+1
I BGPHPG'=1 W:$D(IOF) @IOF
W !!,$$CTR("Cover Page",80)
W:BGPRTYPE=3 !!,$$CTR("*** IHS 2012 HEDIS Performance Report ***",80)
W !,$$CTR("AREA AGGREGATE",80)
W !,$$CTR($$RPTVER^BGP2BAN,80)
W !,$$CTR("Date Report Run: "_$$FMTE^XLFDT(DT),80)
W !,$$CTR("Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04),80)
W !,$$CTR("Report Generated by: "_$$USR,80)
S X="Reporting Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) W !,$$CTR(X,80)
S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) W !,$$CTR(X,80)
S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) W !,$$CTR(X,80)
Q
EOP ;EP - End of page.
Q:$E(IOST)'="C"
Q:$D(ZTQUEUED)!'(IOT="TRM")!$D(IO("S"))
NEW DIR
K DIRUT,DFOUT,DLOUT,DTOUT,DUOUT
S DIR(0)="E" D ^DIR
Q
;----------
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")
;----------
;;
E ;;Elder Care-Related Measures
G ;;GPRA Measures (All)
A ;;AREA Director Performance Measures (All)
H ;;HEDIS Measures (All)
D ;;Diabetes-Related Measures
C ;;Cardiovascular Disease Prevention for At-Risk Patients
S ;;Selected Measures (User Defined)
W ;;Women's Health-Related Measures
P ;;Prevention Related Indictors
BGP2HEH ; IHS/CMI/LAB - cover page for HEDIS ;
+1 ;;12.1;IHS CLINICAL REPORTING;;MAY 17, 2012;Build 66
+2 ;
+3 ;
+4 IF $GET(BGPAREAA)
GOTO AREACP
+5 ;cmi/maw 3/19/2010 if not area this variable is not set
SET BGPHPG=0
+6 ;W:$D(IOF) @IOF
+7 SET BGPQHDR=""
+8 WRITE !!,$$CTR("Cover Page",80)
+9 IF BGPRTYPE=3
WRITE !!,$$CTR("*** IHS 2012 HEDIS Performance Report ***",80)
+10 WRITE !,$$CTR($$RPTVER^BGP2BAN,80)
+11 WRITE !,$$CTR("Date Report Run: "_$$FMTE^XLFDT(DT),80)
+12 WRITE !,$$CTR("Site where Run: "_$PIECE(^DIC(4,DUZ(2),0),U),80)
+13 WRITE !,$$CTR("Report Generated by: "_$$USR,80)
+14 SET X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
WRITE !,$$CTR(X,80)
+15 SET X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED)
WRITE !,$$CTR(X,80)
+16 SET X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED)
WRITE !,$$CTR(X,80)
+17 IF BGPRTYPE=3
WRITE !!,"Measures: HEDIS Performance Measures"
+18 WRITE !,"Population: ",$SELECT(BGPBEN=1:"AI/AN Only (Classification 01)",BGPBEN=2:"non AI/AN Only (Classification NOT 01)",BGPBEN=3:"All (Both AI/AN and non AI/AN)",1:"")
+19 DO ENDTIME
+20 DO HEDISHDR
+21 IF $GET(BGPEXPT)
WRITE !!,"A file will be created called BG121",$PIECE(^AUTTLOC(DUZ(2),0),U,10)_".HE"_BGPRPT,".",!,"It will reside in the public/export directory.",!,"This file should be sent to your Area Office.",!
+22 IF '$DATA(BGPGUI)
IF BGPROT'="P"
WRITE !!,"A delimited output file called ",BGPDELF,!,"has been placed in the "_$$GETDEDIR^BGP2UTL2()_" directory for your use in Excel or some",!,"other software package.",!,"See your site manager to access this file.",!
+23 IF $GET(BGPALLPT)
WRITE !!,"All Communities Included.",!
+24 IF '$GET(BGPALLPT)
IF '$GET(BGPSEAT)
WRITE !!?10,"Community Taxonomy Name: ",$PIECE(^ATXAX(BGPTAXI,0),U)
+25 IF '$GET(BGPALLPT)
IF '$GET(BGPSEAT)
WRITE !?10,"The following communities are included in this report:",!
Begin DoDot:1
+26 SET BGPZZ=""
SET N=0
SET Y=""
FOR
SET BGPZZ=$ORDER(BGPTAX(BGPZZ))
IF BGPZZ=""
QUIT
SET N=N+1
SET Y=Y_$SELECT(N=1:"",1:";")_BGPZZ
+27 SET BGPZZ=0
SET C=0
FOR BGPZZ=1:3:N
Begin DoDot:2
+28 IF $Y>(BGPIOSL-3)
DO EOP
+29 WRITE !?10,$EXTRACT($PIECE(Y,";",BGPZZ),1,20),?30,$EXTRACT($PIECE(Y,";",(BGPZZ+1)),1,20),?60,$EXTRACT($PIECE(Y,";",(BGPZZ+2)),1,20)
+30 QUIT
End DoDot:2
End DoDot:1
+31 IF $GET(BGPMFITI)
WRITE !?10,"MFI Visit Location Taxonomy Name: ",$PIECE(^ATXAX(BGPMFITI,0),U)
+32 IF $GET(BGPMFITI)
WRITE !?10,"The following locations are used for patient visits in this report:",!
Begin DoDot:1
+33 SET BGPZZ=""
SET N=0
SET Y=""
FOR
SET BGPZZ=$ORDER(^ATXAX(BGPMFITI,21,"B",BGPZZ))
IF BGPZZ=""
QUIT
SET N=N+1
SET Y=Y_$SELECT(N=1:"",1:";")_$PIECE($GET(^DIC(4,BGPZZ,0)),U)
+34 SET BGPZZ=0
SET C=0
FOR BGPZZ=1:3:N
Begin DoDot:2
+35 IF $Y>(BGPIOSL-3)
DO EOP
+36 WRITE !?10,$EXTRACT($PIECE(Y,";",BGPZZ),1,20),?30,$EXTRACT($PIECE(Y,";",(BGPZZ+1)),1,20),?60,$EXTRACT($PIECE(Y,";",(BGPZZ+2)),1,20)
+37 QUIT
End DoDot:2
End DoDot:1
+38 KILL BGPX,BGPQUIT
+39 QUIT
HEDISHDR ;
+1 WRITE !
+2 IF $GET(BGPAREAA)
SET BGPNODEP=$SELECT(BGPCHSO&('BGPCHSN):27,(BGPCHSO+BGPCHSN)=2:32,1:16)
+3 IF '$GET(BGPAREAA)
SET BGPNODEP=$SELECT(BGPCHSO:27,1:16)
+4 SET BGPX=$ORDER(^BGPCTRL("B",2012,0))
+5 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,BGPNODEP,BGPY))
IF BGPY'=+BGPY
QUIT
Begin DoDot:1
+6 IF $Y>(BGPIOSL-2)
DO HDR
IF BGPQHDR
QUIT
+7 WRITE !,^BGPCTRL(BGPX,BGPNODEP,BGPY,0)
+8 QUIT
End DoDot:1
+9 QUIT
ENDTIME ;
+1 IF $DATA(BGPET)
SET BGPTS=(86400*($PIECE(BGPET,",")-$PIECE(BGPBT,",")))+($PIECE(BGPET,",",2)-$PIECE(BGPBT,",",2))
SET BGPHR=$PIECE(BGPTS/3600,".")
IF BGPHR=""
SET BGPHR=0
Begin DoDot:1
+2 SET BGPTS=BGPTS-(BGPHR*3600)
SET BGPM=$PIECE(BGPTS/60,".")
IF BGPM=""
SET BGPM=0
SET BGPTS=BGPTS-(BGPM*60)
SET BGPS=BGPTS
WRITE !!,"RUN TIME (H.M.S): ",BGPHR,".",BGPM,".",BGPS
End DoDot:1
+3 QUIT
AREACP ;EP - area cover page
+1 ;
+2 SET BGPIOSL=$SELECT($GET(BGPGUI):55,1:IOSL)
+3 SET BGPHPG=0
SET BGPQHDR=""
DO HDR
+4 IF BGPQUIT
QUIT
+5 IF BGPRTYPE=3
WRITE !!,"Measures: HEDIS Performance Measures"
+6 WRITE !,"Population: ",$SELECT(BGPBEN=1:"AI/AN Only (Classification 01)",BGPBEN=2:"non AI/AN Only (Classification NOT 01)",BGPBEN=3:"All (Both AI/AN and non AI/AN)",1:"")
+7 DO ENDTIME
+8 SET BGPCHSO=""
SET X=0
FOR
SET X=$ORDER(BGPSUL(X))
IF X'=+X
QUIT
IF $PIECE(^BGPHEDCB(X,0),U,17)
SET BGPCHSO=1
+9 SET BGPCHSN=""
SET X=0
FOR
SET X=$ORDER(BGPSUL(X))
IF X'=+X
QUIT
IF '$PIECE(^BGPHEDCB(X,0),U,17)
SET BGPCHSN=1
+10 DO HEDISHDR
+11 ;I $G(BGPEXPT) W !!,"A file will be created called BG121",$P(^AUTTLOC(DUZ(2),0),U,10)_".HE"_BGPRPT,".",!,"It will reside in the public/export directory.",!,"This file should be sent to your Area Office.",!
+12 IF '$DATA(BGPGUI)
IF BGPROT'="P"
WRITE !!,"A delimited output file called ",BGPDELF,!,"has been placed in the "_$$GETDEDIR^BGP2UTL2()_" directory for your use in Excel or some",!,"other software package.",!,"See your site manager to access this file.",!
+13 WRITE !!?1,"Report includes data from the following facilities:"
+14 NEW BGPX
+15 SET BGPX=""
SET BGPC=0
FOR
SET BGPX=$ORDER(BGPSUL(BGPX))
IF BGPX=""!(BGPQHDR)
QUIT
Begin DoDot:1
+16 SET BGPC=BGPC+1
+17 SET X=$PIECE(^BGPHEDCB(BGPX,0),U,9)
SET X=$ORDER(^AUTTLOC("C",X,0))
SET X=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
+18 WRITE !?3,BGPC,". ",$SELECT($PIECE(^BGPHEDCB(BGPX,0),U,17):"*",1:""),X
End DoDot:1
+19 WRITE !!?1,"The following communities are included in this report:"
+20 NEW BGPX
+21 SET BGPX=""
SET BGPC=0
FOR
SET BGPX=$ORDER(BGPSUL(BGPX))
IF BGPX=""!(BGPQHDR)
QUIT
Begin DoDot:1
+22 SET BGPC=BGPC+1
+23 SET X=$PIECE(^BGPHEDCB(BGPX,0),U,9)
SET X=$ORDER(^AUTTLOC("C",X,0))
SET X=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
+24 IF $Y>(BGPIOSL-4)
DO HDR
IF BGPQHDR
QUIT
+25 WRITE !!?3,BGPC,". ",$SELECT($PIECE(^BGPHEDCB(BGPX,0),U,17):"*",1:""),X
+26 WRITE !?3,"Community Taxonomy Name: ",$PIECE(^BGPHEDCB(BGPX,0),U,18)
+27 ;W !?5,"Communities: " W !?5,"Communities: "
+28 SET BGPXX=0
SET BGPXN=0
SET BGPXY=""
FOR
SET BGPXX=$ORDER(^BGPHEDCB(BGPX,9999,BGPXX))
IF BGPXX'=+BGPXX
QUIT
SET BGPXN=BGPXN+1
SET BGPXY=BGPXY_$SELECT(BGPXN=1:"",1:";")_$PIECE(^BGPHEDCB(BGPX,9999,BGPXX,0),U)
+29 SET BGPX1=0
SET C=0
FOR BGPX1=1:3:BGPXN
Begin DoDot:2
+30 IF $Y>(BGPIOSL-4)
DO HDR
IF BGPQHDR
QUIT
+31 WRITE !?10,$EXTRACT($PIECE(BGPXY,";",BGPX1),1,20),?30,$EXTRACT($PIECE(BGPXY,";",(BGPX1+1)),1,20),?60,$EXTRACT($PIECE(BGPXY,";",(BGPX1+2)),1,20)
End DoDot:2
+32 IF $ORDER(^BGPHEDCB(BGPX,1111,0))
Begin DoDot:2
+33 IF $Y>(BGPIOSL-4)
DO HDR
IF BGPQHDR
QUIT
+34 WRITE !!?5,"MFI Visit Locations: "
SET BGPXX=0
SET BGPXN=0
SET BGPXY=""
FOR
SET BGPXX=$ORDER(^BGPHEDCB(BGPX,1111,BGPXX))
IF BGPXX'=+BGPXX
QUIT
SET BGPXN=BGPXN+1
SET BGPXY=BGPXY_$SELECT(BGPXN=1:"",1:";")_$PIECE(^BGPHEDCB(BGPX,1111,BGPXX,0),U)
+35 SET BGPX1=0
SET C=0
FOR BGPX1=1:3:BGPXN
WRITE !?10,$EXTRACT($PIECE(BGPXY,";",BGPX1),1,18),?30,$EXTRACT($PIECE(BGPXY,";",(BGPX1+1)),1,20),?60,$EXTRACT($PIECE(BGPXY,";",(BGPX1+2)),1,18)
End DoDot:2
+36 QUIT
End DoDot:1
+37 KILL BGPX,BGPQUIT
+38 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 ;----------
HDR ;
+1 ;
+2 NEW X
+3 IF 'BGPHPG
GOTO HDR1
+4 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
WRITE !
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET BGPQHDR=1
QUIT
HDR1 ;
+1 SET BGPHPG=BGPHPG+1
+2 IF BGPHPG'=1
IF $DATA(IOF)
WRITE @IOF
+3 WRITE !!,$$CTR("Cover Page",80)
+4 IF BGPRTYPE=3
WRITE !!,$$CTR("*** IHS 2012 HEDIS Performance Report ***",80)
+5 WRITE !,$$CTR("AREA AGGREGATE",80)
+6 WRITE !,$$CTR($$RPTVER^BGP2BAN,80)
+7 WRITE !,$$CTR("Date Report Run: "_$$FMTE^XLFDT(DT),80)
+8 WRITE !,$$CTR("Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04),80)
+9 WRITE !,$$CTR("Report Generated by: "_$$USR,80)
+10 SET X="Reporting Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
WRITE !,$$CTR(X,80)
+11 SET X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED)
WRITE !,$$CTR(X,80)
+12 SET X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED)
WRITE !,$$CTR(X,80)
+13 QUIT
EOP ;EP - End of page.
+1 IF $EXTRACT(IOST)'="C"
QUIT
+2 IF $DATA(ZTQUEUED)!'(IOT="TRM")!$DATA(IO("S"))
QUIT
+3 NEW DIR
+4 KILL DIRUT,DFOUT,DLOUT,DTOUT,DUOUT
+5 SET DIR(0)="E"
DO ^DIR
+6 QUIT
+7 ;----------
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 ;----------
+3 ;;
E ;;Elder Care-Related Measures
G ;;GPRA Measures (All)
A ;;AREA Director Performance Measures (All)
H ;;HEDIS Measures (All)
D ;;Diabetes-Related Measures
C ;;Cardiovascular Disease Prevention for At-Risk Patients
S ;;Selected Measures (User Defined)
W ;;Women's Health-Related Measures
P ;;Prevention Related Indictors