BGP3DH1 ; IHS/CMI/LAB - cover page for gpra 28 Apr 2010 11:30 AM 02 Jul 2010 8:28 AM ;
;;13.0;IHS CLINICAL REPORTING;;NOV 20, 2012;Build 81
;
;
ONMHDR ;EP
D W^BGP3DP("",0,1,BGPPTYPE)
I $G(BGPCHSO) G ONMHDRC
I $G(BGPURBAN) G ONMHDRU
S BGPTEXT="ONH1" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(BGPT,0,1,BGPPTYPE)
I BGPPTYPE="P" Q:BGPQHDR
I BGPRTC="U" D I BGPPTYPE="P" Q:BGPQHDR
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP("3. User defines population: a) Indian/Alaska Natives Only - based on",0,1,BGPPTYPE)
.D W^BGP3DP("Classification of 01; b) Non AI/AN (not 01); or c) Both.",0,1,BGPPTYPE)
I BGPRTC="H" D I BGPPTYPE="P" Q:BGPQHDR
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP("3. Indian/Alaska Natives Only - based on Classification of 01.",0,1,BGPPTYPE)
I BGPPTYPE="P" Q:BGPQHDR
S BGPTEXT="ONH2" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(BGPT,0,1,BGPPTYPE)
D W^BGP3DP("",0,1,BGPPTYPE)
Q
ONMHDRC ;
S BGPTEXT="ONHC1" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.I BGPPTYPE="P",$Y>(BGPIOSL-2),BGPPTYPE="P" D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(BGPT,0,1,BGPPTYPE)
I BGPPTYPE="P" I BGPPTYPE="P" Q:BGPQHDR
I BGPRTC="U" D I BGPPTYPE="P" I BGPPTYPE="P" Q:BGPQHDR
.I BGPPTYPE="P" I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP("3. User defines population: a) Indian/Alaska Natives Only - based on",0,1,BGPPTYPE)
.D W^BGP3DP("Classification of 01; b) Non AI/AN (not 01); or c) Both.",0,1,BGPPTYPE)
I BGPRTC="H" D I BGPPTYPE="P" Q:BGPQHDR
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP("3. Indian/Alaska Natives Only - based on Classification of 01.",0,1,BGPPTYPE)
I BGPPTYPE="P" Q:BGPQHDR
S BGPTEXT="ONH2C" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(BGPT,0,1,BGPPTYPE)
D W^BGP3DP("",0,1,BGPPTYPE)
Q
ONMHDRU ;
S BGPTEXT="ONHU1" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.I BGPPTYPE="P",$Y>(BGPIOSL-2),BGPPTYPE="P" D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(BGPT,0,1,BGPPTYPE)
I BGPPTYPE="P" I BGPPTYPE="P" Q:BGPQHDR
I BGPRTC="U" D I BGPPTYPE="P" I BGPPTYPE="P" Q:BGPQHDR
.I BGPPTYPE="P" I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP("3. User defines population: a) Indian/Alaska Natives Only - based on",0,1,BGPPTYPE)
.D W^BGP3DP("Classification of 01; b) Non AI/AN (not 01); or c) Both.",0,1,BGPPTYPE)
I BGPRTC="H" D I BGPPTYPE="P" Q:BGPQHDR
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP("3. Indian/Alaska Natives Only - based on Classification of 01.",0,1,BGPPTYPE)
I BGPPTYPE="P" Q:BGPQHDR
S BGPTEXT="ONH2U" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(BGPT,0,1,BGPPTYPE)
D W^BGP3DP("",0,1,BGPPTYPE)
Q
PEHDR ;EP
D W^BGP3DP("",0,1,BGPPTYPE)
;Q:$G(BGPSEAT)
S BGPNODEP=$S($G(BGPSEAT):75,1:34)
S BGPX=$O(^BGPCTRL("B",2013,0))
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
.Q
D W^BGP3DP("",0,1,BGPPTYPE)
Q
AHDR ;EP
;
I BGPPTYPE'="P" G AHDR10
I BGPPTYPE="P",'BGPHPG G AHDR1
I $E(IOST)="C",IO=IO(0) D W^BGP3DP("",0,1,BGPPTYPE) S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S BGPQHDR=1 Q
AHDR1 ;
S BGPHPG=BGPHPG+1 I BGPHPG'=1 W:$D(IOF) @IOF
I $G(BGPGUI),BGPPTYPE="P",BGPHPG'=1 D W^BGP3DP("ZZZZZZZ",0,0,BGPPTYPE),W^BGP3DP("",0,1,BGPPTYPE) ;GUI
AHDR10 D W^BGP3DP("Cover Page "_$S(BGPPTYPE="P":BGPHPG,1:""),1,1,BGPPTYPE)
I $G(BGPDASH) D W^BGP3DP("*** IHS 2013 National GPRA Dashboard ***",1,2,BGPPTYPE) G N
I BGPRTYPE=1,$G(BGPNGR09) D W^BGP3DP("*** IHS 2014 National GPRA/GPRAMA Report, Run Using 2013 Logic ***",1,2,BGPPTYPE) G N
I BGPRTYPE=1,'$G(BGPYGPU),'$G(BGPSUMON) D W^BGP3DP("*** IHS 2013 National GPRA/GPRAMA Report ***",1,2,BGPPTYPE)
I BGPRTYPE=1,'$G(BGPYGPU),$G(BGPSUMON) D W^BGP3DP("*** IHS 2013 National GPRA/GPRAMA Report Clinical Performance Summaries ***",1,2,BGPPTYPE)
I BGPRTYPE=6 D W^BGP3DP("*** IHS 2013 Patient Education Report with Community Specified ***",1,2,BGPPTYPE)
I BGPRTYPE=1,$G(BGPYGPU) D W^BGP3DP("*** IHS 2013 GPRA/GPRAMA Performance Report ***",1,2,BGPPTYPE)
I BGPRTYPE=7 D W^BGP3DP("*** IHS 2013 Other National Measures Report ***",1,2,BGPPTYPE)
N D W^BGP3DP("AREA AGGREGATE",1,1,BGPPTYPE)
D W^BGP3DP($$RPTVER^BGP3BAN,1,1,BGPPTYPE)
S X="Date Report Run: "_$$FMTE^XLFDT(DT) D W^BGP3DP(X,1,1,BGPPTYPE)
S X="Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04) D W^BGP3DP(X,1,1,BGPPTYPE)
D W^BGP3DP("Report Generated by: "_$$USR^BGP3DH,1,1,BGPPTYPE)
S X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) D W^BGP3DP(X,1,1,BGPPTYPE)
S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) D W^BGP3DP(X,1,1,BGPPTYPE)
I '$G(BGPDASH) S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) D W^BGP3DP(X,1,1,BGPPTYPE)
D W^BGP3DP("",0,1,BGPPTYPE)
Q
COMHDR ;EP
D W^BGP3DP("",0,1,BGPPTYPE)
Q:$G(BGPSEAT)
S BGPNODEP=$S($G(BGPCHSO):24,1:17)
S BGPNODEP=$S(BGPURBAN:48,1:BGPNODEP)
S BGPX=$O(^BGPCTRL("B",2013,0))
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
.Q
I $G(BGPYGPU) D W^BGP3DP("See last pages of this report for Performance Summaries.",0,2,BGPPTYPE)
D W^BGP3DP("",0,1,BGPPTYPE)
Q
GPRAHDRS ;EP
D W^BGP3DP("",0,1,BGPPTYPE)
S BGPNODEP=$S($G(BGPCHSO):77,1:76)
S BGPNODEP=$S($G(BGPURBAN):47,1:BGPNODEP)
S BGPX=$O(^BGPCTRL("B",2013,0))
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
.Q
D W^BGP3DP("",0,1,BGPPTYPE)
Q
PPHDR ;EP
D W^BGP3DP("",0,1,BGPPTYPE)
S BGPX=$O(^BGPCTRL("B",2013,0))
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,18,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(^BGPCTRL(BGPX,18,BGPY,0),0,1,BGPPTYPE)
.Q
D W^BGP3DP("",0,1,BGPPTYPE)
Q
GPUPPHDR ;EP
D W^BGP3DP("",0,1,BGPPTYPE)
S BGPX=$O(^BGPCTRL("B",2013,0))
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,83,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(^BGPCTRL(BGPX,83,BGPY,0),0,1,BGPPTYPE)
.Q
D W^BGP3DP("",0,1,BGPPTYPE)
Q
ALLHDR ;EP
D W^BGP3DP("",0,1,BGPPTYPE)
Q:$G(BGPSEAT)
S BGPNODEP=$S(BGPCHSO:25,1:19)
S BGPNODEP=$S($G(BGPURBAN):49,1:BGPNODEP)
S BGPX=$O(^BGPCTRL("B",2013,0))
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY!(BGPQHDR) D
.I BGPPTYPE="P",$Y>(BGPIOSL-2) D HDR^BGP3DH I BGPPTYPE="P" Q:BGPQHDR
.D W^BGP3DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
.Q
D W^BGP3DP("",0,1,BGPPTYPE)
Q
AREACP ;EP
S BGPQHDR=0,BGPHPG=0
D AHDR
I BGPPTYPE="P" Q:BGPQHDR
D MD^BGP3DH
D PD^BGP3DH
D ENDTIME^BGP3DH
I BGPRTYPE=6 D PEDCP^BGP3DH Q
S BGPCHSO="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I $P(^BGPGPDCH(X,0),U,17) S BGPCHSO=1
S BGPCHSN="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I '$P(^BGPGPDCH(X,0),U,17) S BGPCHSN=1
S BGPURBO="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I $P(^BGPGPDCH(X,0),U,19) S BGPURBO=1
S BGPURBN="",X=0 F S X=$O(BGPSUL(X)) Q:X'=+X I '$P(^BGPGPDCH(X,0),U,19) S BGPURBN=1
I $G(BGPDASH) D DASHHDRA^BGP3DH2 G N1
I BGPRTYPE=1,'$G(BGPYGPU),'$G(BGPSUMON) D GPRAHDRA^BGP3DH2
I BGPRTYPE=1,$G(BGPYGPU) D GPRAHDRA^BGP3DH2
I BGPRTYPE=1,'$G(BGPYGPU),$G(BGPSUMON) D GPRAHDRS
I BGPRTYPE=7 D ONMHDRA^BGP3DH2
N1 I $G(BGPEXCEL),'$G(BGPYGPU),BGPRTYPE=1 D
.D W^BGP3DP("GPRA Developmental filenames: ",0,2,BGPPTYPE),W^BGP3DP(BGPFDEV1,0,1,BGPPTYPE,1,15),W^BGP3DP(BGPFDEV2,0,1,BGPPTYPE,1,15),W^BGP3DP(BGPFDEV3,0,1,BGPPTYPE,1,15)
.D W^BGP3DP("National GPRA filenames: ",0,2,BGPPTYPE),W^BGP3DP(BGPFGNT1,0,1,BGPPTYPE,1,15),W^BGP3DP(BGPFGNT2,0,1,BGPPTYPE,1,15),W^BGP3DP(BGPFGNT3,0,1,BGPPTYPE,1,15)
I $G(BGPEXCEL),BGPRTYPE=7 D W^BGP3DP("Other National Measures filenames: ",0,1,BGPPTYPE),W^BGP3DP(BGPFONN1,0,1,BGPPTYPE,1,15),W^BGP3DP(BGPFONN2,0,1,BGPPTYPE,1,15),W^BGP3DP(BGPFONN3,0,1,BGPPTYPE,1,15),W^BGP3DP(BGPFONN4,0,1,BGPPTYPE,1,15) D
.D W^BGP3DP(BGPFONN5,0,1,BGPPTYPE,1,15)
I BGPROT'="P",'$D(BGPGUI),BGPDELT="F" D W^BGP3DP("A delimited output file called "_BGPDELF,0,2,BGPPTYPE) D
.D W^BGP3DP("has been placed in the "_$$GETDEDIR^BGP3UTL2()_" directory for your use in Excel or some",0,1,BGPPTYPE)
.D W^BGP3DP("other software package.",0,1,BGPPTYPE)
.D W^BGP3DP("See your site manager to access this file.",0,1,BGPPTYPE)
.D W^BGP3DP("",0,1,BGPPTYPE)
;I BGPROT'="P",'$D(BGPGUI) W !!,"A delimited output file called ",BGPDELF,!,"has been placed in the "_$$GETDEDIR^BGP3UTL2()_" 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:"
D W^BGP3DP("Report includes data from the following facilities: ",0,2,BGPPTYPE)
NEW BGPX
S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
.S X=$P(^BGPGPDCH(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
.S BGPC=BGPC+1,X=BGPC_". "_$S($P(^BGPGPDCH(BGPX,0),U,17):"*",$P(^BGPGPDCH(BGPX,0),U,19):"**",1:"")_X D W^BGP3DP(X,0,1,BGPPTYPE,1,3)
.Q
S X=" " D W^BGP3DP(X,0,1,BGPPTYPE)
S X="The following communities are included in this report:" D W^BGP3DP(X,0,1,BGPPTYPE,1,1)
S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
.S X=$P(^BGPGPDCH(BGPX,0),U,9),X=$O(^AUTTLOC("C",X,0)) S X=$S(X:$P(^DIC(4,X,0),U),1:"?????")
.S BGPC=BGPC+1,X=BGPC_". "_$S($P(^BGPGPDCH(BGPX,0),U,17):"*",1:"")_X D W^BGP3DP(X,0,1,BGPPTYPE,1,3)
.;S X="Communities: " D W^BGP3DP(X,0,1,BGPPTYPE,1,5)
.S X="Community Taxonomy Name: "_$P(^BGPGPDCH(BGPX,0),U,18) D W^BGP3DP(X,0,1,BGPPTYPE,1,5)
.S BGPXX=0,BGPXN=0,BGPXY="" F S BGPXX=$O(^BGPGPDCH(BGPX,9999,BGPXX)) Q:BGPXX'=+BGPXX S BGPXN=BGPXN+1,BGPXY=BGPXY_$S(BGPXN=1:"",1:";")_$P(^BGPGPDCH(BGPX,9999,BGPXX,0),U)
.S BGPX1=0,C=0 F BGPX1=1:3:BGPXN D
..D W^BGP3DP($E($P(BGPXY,";",BGPX1),1,20),0,1,BGPPTYPE,1,10)
..D W^BGP3DP($E($P(BGPXY,";",(BGPX1+1)),1,20),0,0,BGPPTYPE,2,30)
..D W^BGP3DP($E($P(BGPXY,";",(BGPX1+2)),1,20),0,0,BGPPTYPE,3,60)
..Q
.I $O(^BGPGPDCH(BGPX,1111,0)) D
..D W^BGP3DP("MFI Visit Locations: ",0,2,BGPPTYPE,1,5) S BGPXX=0,BGPXN=0,BGPXY="" F S BGPXX=$O(^BGPGPDCH(BGPX,1111,BGPXX)) Q:BGPXX'=+BGPXX S BGPXN=BGPXN+1,BGPXY=BGPXY_$S(BGPXN=1:"",1:";")_$P(^BGPGPDCH(BGPX,1111,BGPXX,0),U)
..S BGPX1=0,C=0 F BGPX1=1:3:BGPXN D
...D W^BGP3DP($E($P(BGPXY,";",BGPX1),1,20),0,1,BGPPTYPE,1,10)
...D W^BGP3DP($E($P(BGPXY,";",(BGPX1+1)),1,20),0,0,BGPPTYPE,2,30)
...D W^BGP3DP($E($P(BGPXY,";",(BGPX1+2)),1,20),0,0,BGPPTYPE,3,60)
..Q
.Q
D W^BGP3DP(" ",0,1,BGPPTYPE)
I BGPCHSO D
.;S X=" " D W^BGP3DP(X,0,1,BGPPTYPE)
.S X="* CHS-only site. Uses Active Clinical CHS Population definition vs. Active Clinical." D W^BGP3DP(X,0,1,BGPPTYPE)
I BGPURBO D
.;S X=" " D W^BGP3DP(X,0,1,BGPPTYPE)
.S X="**Urban Outreach & Referral-only site. Uses Active Clinical Behavioral Health" D W^BGP3DP(X,0,1,BGPPTYPE) S X="Population definition vs. Active Clinical." D W^BGP3DP(X,0,1,BGPPTYPE)
S X=" " D W^BGP3DP(X,0,1,BGPPTYPE)
I BGPPTYPE="D" D W^BGP3DP("ENDCOVERPAGE",0,1,BGPPTYPE)
K BGPX,BGPQUIT
Q
ONH1 ;;
;;Denominator Definitions used in this Report:
;;
;;ACTIVE CLINICAL POPULATION:
;;1. Must reside in a community specified in the community taxonomy used for
;;this report.
;;2. Must be alive on the last day of the Report period.
;;QUIT
;
ONH2 ;;
;;4. Must have 2 visits to medical clinics in the 3 years prior to the end
;;of the Report period. At least one visit must include: 01 General,
;;06 Diabetic, 10 GYN, 12 Immunization, 13 Internal Med, 20 Pediatrics, 24
;;Well Child, 28 Family Practice, 57 EPSDT, 70 Women's Health, 80 Urgent, 89
;;Evening. See User Manual for complete description of medical clinics.
;;
;;USER POPULATION:
;;1. Definitions 1-3 above.
;;2. Must have been seen at least once in the 3 years prior to the end of
;;the Report period, regardless of the clinic type.
;;
;;See last pages of this report for Performance Summary.
;;QUIT
;;
ONH2C ;;
;;4. Must have 2 CHS visits in the 3 years prior to the end of the Report period.
;;
;;USER POPULATION:
;;1. Definitions 1-3 above.
;;2. Must have been seen at least once in the 3 years prior to the end of
;;the Report period, regardless of the clinic type.
;;
;;See last pages of this report for Performance Summary.
;;QUIT
ONHC1 ;;
;;Denominator Definitions used in this Report:
;;
;;ACTIVE CLINICAL CHS POPULATION:
;;1. Must reside in a community specified in the community taxonomy used for
;;this report.
;;2. Must be alive on the last day of the Report period.
;;QUIT
;
ONH2U ;;
;;4. Must have 2 visits to behavioral health or case management clinics in
;;the 3 years prior to the end of the Report period.
;;
;;USER POPULATION:
;;1. Definitions 1-3 above.
;;2. Must have been seen at least once in the 3 years prior to the end of
;;the Report period, regardless of the clinic type.
;;
;;See last pages of this report for Performance Summary.
;;QUIT
ONHU1 ;;
;;Denominator Definitions used in this Report:
;;
;;ACTIVE BEHAVIORAL HEALTH URBAN OUTREACH & REFERRAL POPULATION:
;;1. Must reside in a community specified in the community taxonomy used for
;;this report.
;;2. Must be alive on the last day of the Report period.
;;QUIT
;
BGP3DH1 ; IHS/CMI/LAB - cover page for gpra 28 Apr 2010 11:30 AM 02 Jul 2010 8:28 AM ;
+1 ;;13.0;IHS CLINICAL REPORTING;;NOV 20, 2012;Build 81
+2 ;
+3 ;
ONMHDR ;EP
+1 DO W^BGP3DP("",0,1,BGPPTYPE)
+2 IF $GET(BGPCHSO)
GOTO ONMHDRC
+3 IF $GET(BGPURBAN)
GOTO ONMHDRU
+4 SET BGPTEXT="ONH1"
FOR BGPJ1=1:1
SET BGPX=$TEXT(@BGPTEXT+BGPJ1)
IF $PIECE(BGPX,";;",2)="QUIT"
QUIT
Begin DoDot:1
+5 SET BGPT=$PIECE(BGPX,";;",2)
+6 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+7 DO W^BGP3DP(BGPT,0,1,BGPPTYPE)
End DoDot:1
+8 IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+9 IF BGPRTC="U"
Begin DoDot:1
+10 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+11 DO W^BGP3DP("3. User defines population: a) Indian/Alaska Natives Only - based on",0,1,BGPPTYPE)
+12 DO W^BGP3DP("Classification of 01; b) Non AI/AN (not 01); or c) Both.",0,1,BGPPTYPE)
End DoDot:1
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+13 IF BGPRTC="H"
Begin DoDot:1
+14 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
Begin DoDot:2
End DoDot:2
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+15 DO W^BGP3DP("3. Indian/Alaska Natives Only - based on Classification of 01.",0,1,BGPPTYPE)
End DoDot:1
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+16 IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+17 SET BGPTEXT="ONH2"
FOR BGPJ1=1:1
SET BGPX=$TEXT(@BGPTEXT+BGPJ1)
IF $PIECE(BGPX,";;",2)="QUIT"
QUIT
Begin DoDot:1
+18 SET BGPT=$PIECE(BGPX,";;",2)
+19 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+20 DO W^BGP3DP(BGPT,0,1,BGPPTYPE)
End DoDot:1
+21 DO W^BGP3DP("",0,1,BGPPTYPE)
+22 QUIT
ONMHDRC ;
+1 SET BGPTEXT="ONHC1"
FOR BGPJ1=1:1
SET BGPX=$TEXT(@BGPTEXT+BGPJ1)
IF $PIECE(BGPX,";;",2)="QUIT"
QUIT
Begin DoDot:1
+2 SET BGPT=$PIECE(BGPX,";;",2)
+3 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
IF BGPPTYPE="P"
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+4 DO W^BGP3DP(BGPT,0,1,BGPPTYPE)
End DoDot:1
+5 IF BGPPTYPE="P"
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+6 IF BGPRTC="U"
Begin DoDot:1
+7 IF BGPPTYPE="P"
IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+8 DO W^BGP3DP("3. User defines population: a) Indian/Alaska Natives Only - based on",0,1,BGPPTYPE)
+9 DO W^BGP3DP("Classification of 01; b) Non AI/AN (not 01); or c) Both.",0,1,BGPPTYPE)
End DoDot:1
IF BGPPTYPE="P"
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+10 IF BGPRTC="H"
Begin DoDot:1
+11 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
Begin DoDot:2
End DoDot:2
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+12 DO W^BGP3DP("3. Indian/Alaska Natives Only - based on Classification of 01.",0,1,BGPPTYPE)
End DoDot:1
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+13 IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+14 SET BGPTEXT="ONH2C"
FOR BGPJ1=1:1
SET BGPX=$TEXT(@BGPTEXT+BGPJ1)
IF $PIECE(BGPX,";;",2)="QUIT"
QUIT
Begin DoDot:1
+15 SET BGPT=$PIECE(BGPX,";;",2)
+16 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+17 DO W^BGP3DP(BGPT,0,1,BGPPTYPE)
End DoDot:1
+18 DO W^BGP3DP("",0,1,BGPPTYPE)
+19 QUIT
ONMHDRU ;
+1 SET BGPTEXT="ONHU1"
FOR BGPJ1=1:1
SET BGPX=$TEXT(@BGPTEXT+BGPJ1)
IF $PIECE(BGPX,";;",2)="QUIT"
QUIT
Begin DoDot:1
+2 SET BGPT=$PIECE(BGPX,";;",2)
+3 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
IF BGPPTYPE="P"
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+4 DO W^BGP3DP(BGPT,0,1,BGPPTYPE)
End DoDot:1
+5 IF BGPPTYPE="P"
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+6 IF BGPRTC="U"
Begin DoDot:1
+7 IF BGPPTYPE="P"
IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+8 DO W^BGP3DP("3. User defines population: a) Indian/Alaska Natives Only - based on",0,1,BGPPTYPE)
+9 DO W^BGP3DP("Classification of 01; b) Non AI/AN (not 01); or c) Both.",0,1,BGPPTYPE)
End DoDot:1
IF BGPPTYPE="P"
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+10 IF BGPRTC="H"
Begin DoDot:1
+11 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
Begin DoDot:2
End DoDot:2
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+12 DO W^BGP3DP("3. Indian/Alaska Natives Only - based on Classification of 01.",0,1,BGPPTYPE)
End DoDot:1
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+13 IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+14 SET BGPTEXT="ONH2U"
FOR BGPJ1=1:1
SET BGPX=$TEXT(@BGPTEXT+BGPJ1)
IF $PIECE(BGPX,";;",2)="QUIT"
QUIT
Begin DoDot:1
+15 SET BGPT=$PIECE(BGPX,";;",2)
+16 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+17 DO W^BGP3DP(BGPT,0,1,BGPPTYPE)
End DoDot:1
+18 DO W^BGP3DP("",0,1,BGPPTYPE)
+19 QUIT
PEHDR ;EP
+1 DO W^BGP3DP("",0,1,BGPPTYPE)
+2 ;Q:$G(BGPSEAT)
+3 SET BGPNODEP=$SELECT($GET(BGPSEAT):75,1:34)
+4 SET BGPX=$ORDER(^BGPCTRL("B",2013,0))
+5 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,BGPNODEP,BGPY))
IF BGPY'=+BGPY!(BGPQHDR)
QUIT
Begin DoDot:1
+6 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+7 DO W^BGP3DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
+8 QUIT
End DoDot:1
+9 DO W^BGP3DP("",0,1,BGPPTYPE)
+10 QUIT
AHDR ;EP
+1 ;
+2 IF BGPPTYPE'="P"
GOTO AHDR10
+3 IF BGPPTYPE="P"
IF 'BGPHPG
GOTO AHDR1
+4 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
DO W^BGP3DP("",0,1,BGPPTYPE)
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET BGPQHDR=1
QUIT
AHDR1 ;
+1 SET BGPHPG=BGPHPG+1
IF BGPHPG'=1
IF $DATA(IOF)
WRITE @IOF
+2 ;GUI
IF $GET(BGPGUI)
IF BGPPTYPE="P"
IF BGPHPG'=1
DO W^BGP3DP("ZZZZZZZ",0,0,BGPPTYPE)
DO W^BGP3DP("",0,1,BGPPTYPE)
AHDR10 DO W^BGP3DP("Cover Page "_$SELECT(BGPPTYPE="P":BGPHPG,1:""),1,1,BGPPTYPE)
+1 IF $GET(BGPDASH)
DO W^BGP3DP("*** IHS 2013 National GPRA Dashboard ***",1,2,BGPPTYPE)
GOTO N
+2 IF BGPRTYPE=1
IF $GET(BGPNGR09)
DO W^BGP3DP("*** IHS 2014 National GPRA/GPRAMA Report, Run Using 2013 Logic ***",1,2,BGPPTYPE)
GOTO N
+3 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF '$GET(BGPSUMON)
DO W^BGP3DP("*** IHS 2013 National GPRA/GPRAMA Report ***",1,2,BGPPTYPE)
+4 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF $GET(BGPSUMON)
DO W^BGP3DP("*** IHS 2013 National GPRA/GPRAMA Report Clinical Performance Summaries ***",1,2,BGPPTYPE)
+5 IF BGPRTYPE=6
DO W^BGP3DP("*** IHS 2013 Patient Education Report with Community Specified ***",1,2,BGPPTYPE)
+6 IF BGPRTYPE=1
IF $GET(BGPYGPU)
DO W^BGP3DP("*** IHS 2013 GPRA/GPRAMA Performance Report ***",1,2,BGPPTYPE)
+7 IF BGPRTYPE=7
DO W^BGP3DP("*** IHS 2013 Other National Measures Report ***",1,2,BGPPTYPE)
N DO W^BGP3DP("AREA AGGREGATE",1,1,BGPPTYPE)
+1 DO W^BGP3DP($$RPTVER^BGP3BAN,1,1,BGPPTYPE)
+2 SET X="Date Report Run: "_$$FMTE^XLFDT(DT)
DO W^BGP3DP(X,1,1,BGPPTYPE)
+3 SET X="Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04)
DO W^BGP3DP(X,1,1,BGPPTYPE)
+4 DO W^BGP3DP("Report Generated by: "_$$USR^BGP3DH,1,1,BGPPTYPE)
+5 SET X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
DO W^BGP3DP(X,1,1,BGPPTYPE)
+6 SET X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED)
DO W^BGP3DP(X,1,1,BGPPTYPE)
+7 IF '$GET(BGPDASH)
SET X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED)
DO W^BGP3DP(X,1,1,BGPPTYPE)
+8 DO W^BGP3DP("",0,1,BGPPTYPE)
+9 QUIT
COMHDR ;EP
+1 DO W^BGP3DP("",0,1,BGPPTYPE)
+2 IF $GET(BGPSEAT)
QUIT
+3 SET BGPNODEP=$SELECT($GET(BGPCHSO):24,1:17)
+4 SET BGPNODEP=$SELECT(BGPURBAN:48,1:BGPNODEP)
+5 SET BGPX=$ORDER(^BGPCTRL("B",2013,0))
+6 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,BGPNODEP,BGPY))
IF BGPY'=+BGPY!(BGPQHDR)
QUIT
Begin DoDot:1
+7 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+8 DO W^BGP3DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
+9 QUIT
End DoDot:1
+10 IF $GET(BGPYGPU)
DO W^BGP3DP("See last pages of this report for Performance Summaries.",0,2,BGPPTYPE)
+11 DO W^BGP3DP("",0,1,BGPPTYPE)
+12 QUIT
GPRAHDRS ;EP
+1 DO W^BGP3DP("",0,1,BGPPTYPE)
+2 SET BGPNODEP=$SELECT($GET(BGPCHSO):77,1:76)
+3 SET BGPNODEP=$SELECT($GET(BGPURBAN):47,1:BGPNODEP)
+4 SET BGPX=$ORDER(^BGPCTRL("B",2013,0))
+5 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,BGPNODEP,BGPY))
IF BGPY'=+BGPY!(BGPQHDR)
QUIT
Begin DoDot:1
+6 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+7 DO W^BGP3DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
+8 QUIT
End DoDot:1
+9 DO W^BGP3DP("",0,1,BGPPTYPE)
+10 QUIT
PPHDR ;EP
+1 DO W^BGP3DP("",0,1,BGPPTYPE)
+2 SET BGPX=$ORDER(^BGPCTRL("B",2013,0))
+3 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,18,BGPY))
IF BGPY'=+BGPY!(BGPQHDR)
QUIT
Begin DoDot:1
+4 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+5 DO W^BGP3DP(^BGPCTRL(BGPX,18,BGPY,0),0,1,BGPPTYPE)
+6 QUIT
End DoDot:1
+7 DO W^BGP3DP("",0,1,BGPPTYPE)
+8 QUIT
GPUPPHDR ;EP
+1 DO W^BGP3DP("",0,1,BGPPTYPE)
+2 SET BGPX=$ORDER(^BGPCTRL("B",2013,0))
+3 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,83,BGPY))
IF BGPY'=+BGPY!(BGPQHDR)
QUIT
Begin DoDot:1
+4 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+5 DO W^BGP3DP(^BGPCTRL(BGPX,83,BGPY,0),0,1,BGPPTYPE)
+6 QUIT
End DoDot:1
+7 DO W^BGP3DP("",0,1,BGPPTYPE)
+8 QUIT
ALLHDR ;EP
+1 DO W^BGP3DP("",0,1,BGPPTYPE)
+2 IF $GET(BGPSEAT)
QUIT
+3 SET BGPNODEP=$SELECT(BGPCHSO:25,1:19)
+4 SET BGPNODEP=$SELECT($GET(BGPURBAN):49,1:BGPNODEP)
+5 SET BGPX=$ORDER(^BGPCTRL("B",2013,0))
+6 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,BGPNODEP,BGPY))
IF BGPY'=+BGPY!(BGPQHDR)
QUIT
Begin DoDot:1
+7 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-2)
DO HDR^BGP3DH
IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+8 DO W^BGP3DP(^BGPCTRL(BGPX,BGPNODEP,BGPY,0),0,1,BGPPTYPE)
+9 QUIT
End DoDot:1
+10 DO W^BGP3DP("",0,1,BGPPTYPE)
+11 QUIT
AREACP ;EP
+1 SET BGPQHDR=0
SET BGPHPG=0
+2 DO AHDR
+3 IF BGPPTYPE="P"
IF BGPQHDR
QUIT
+4 DO MD^BGP3DH
+5 DO PD^BGP3DH
+6 DO ENDTIME^BGP3DH
+7 IF BGPRTYPE=6
DO PEDCP^BGP3DH
QUIT
+8 SET BGPCHSO=""
SET X=0
FOR
SET X=$ORDER(BGPSUL(X))
IF X'=+X
QUIT
IF $PIECE(^BGPGPDCH(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(^BGPGPDCH(X,0),U,17)
SET BGPCHSN=1
+10 SET BGPURBO=""
SET X=0
FOR
SET X=$ORDER(BGPSUL(X))
IF X'=+X
QUIT
IF $PIECE(^BGPGPDCH(X,0),U,19)
SET BGPURBO=1
+11 SET BGPURBN=""
SET X=0
FOR
SET X=$ORDER(BGPSUL(X))
IF X'=+X
QUIT
IF '$PIECE(^BGPGPDCH(X,0),U,19)
SET BGPURBN=1
+12 IF $GET(BGPDASH)
DO DASHHDRA^BGP3DH2
GOTO N1
+13 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF '$GET(BGPSUMON)
DO GPRAHDRA^BGP3DH2
+14 IF BGPRTYPE=1
IF $GET(BGPYGPU)
DO GPRAHDRA^BGP3DH2
+15 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF $GET(BGPSUMON)
DO GPRAHDRS
+16 IF BGPRTYPE=7
DO ONMHDRA^BGP3DH2
N1 IF $GET(BGPEXCEL)
IF '$GET(BGPYGPU)
IF BGPRTYPE=1
Begin DoDot:1
+1 DO W^BGP3DP("GPRA Developmental filenames: ",0,2,BGPPTYPE)
DO W^BGP3DP(BGPFDEV1,0,1,BGPPTYPE,1,15)
DO W^BGP3DP(BGPFDEV2,0,1,BGPPTYPE,1,15)
DO W^BGP3DP(BGPFDEV3,0,1,BGPPTYPE,1,15)
+2 DO W^BGP3DP("National GPRA filenames: ",0,2,BGPPTYPE)
DO W^BGP3DP(BGPFGNT1,0,1,BGPPTYPE,1,15)
DO W^BGP3DP(BGPFGNT2,0,1,BGPPTYPE,1,15)
DO W^BGP3DP(BGPFGNT3,0,1,BGPPTYPE,1,15)
End DoDot:1
+3 IF $GET(BGPEXCEL)
IF BGPRTYPE=7
DO W^BGP3DP("Other National Measures filenames: ",0,1,BGPPTYPE)
DO W^BGP3DP(BGPFONN1,0,1,BGPPTYPE,1,15)
DO W^BGP3DP(BGPFONN2,0,1,BGPPTYPE,1,15)
DO W^BGP3DP(BGPFONN3,0,1,BGPPTYPE,1,15)
DO W^BGP3DP(BGPFONN4,0,1,BGPPTYPE,1,15)
Begin DoDot:1
+4 DO W^BGP3DP(BGPFONN5,0,1,BGPPTYPE,1,15)
End DoDot:1
+5 IF BGPROT'="P"
IF '$DATA(BGPGUI)
IF BGPDELT="F"
DO W^BGP3DP("A delimited output file called "_BGPDELF,0,2,BGPPTYPE)
Begin DoDot:1
+6 DO W^BGP3DP("has been placed in the "_$$GETDEDIR^BGP3UTL2()_" directory for your use in Excel or some",0,1,BGPPTYPE)
+7 DO W^BGP3DP("other software package.",0,1,BGPPTYPE)
+8 DO W^BGP3DP("See your site manager to access this file.",0,1,BGPPTYPE)
+9 DO W^BGP3DP("",0,1,BGPPTYPE)
End DoDot:1
+10 ;I BGPROT'="P",'$D(BGPGUI) W !!,"A delimited output file called ",BGPDELF,!,"has been placed in the "_$$GETDEDIR^BGP3UTL2()_" directory for your use in Excel or some",!,"other software package. See your site manager to access this file.",!
+11 ;W !!?1,"Report includes data from the following facilities:"
+12 DO W^BGP3DP("Report includes data from the following facilities: ",0,2,BGPPTYPE)
+13 NEW BGPX
+14 SET BGPX=""
SET BGPC=0
FOR
SET BGPX=$ORDER(BGPSUL(BGPX))
IF BGPX=""
QUIT
Begin DoDot:1
+15 SET X=$PIECE(^BGPGPDCH(BGPX,0),U,9)
SET X=$ORDER(^AUTTLOC("C",X,0))
SET X=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
+16 SET BGPC=BGPC+1
SET X=BGPC_". "_$SELECT($PIECE(^BGPGPDCH(BGPX,0),U,17):"*",$PIECE(^BGPGPDCH(BGPX,0),U,19):"**",1:"")_X
DO W^BGP3DP(X,0,1,BGPPTYPE,1,3)
+17 QUIT
End DoDot:1
+18 SET X=" "
DO W^BGP3DP(X,0,1,BGPPTYPE)
+19 SET X="The following communities are included in this report:"
DO W^BGP3DP(X,0,1,BGPPTYPE,1,1)
+20 SET BGPX=""
SET BGPC=0
FOR
SET BGPX=$ORDER(BGPSUL(BGPX))
IF BGPX=""
QUIT
Begin DoDot:1
+21 SET X=$PIECE(^BGPGPDCH(BGPX,0),U,9)
SET X=$ORDER(^AUTTLOC("C",X,0))
SET X=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
+22 SET BGPC=BGPC+1
SET X=BGPC_". "_$SELECT($PIECE(^BGPGPDCH(BGPX,0),U,17):"*",1:"")_X
DO W^BGP3DP(X,0,1,BGPPTYPE,1,3)
+23 ;S X="Communities: " D W^BGP3DP(X,0,1,BGPPTYPE,1,5)
+24 SET X="Community Taxonomy Name: "_$PIECE(^BGPGPDCH(BGPX,0),U,18)
DO W^BGP3DP(X,0,1,BGPPTYPE,1,5)
+25 SET BGPXX=0
SET BGPXN=0
SET BGPXY=""
FOR
SET BGPXX=$ORDER(^BGPGPDCH(BGPX,9999,BGPXX))
IF BGPXX'=+BGPXX
QUIT
SET BGPXN=BGPXN+1
SET BGPXY=BGPXY_$SELECT(BGPXN=1:"",1:";")_$PIECE(^BGPGPDCH(BGPX,9999,BGPXX,0),U)
+26 SET BGPX1=0
SET C=0
FOR BGPX1=1:3:BGPXN
Begin DoDot:2
+27 DO W^BGP3DP($EXTRACT($PIECE(BGPXY,";",BGPX1),1,20),0,1,BGPPTYPE,1,10)
+28 DO W^BGP3DP($EXTRACT($PIECE(BGPXY,";",(BGPX1+1)),1,20),0,0,BGPPTYPE,2,30)
+29 DO W^BGP3DP($EXTRACT($PIECE(BGPXY,";",(BGPX1+2)),1,20),0,0,BGPPTYPE,3,60)
+30 QUIT
End DoDot:2
+31 IF $ORDER(^BGPGPDCH(BGPX,1111,0))
Begin DoDot:2
+32 DO W^BGP3DP("MFI Visit Locations: ",0,2,BGPPTYPE,1,5)
SET BGPXX=0
SET BGPXN=0
SET BGPXY=""
FOR
SET BGPXX=$ORDER(^BGPGPDCH(BGPX,1111,BGPXX))
IF BGPXX'=+BGPXX
QUIT
SET BGPXN=BGPXN+1
SET BGPXY=BGPXY_$SELECT(BGPXN=1:"",1:";")_$PIECE(^BGPGPDCH(BGPX,1111,BGPXX,0),U)
+33 SET BGPX1=0
SET C=0
FOR BGPX1=1:3:BGPXN
Begin DoDot:3
+34 DO W^BGP3DP($EXTRACT($PIECE(BGPXY,";",BGPX1),1,20),0,1,BGPPTYPE,1,10)
+35 DO W^BGP3DP($EXTRACT($PIECE(BGPXY,";",(BGPX1+1)),1,20),0,0,BGPPTYPE,2,30)
+36 DO W^BGP3DP($EXTRACT($PIECE(BGPXY,";",(BGPX1+2)),1,20),0,0,BGPPTYPE,3,60)
End DoDot:3
+37 QUIT
End DoDot:2
+38 QUIT
End DoDot:1
+39 DO W^BGP3DP(" ",0,1,BGPPTYPE)
+40 IF BGPCHSO
Begin DoDot:1
+41 ;S X=" " D W^BGP3DP(X,0,1,BGPPTYPE)
+42 SET X="* CHS-only site. Uses Active Clinical CHS Population definition vs. Active Clinical."
DO W^BGP3DP(X,0,1,BGPPTYPE)
End DoDot:1
+43 IF BGPURBO
Begin DoDot:1
+44 ;S X=" " D W^BGP3DP(X,0,1,BGPPTYPE)
+45 SET X="**Urban Outreach & Referral-only site. Uses Active Clinical Behavioral Health"
DO W^BGP3DP(X,0,1,BGPPTYPE)
SET X="Population definition vs. Active Clinical."
DO W^BGP3DP(X,0,1,BGPPTYPE)
End DoDot:1
+46 SET X=" "
DO W^BGP3DP(X,0,1,BGPPTYPE)
+47 IF BGPPTYPE="D"
DO W^BGP3DP("ENDCOVERPAGE",0,1,BGPPTYPE)
+48 KILL BGPX,BGPQUIT
+49 QUIT
ONH1 ;;
+1 ;;Denominator Definitions used in this Report:
+2 ;;
+3 ;;ACTIVE CLINICAL POPULATION:
+4 ;;1. Must reside in a community specified in the community taxonomy used for
+5 ;;this report.
+6 ;;2. Must be alive on the last day of the Report period.
+7 ;;QUIT
+8 ;
ONH2 ;;
+1 ;;4. Must have 2 visits to medical clinics in the 3 years prior to the end
+2 ;;of the Report period. At least one visit must include: 01 General,
+3 ;;06 Diabetic, 10 GYN, 12 Immunization, 13 Internal Med, 20 Pediatrics, 24
+4 ;;Well Child, 28 Family Practice, 57 EPSDT, 70 Women's Health, 80 Urgent, 89
+5 ;;Evening. See User Manual for complete description of medical clinics.
+6 ;;
+7 ;;USER POPULATION:
+8 ;;1. Definitions 1-3 above.
+9 ;;2. Must have been seen at least once in the 3 years prior to the end of
+10 ;;the Report period, regardless of the clinic type.
+11 ;;
+12 ;;See last pages of this report for Performance Summary.
+13 ;;QUIT
+14 ;;
ONH2C ;;
+1 ;;4. Must have 2 CHS visits in the 3 years prior to the end of the Report period.
+2 ;;
+3 ;;USER POPULATION:
+4 ;;1. Definitions 1-3 above.
+5 ;;2. Must have been seen at least once in the 3 years prior to the end of
+6 ;;the Report period, regardless of the clinic type.
+7 ;;
+8 ;;See last pages of this report for Performance Summary.
+9 ;;QUIT
ONHC1 ;;
+1 ;;Denominator Definitions used in this Report:
+2 ;;
+3 ;;ACTIVE CLINICAL CHS POPULATION:
+4 ;;1. Must reside in a community specified in the community taxonomy used for
+5 ;;this report.
+6 ;;2. Must be alive on the last day of the Report period.
+7 ;;QUIT
+8 ;
ONH2U ;;
+1 ;;4. Must have 2 visits to behavioral health or case management clinics in
+2 ;;the 3 years prior to the end of the Report period.
+3 ;;
+4 ;;USER POPULATION:
+5 ;;1. Definitions 1-3 above.
+6 ;;2. Must have been seen at least once in the 3 years prior to the end of
+7 ;;the Report period, regardless of the clinic type.
+8 ;;
+9 ;;See last pages of this report for Performance Summary.
+10 ;;QUIT
ONHU1 ;;
+1 ;;Denominator Definitions used in this Report:
+2 ;;
+3 ;;ACTIVE BEHAVIORAL HEALTH URBAN OUTREACH & REFERRAL POPULATION:
+4 ;;1. Must reside in a community specified in the community taxonomy used for
+5 ;;this report.
+6 ;;2. Must be alive on the last day of the Report period.
+7 ;;QUIT
+8 ;