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

BGP7HEH.m

Go to the documentation of this file.
  1. BGP7HEH ; IHS/CMI/LAB - cover page for HEDIS ;
  1. ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
  1. ;
  1. ;
  1. W:$D(IOF) @IOF
  1. W !!,$$CTR("Cover Page",80)
  1. W:BGPRTYPE=3 !!,$$CTR("*** IHS 2007 HEDIS Clinical Performance Report ***",80)
  1. W !,$$CTR("CRS 2007, Version 7.0",80)
  1. W !,$$CTR("Date Report Run: "_$$FMTE^XLFDT(DT),80)
  1. W !,$$CTR("Site where Run: "_$P(^DIC(4,DUZ(2),0),U),80)
  1. W !,$$CTR("Report Generated by: "_$$USR,80)
  1. S X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) W !,$$CTR(X,80)
  1. S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) W !,$$CTR(X,80)
  1. S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) W !,$$CTR(X,80)
  1. I BGPRTYPE=3 W !!,"Measures: HEDIS Measures"
  1. 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:"")
  1. D ENDTIME
  1. D HEDISHDR
  1. I $G(BGPEXPT) W !!,"A file will be created called BG07",$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.",!
  1. I '$D(BGPGUI),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.",!
  1. I $G(BGPALLPT) W !!,"All Communities Included.",!
  1. I '$G(BGPALLPT),'$G(BGPSEAT) W !?10,"Community Taxonomy Name: ",$P(^ATXAX(BGPTAXI,0),U)
  1. I '$G(BGPALLPT),'$G(BGPSEAT) W !?10,"The following communities are included in this report:",! D
  1. .S BGPZZ="",N=0,Y="" F S BGPZZ=$O(BGPTAX(BGPZZ)) Q:BGPZZ="" S N=N+1,Y=Y_$S(N=1:"",1:";")_BGPZZ
  1. .S BGPZZ=0,C=0 F BGPZZ=1:3:N D
  1. ..I $Y>(BGPIOSL-3) D EOP
  1. ..W !?10,$E($P(Y,";",BGPZZ),1,20),?30,$E($P(Y,";",(BGPZZ+1)),1,20),?60,$E($P(Y,";",(BGPZZ+2)),1,20)
  1. ..Q
  1. I $G(BGPMFITI) W !?10,"MFI Visit Location Taxonomy Name: ",$P(^ATXAX(BGPMFITI,0),U)
  1. I $G(BGPMFITI) W !?10,"The following locations are used for patient visits in this report:",! D
  1. .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)
  1. .S BGPZZ=0,C=0 F BGPZZ=1:3:N D
  1. ..I $Y>(BGPIOSL-3) D EOP
  1. ..W !?10,$E($P(Y,";",BGPZZ),1,20),?30,$E($P(Y,";",(BGPZZ+1)),1,20),?60,$E($P(Y,";",(BGPZZ+2)),1,20)
  1. ..Q
  1. K BGPX,BGPQUIT
  1. Q
  1. HEDISHDR ;
  1. W !
  1. I $G(BGPAREAA) S BGPNODEP=$S(BGPCHSO&('BGPCHSN):27,(BGPCHSO+BGPCHSN)=2:32,1:16)
  1. I '$G(BGPAREAA) S BGPNODEP=$S(BGPCHSO:27,1:16)
  1. S BGPX=$O(^BGPCTRL("B",2007,0))
  1. S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY D
  1. .I $Y>(BGPIOSL-2) D EOP W:$D(IOF) @IOF
  1. .W !,^BGPCTRL(BGPX,BGPNODEP,BGPY,0)
  1. .Q
  1. Q
  1. ENDTIME ;
  1. 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
  1. .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
  1. Q
  1. AREACP ;EP - area cover page
  1. ;
  1. W:$D(IOF) @IOF
  1. W !!,$$CTR("Cover Page",80)
  1. W:BGPRTYPE=3 !!,$$CTR("*** IHS 2007 HEDIS Clinical Performance Report ***",80)
  1. ;W:BGPSUCNT>1 !,$$CTR("AREA AGGREGATE",80)
  1. W !,$$CTR("CRS 2007, Version 7.0",80)
  1. W !,$$CTR("Date Report Run: "_$$FMTE^XLFDT(DT),80)
  1. W !,$$CTR("Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04))
  1. W !,$$CTR("Report Generated by: "_$$USR,80)
  1. S X="Reporting Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) W !,$$CTR(X,80)
  1. S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) W !,$$CTR(X,80)
  1. S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) W !,$$CTR(X,80)
  1. I BGPRTYPE=3 W !!,"Measures: HEDIS Measures"
  1. 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:"")
  1. D ENDTIME
  1. S BGPCHSO="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I $P(^BGPHEDCA(X,0),U,17) S BGPCHSO=1
  1. S BGPCHSN="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I '$P(^BGPHEDCA(X,0),U,17) S BGPCHSN=1
  1. D HEDISHDR
  1. ;I $G(BGPEXPT) W !!,"A file will be created called BG07",$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.",!
  1. I '$D(BGPGUI),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.",!
  1. W !!?1,"Report includes data from the following facilities:"
  1. NEW BGPX
  1. S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
  1. .S BGPC=BGPC+1
  1. .S X=$P(^BGPHEDCA(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
  1. .W !?3,BGPC,". ",$S($P(^BGPHEDCA(BGPX,0),U,17):"*",1:""),X
  1. W !!?1,"The following communities are included in this report:"
  1. NEW BGPX
  1. S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
  1. .S BGPC=BGPC+1
  1. .S X=$P(^BGPHEDCA(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
  1. .W !!?3,BGPC,". ",$S($P(^BGPHEDCA(BGPX,0),U,17):"*",1:""),X
  1. .W !?5,"Communities: " S BGPXX=0,BGPXN=0,BGPXY="" F S BGPXX=$O(^BGPHEDCA(BGPX,9999,BGPXX)) Q:BGPXX'=+BGPXX S BGPXN=BGPXN+1,BGPXY=BGPXY_$S(BGPXN=1:"",1:";")_$P(^BGPHEDCA(BGPX,9999,BGPXX,0),U)
  1. .S BGPX1=0,C=0 F BGPX1=1:3:BGPXN D
  1. ..W !?10,$E($P(BGPXY,";",BGPX1),1,20),?30,$E($P(BGPXY,";",(BGPX1+1)),1,20),?60,$E($P(BGPXY,";",(BGPX1+2)),1,20)
  1. .I $O(^BGPHEDCA(BGPX,1111,0)) D
  1. ..W !!?5,"MFI Visit Locations: " S BGPXX=0,BGPXN=0,BGPXY="" F S BGPXX=$O(^BGPHEDCA(BGPX,1111,BGPXX)) Q:BGPXX'=+BGPXX S BGPXN=BGPXN+1,BGPXY=BGPXY_$S(BGPXN=1:"",1:";")_$P(^BGPHEDCA(BGPX,1111,BGPXX,0),U)
  1. ..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)
  1. .Q
  1. K BGPX,BGPQUIT
  1. Q
  1. CTR(X,Y) ;EP - Center X in a field Y wide.
  1. Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
  1. ;----------
  1. EOP ;EP - End of page.
  1. Q:$E(IOST)'="C"
  1. Q:$D(ZTQUEUED)!'(IOT="TRM")!$D(IO("S"))
  1. NEW DIR
  1. K DIRUT,DFOUT,DLOUT,DTOUT,DUOUT
  1. S DIR(0)="E" D ^DIR
  1. Q
  1. ;----------
  1. USR() ;EP - Return name of current user from ^VA(200.
  1. Q $S($G(DUZ):$S($D(^VA(200,DUZ,0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0")
  1. ;----------
  1. ;;
  1. E ;;Elder Care-Related Measures
  1. G ;;GPRA Measures (All)
  1. A ;;AREA Director Performance Measures (All)
  1. H ;;HEDIS Measures (All)
  1. D ;;Diabetes-Related Measures
  1. C ;;Cardiovascular Disease Prevention for At-Risk Patients
  1. S ;;Selected Measures (User Defined)
  1. W ;;Women's Health-Related Measures
  1. P ;;Prevention Related Indictors