- BGP4HEH ; IHS/CMI/LAB - cover page for HEDIS ;
- ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
- ;
- ;
- W:$D(IOF) @IOF
- W !!,$$CTR("Cover Page",80)
- W:BGPRTYPE=3 !!,$$CTR("*** IHS FY04 HEDIS Clinical Performance Indicators ***",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="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)
- I BGPRTYPE=3 W !!,"Indicators: HEDIS Indicators"
- 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 BG04",$P(^AUTTLOC(DUZ(2),0),U,10)_"."_BGPRPT,".",!,"It will reside in the public/export directory.",!,"This file should be sent to your Area Office.",!
- I BGPROT'="P" W !!,"A delimited output file called ",BGPDELF,!,"has been placed in the public 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>(IOSL-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 !
- Q:$G(BGPSEAT)
- S BGPX=$O(^BGPCTRL("B",2004,0))
- S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,16,BGPY)) Q:BGPY'=+BGPY D
- .I $Y>(IOSL-2) D EOP W:$D(IOF) @IOF
- .W !,^BGPCTRL(BGPX,16,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
- ;
- W:$D(IOF) @IOF
- W !!,$$CTR("Cover Page",80)
- W:BGPRTYPE=3 !!,$$CTR("*** IHS FY04 HEDIS Clinical Performance Indicators ***",80)
- W !,$$CTR("AREA AGGREGATE",80)
- W !,$$CTR("Date Report Run: "_$$FMTE^XLFDT(DT),80)
- W !,$$CTR("Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04))
- 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)
- I BGPRTYPE=3 W !!,"Indicators: HEDIS Indicators"
- 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 BG04",$P(^AUTTLOC(DUZ(2),0),U,10)_"."_BGPRPT,".",!,"It will reside in the public/export directory.",!,"This file should be sent to your Area Office.",!
- I BGPROT'="P" W !!,"A delimited output file called ",BGPDELF,!,"has been placed in the public directory for your use in Excel or some",!,"other software package.",!,"See your site manager to access this file.",!
- W !!?1,"Report includes the following facility data:"
- NEW BGPX
- S BGPX="" F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
- .I $Y>(IOSL-5) D EOP W:$D(IOF) @IOF
- .S X=$P(^BGPHEDCF(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
- .W !?3,X
- .W !?5,"Communities: " S X=0,N=0,Y="" F S X=$O(^BGPHEDCF(BGPX,9999,X)) Q:X'=+X S N=N+1,Y=Y_$S(N=1:"",1:";")_$P(^BGPHEDCF(BGPX,9999,X,0),U)
- .S X=0,C=0 F X=1:3:N W !?10,$E($P(Y,";",X),1,20),?30,$E($P(Y,";",(X+1)),1,20),?60,$E($P(Y,";",(X+2)),1,20)
- .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
- ;----------
- 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")
- ;----------
- ;;
- G ;;GPRA Indicators (All)
- A ;;AREA Director Performance Indicators (All)
- H ;;HEDIS Indicators (All)
- D ;;Diabetes Indicators (All)
- C ;;Cardiovascular Indicators (All)
- S ;;Selected Indicators
- W ;;Women's Health Related Indicators
- P ;;Prevention Related Indictors
- BGP4HEH ; IHS/CMI/LAB - cover page for HEDIS ;
- +1 ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
- +2 ;
- +3 ;
- +4 IF $DATA(IOF)
- WRITE @IOF
- +5 WRITE !!,$$CTR("Cover Page",80)
- +6 IF BGPRTYPE=3
- WRITE !!,$$CTR("*** IHS FY04 HEDIS Clinical Performance Indicators ***",80)
- +7 WRITE !,$$CTR("Date Report Run: "_$$FMTE^XLFDT(DT),80)
- +8 WRITE !,$$CTR("Site where Run: "_$PIECE(^DIC(4,DUZ(2),0),U),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 IF BGPRTYPE=3
- WRITE !!,"Indicators: HEDIS Indicators"
- +14 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:"")
- +15 DO ENDTIME
- +16 DO HEDISHDR
- +17 IF $GET(BGPEXPT)
- WRITE !!,"A file will be created called BG04",$PIECE(^AUTTLOC(DUZ(2),0),U,10)_"."_BGPRPT,".",!,"It will reside in the public/export directory.",!,"This file should be sent to your Area Office.",!
- +18 IF BGPROT'="P"
- WRITE !!,"A delimited output file called ",BGPDELF,!,"has been placed in the public directory for your use in Excel or some",!,"other software package.",!,"See your site manager to access this file.",!
- +19 IF $GET(BGPALLPT)
- WRITE !!,"All Communities Included.",!
- +20 IF '$GET(BGPALLPT)
- IF '$GET(BGPSEAT)
- WRITE !?10,"Community Taxonomy Name: ",$PIECE(^ATXAX(BGPTAXI,0),U)
- +21 IF '$GET(BGPALLPT)
- IF '$GET(BGPSEAT)
- WRITE !?10,"The following communities are included in this report:",!
- Begin DoDot:1
- +22 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
- +23 SET BGPZZ=0
- SET C=0
- FOR BGPZZ=1:3:N
- Begin DoDot:2
- +24 IF $Y>(IOSL-3)
- DO EOP
- +25 WRITE !?10,$EXTRACT($PIECE(Y,";",BGPZZ),1,20),?30,$EXTRACT($PIECE(Y,";",(BGPZZ+1)),1,20),?60,$EXTRACT($PIECE(Y,";",(BGPZZ+2)),1,20)
- +26 QUIT
- End DoDot:2
- End DoDot:1
- +27 KILL BGPX,BGPQUIT
- +28 QUIT
- HEDISHDR ;
- +1 WRITE !
- +2 IF $GET(BGPSEAT)
- QUIT
- +3 SET BGPX=$ORDER(^BGPCTRL("B",2004,0))
- +4 SET BGPY=0
- FOR
- SET BGPY=$ORDER(^BGPCTRL(BGPX,16,BGPY))
- IF BGPY'=+BGPY
- QUIT
- Begin DoDot:1
- +5 IF $Y>(IOSL-2)
- DO EOP
- IF $DATA(IOF)
- WRITE @IOF
- +6 WRITE !,^BGPCTRL(BGPX,16,BGPY,0)
- +7 QUIT
- End DoDot:1
- +8 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 IF $DATA(IOF)
- WRITE @IOF
- +3 WRITE !!,$$CTR("Cover Page",80)
- +4 IF BGPRTYPE=3
- WRITE !!,$$CTR("*** IHS FY04 HEDIS Clinical Performance Indicators ***",80)
- +5 WRITE !,$$CTR("AREA AGGREGATE",80)
- +6 WRITE !,$$CTR("Date Report Run: "_$$FMTE^XLFDT(DT),80)
- +7 WRITE !,$$CTR("Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04))
- +8 WRITE !,$$CTR("Report Generated by: "_$$USR,80)
- +9 SET X="Reporting Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
- WRITE !,$$CTR(X,80)
- +10 SET X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED)
- WRITE !,$$CTR(X,80)
- +11 SET X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED)
- WRITE !,$$CTR(X,80)
- +12 IF BGPRTYPE=3
- WRITE !!,"Indicators: HEDIS Indicators"
- +13 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:"")
- +14 DO ENDTIME
- +15 DO HEDISHDR
- +16 IF $GET(BGPEXPT)
- WRITE !!,"A file will be created called BG04",$PIECE(^AUTTLOC(DUZ(2),0),U,10)_"."_BGPRPT,".",!,"It will reside in the public/export directory.",!,"This file should be sent to your Area Office.",!
- +17 IF BGPROT'="P"
- WRITE !!,"A delimited output file called ",BGPDELF,!,"has been placed in the public directory for your use in Excel or some",!,"other software package.",!,"See your site manager to access this file.",!
- +18 WRITE !!?1,"Report includes the following facility data:"
- +19 NEW BGPX
- +20 SET BGPX=""
- FOR
- SET BGPX=$ORDER(BGPSUL(BGPX))
- IF BGPX=""
- QUIT
- Begin DoDot:1
- +21 IF $Y>(IOSL-5)
- DO EOP
- IF $DATA(IOF)
- WRITE @IOF
- +22 SET X=$PIECE(^BGPHEDCF(BGPX,0),U,9)
- SET X=$ORDER(^AUTTLOC("C",X,0))
- SET X=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
- +23 WRITE !?3,X
- +24 WRITE !?5,"Communities: "
- SET X=0
- SET N=0
- SET Y=""
- FOR
- SET X=$ORDER(^BGPHEDCF(BGPX,9999,X))
- IF X'=+X
- QUIT
- SET N=N+1
- SET Y=Y_$SELECT(N=1:"",1:";")_$PIECE(^BGPHEDCF(BGPX,9999,X,0),U)
- +25 SET X=0
- SET C=0
- FOR X=1:3:N
- WRITE !?10,$EXTRACT($PIECE(Y,";",X),1,20),?30,$EXTRACT($PIECE(Y,";",(X+1)),1,20),?60,$EXTRACT($PIECE(Y,";",(X+2)),1,20)
- +26 QUIT
- End DoDot:1
- +27 KILL BGPX,BGPQUIT
- +28 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 ;----------
- 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 ;;
- G ;;GPRA Indicators (All)
- A ;;AREA Director Performance Indicators (All)
- H ;;HEDIS Indicators (All)
- D ;;Diabetes Indicators (All)
- C ;;Cardiovascular Indicators (All)
- S ;;Selected Indicators
- W ;;Women's Health Related Indicators
- P ;;Prevention Related Indictors