BGP6PDLH ; IHS/CMI/LAB - cover page ;
;;16.1;IHS CLINICAL REPORTING;;MAR 22, 2016;Build 170
;
S X="" D SET(X,1,1)
S X="Cover Page" D SET(X,1,1)
S X=" " D SET(X,1,1)
I $G(BGPAREAA) G AREACP
I BGPRTYPE=4,$G(BGPYRPTH)="C" S X="*** IHS 2016 Selected Measures with Community Specified Report ***" D SET(X,1,1)
I BGPRTYPE=4,$G(BGPYRPTH)="A" S X="*** IHS 2016 Selected Measures with All Communities Report ***" D SET(X,1,1)
I BGPRTYPE=4,$G(BGPYRPTH)="P" S X="*** IHS 2016 Selected Measures with Patient Panel Population Report ***" D SET(X,1,1)
I BGPRTYPE=1,$G(BGPNGR09) S X="*** IHS 2016 National GPRA/GPRAMA Report, Run Using 2016 Logic ***" D SET(X,1,1) G N
I BGPRTYPE=1,$G(BGPDESGP) S X="*** IHS 2016 National GPRA/GPRAMA Report by Designated Provider ***" D SET(X,1,1) G N
I BGPRTYPE=1,'$G(BGPYGPU),'$G(BGPSUMON) S X="*** IHS 2016 National GPRA/GPRAMA Report ***" D SET(X,1,1)
I BGPRTYPE=1,'$G(BGPYGPU),$G(BGPSUMON) S X="*** IHS 2016 National GPRA/GPRAMA Report Clinical Performance Summaries ***" D SET(X,1,1)
I BGPRTYPE=1,$G(BGPYGPU) S X="*** IHS 2016 GPRA/GPRAMA Report ***" D SET(X,1,1)
I BGPRTYPE=7 S X="*** IHS 2016 Other National Measures Report ***" D SET(X,1,1)
I BGPRTYPE=6,'$G(BGPEDPP) S X="*** IHS 2016 Patient Education with Community Specified Report ***" D SET(X,1,1)
I BGPRTYPE=6,$G(BGPEDPP) S X="*** IHS 2016 Patient Education with Patient Panel Population Report ***" D SET(X,1,1)
N ;
I $G(BGPCPPL) S X="** Including Comprehensive Patient List **" D SET(X,1,1)
S X=$$RPTVER^BGP6BAN D SET(X,1,1)
S X="Date Report Run: "_$$FMTE^XLFDT(DT) D SET(X,1,1)
S X="Site where Run: "_$P(^DIC(4,DUZ(2),0),U) D SET(X,1,1)
S X="Report Generated by: "_$$USR D SET(X,1,1)
S X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) D SET(X,1,1)
S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) D SET(X,1,1)
S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) D SET(X,1,1)
S X=" " D SET(X,1,1)
I BGPRTYPE=6 S X="Measures: Patient Education Performance Measures" D SET(X,1,1)
I BGPRTYPE=4 S X="Measures: "_$P($T(@BGPINDM),";;",2) D SET(X,1,1)
I BGPRTYPE=1 S X="Measures: GPRA Developmental, GPRA and PART Denominators and Numerators and " D SET(X,1,1) S X="Selected Other Clinical Denominators and Numerators" D SET(X,1,1)
I BGPRTYPE=7 S X="Measures: Key Clinical Denominators and Numerators for Non-GPRA National Reporting" D SET(X,1,1)
I '$G(BGPSEAT) S X="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 SET(X,1,1)
S X=" " D SET(X,1,1)
I $G(BGPSEAT) S X="Patient Panel Population: "_$P(^DIBT(BGPSEAT,0),U) D SET(X,1,1)
S X=" " D SET(X,1,1)
I $G(BGPDESGP) S X="Designated Provider: "_$P(^VA(200,BGPDESGP,0),U) D SET(X,1,1),SET(" ",1,1)
D ENDTIME
I BGPRTYPE=4,BGPYRPTH="C" D COMHDR
I BGPRTYPE=4,BGPYRPTH="P" D PPHDR
I BGPRTYPE=4,BGPYRPTH="A" D ALLHDR
I BGPRTYPE=1,'$G(BGPYGPU),'$G(BGPSUMON) D GPRAHDR
I BGPRTYPE=1,'$G(BGPYGPU),$G(BGPSUMON) D GPRAHDRS
I BGPRTYPE=1,$G(BGPYGPU) D COMHDR
I BGPRTYPE=7 D ONMHDR
I BGPRTYPE=6 D PEHDR
I $G(BGPEXPT),BGPRTYPE=1 D
.S X="A file will be created called BG161"_$P(^AUTTLOC(DUZ(2),0),U,10)_"."_BGPRPT_"." D SET(X,1,1)
.S X="It will reside in the public/export directory." D SET(X,1,1)
.S X="This file should be sent to your Area Office." D SET(X,1,1)
S X=" " D SET(X,1,1)
I $G(BGPEXPT),BGPRTYPE=7 D
.S X="A file will be created called BG161"_$P(^AUTTLOC(DUZ(2),0),U,10)_".ONM"_BGPRPT_"." D SET(X,1,1)
.S X="It will reside in the public/export directory." D SET(X,1,1)
.S X="This file should be sent to your Area Office." D SET(X,1,1)
I BGPRTYPE=6,$G(BGPPEEXP) D
.S X="A file will be created called BG161"_$P(^AUTTLOC(DUZ(2),0),U,10)_".PED"_BGPRPT_"." D SET(X,1,1)
.S X="This file will reside in the public/export directory." D SET(X,1,1)
.S X="This file should be sent to your Area Office." D SET(X,1,1)
.S X=" " D SET(X,1,1)
I BGPROT'="P" D
.Q:$D(BGPGUI)
.S X="A delimited output file called "_BGPDELF D SET(X,1,1) S X="has been placed in the "_$$GETDEDIR^BGP6UTL2()_" directory for your use in Excel or some" D SET(X,1,1) S X="other software package." D SET(X,1,1)
.S X="See your site manager to access this file." D SET(X,1,1)
S X=" " D SET(X,1,1)
I BGPYRPTH="P" K BGPX,BGPQUIT Q
I $G(BGPALLPT) S X="All Communities Included." D SET(X,1,1)
I '$G(BGPALLPT),'$G(BGPSEAT) S X="Community Taxonomy Name: "_$P(^ATXAX(BGPTAXI,0),U) D SET(X,1,1)
I '$G(BGPALLPT),'$G(BGPSEAT) S X="The following communities are included in this report:" D SET(X,1,1) 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
..S X=$E($P(Y,";",BGPZZ),1,20),$P(X,U,2)=$E($P(Y,";",(BGPZZ+1)),1,20),$P(X,U,3)=$E($P(Y,";",(BGPZZ+2)),1,20) D SET(X,1,1)
..S X=$E($G(BGPTAX(BGPZZ)),1,20),$P(X,U,2)=$E($G(BGPTAX(BGPZZ+1)),1,20),$P(X,U,4)=$E($G(BGPTAX(BGPZZ+2)),1,20) D SET(X,1,1)
..Q
S X=" " D SET(X,1,1)
S X=" " D SET(X,1,1)
K BGPX,BGPQUIT
S X=" " D SET(X,1,1)
I BGPRTYPE'=6 D SET("ENDCOVERPAGE",1,1)
Q
PEHDR ;EP
D PEHDR^BGP6PDH1
Q
COMHDR ;
D COMHDR^BGP6PDH1
Q
ONMHDR ;
S X=" " D SET(X,1,1)
S BGPTEXT="ONH1" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.D SET(BGPT,1,1)
I BGPRTC="U" D
.D SET("3. User defines population: a) Indian/Alaska Natives Only - based on",1,1)
.D SET("Classification of 01; b) Non AI/AN (not 01); or c) Both.",1,1)
I BGPRTC="H" D
.D SET("3. Indian/Alaska Natives Only - based on Classification of 01.",1,1)
S BGPTEXT="ONH2" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.D SET(BGPT,1,1)
D SET(" ",1,1)
Q
ONMHDRC ;
S BGPTEXT="ONH1" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.D SET(BGPT,1,1)
I BGPRTC="U" D
.D SET("3. User defines population: a) Indian/Alaska Natives Only - based on",1,1)
.D SET("Classification of 01; b) Non AI/AN (not 01); or c) Both.",1,1)
I BGPRTC="H" D
.D SET("3. Indian/Alaska Natives Only - based on Classification of 01.",1,1)
S BGPTEXT="ONH2C" F BGPJ1=1:1 S BGPX=$T(@BGPTEXT+BGPJ1) Q:$P(BGPX,";;",2)="QUIT" D
.S BGPT=$P(BGPX,";;",2)
.D SET(BGPT,1,1)
D SET(" ",1,1)
Q
PPHDR ;
D PPHDR^BGP6PDH1
Q
ALLHDR ;
D ALLHDR^BGP6PDH1
Q
GPRAHDRS ;
D GPRAHDRS^BGP6PDH1
Q
DENOMHDR ;
D DENOMHDR^BGP6PDH1
Q
AREAHDR ;
S X=" " D SET(X,1,1)
S BGPX=$O(^BGPCTRL("B",2016,0))
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,15,BGPY)) Q:BGPY'=+BGPY D
.S X=^BGPCTRL(BGPX,15,BGPY,0) D SET(X,1,1)
.Q
Q
GPRAHDR ;
S X=" " D SET(X,1,1)
S BGPNODEP=14
S BGPX=$O(^BGPCTRL("B",2016,0))
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY D
.S X=^BGPCTRL(BGPX,BGPNODEP,BGPY,0) D SET(X,1,1)
.Q
Q
GPRAHDRA ;
S X=" " D SET(X,1,1)
S BGPX=$O(^BGPCTRL("B",2016,0))
S BGPNODEP=14
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY D
.S X=^BGPCTRL(BGPX,BGPNODEP,BGPY,0) D SET(X,1,1)
.Q
Q
COMHDRA ;
S X=" " D SET(X,1,1)
S BGPX=$O(^BGPCTRL("B",2016,0))
S BGPNODEP=17
S BGPY=0 F S BGPY=$O(^BGPCTRL(BGPX,BGPNODEP,BGPY)) Q:BGPY'=+BGPY D
.S X=^BGPCTRL(BGPX,BGPNODEP,BGPY,0) D SET(X,1,1)
.Q
I $G(BGPYGPU) D SET("See last pages of this report for Performance Summaries.",1,1) D SET(" ",1,1)
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 S X="RUN TIME (H.M.S): "_BGPHR_"."_BGPM_"."_BGPS D SET(X,1,1)
Q
AREACP ;EP
I BGPRTYPE=6 S X="*** IHS 2016 Patient Education with Community Specified Report***" D SET(X,1,1)
I BGPRTYPE=1,$G(BGPNGR09) S X="*** IHS 2016 National GPRA/GPRAMA Report, Run Using 2016 Logic ***" D SET(X,1,1) G NA
I BGPRTYPE=1,'$G(BGPYGPU),'$G(BGPSUMON) S X="*** IHS 2016 National GPRA/GPRAMA Report ***" D SET(X,1,1)
I BGPRTYPE=1,'$G(BGPYGPU),$G(BGPSUMON) S X="*** IHS 2016 National GPRA/GPRAMA Report Clinical Performance Summaries ***" D SET(X,1,1)
I BGPRTYPE=1,$G(BGPYGPU) S X="*** IHS 2016 GPRA/GPRAMA Performance Report ***" D SET(X,1,1)
I BGPRTYPE=7 D SET("*** IHS 2016 Other National Measures Report ***",1,1)
NA S X="AREA AGGREGATE" D SET(X,1,1)
S X=$$RPTVER^BGP6BAN D SET(X,1,1)
S X="Date Report Run: "_$$FMTE^XLFDT(DT) D SET(X,1,1)
S X="Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04) D SET(X,1,1)
S X="Report Generated by: "_$$USR D SET(X,1,1)
S X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) D SET(X,1,1)
S X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED) D SET(X,1,1)
S X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED) D SET(X,1,1)
S X=" " D SET(X,1,1)
I BGPRTYPE=6 S X="Measures: Patient Education Performance Measures" D SET(X,1,1)
I BGPRTYPE=1 S X="Measures: GPRA, GPRA Developmental, and PART Denominators and Numerators and " D SET(X,1,1) S X="Selected Other Clinical Denominators and Numerators" D SET(X,1,1)
I BGPRTYPE=7 D SET("Measures: Key Clinical Denominators and Numerators for Non-GPRA National Reporting",1,1)
I BGPRTYPE=1!(BGPRTYPE=6)!(BGPRTYPE=7) S X="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 SET(X,1,1)
S X=" " D SET(X,1,1)
D ENDTIME
S X=" " D SET(X,1,1)
I BGPRTYPE=6 D PEDCP Q
I BGPRTYPE=1,'$G(BGPYGPU) D GPRAHDRA
I BGPRTYPE=1,$G(BGPYGPU) D COMHDRA
I BGPRTYPE=7 D ONMHDR
I BGPROT'="P",'$D(BGPGUI) D
.S X="A delimited output file called "_BGPDELF D SET(X,1,1)
.S X="has been placed in the "_$$GETDEDIR^BGP6UTL2()_" directory for your use in Excel or some" D SET(X,1,1) S X="other software package. See your site manager to access this file." D SET(X,1,1)
S X=" " D SET(X,1,1)
I $G(BGPEXCEL),'$G(BGPYGPU),BGPRTYPE=1 D
.S X="National GPRA Filenames: " D SET(X,1,1) S X=BGPFGNT1 D SET(X,1,1) S X=BGPFGNT2 D SET(X,1,1) S X=BGPFGNT3 D SET(X,1,1) S X=BGPFGNT4 D SET(X,1,1) ;S X=BGPFN2 D SET(X,1,1) S X=" " D SET(X,1,1)
I BGPRTYPE=7 D
.S X="Other National Reporting Filenames: "_$G(BGPFONN1) D SET(X,1,1) S X="^"_BGPFONN2 D SET(X,1,1) S X="^"_BGPFONN3 D SET(X,1,1) S X=" " D SET(X,1,1)
S X="Report includes data from the following facilities:" D SET(X,1,1)
NEW BGPX
S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
.S X=$P(^BGPGPDCM(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(^BGPGPDCM(BGPX,0),U,17):"*",1:"")_X D SET(X,1,1)
.Q
S X=" " D SET(X,1,1)
S X="The following communities are included in this report:" D SET(X,1,1)
S BGPX="",BGPC=0 F S BGPX=$O(BGPSUL(BGPX)) Q:BGPX="" D
.S X=$P(^BGPGPDCM(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(^BGPGPDCM(BGPX,0),U,17):"*",1:"")_X D SET(X,1,1)
.S X="Community Taxonomy Name: "_$P(^BGPGPDCM(BGPX,0),U,18) D SET(X,1,1)
.S X=0,N=0,Y="",Z="" F S X=$O(^BGPGPDCM(BGPX,9999,X)) Q:X'=+X S N=N+1,Y=Y_$S(N=1:"",1:";")_$P(^BGPGPDCM(BGPX,9999,X,0),U)
.S X=0,C=0 F X=1:3:N S Z=$E($P(Y,";",X),1,20),$P(Z,U,2)=$E($P(Y,";",(X+1)),1,20),$P(Z,U,3)=$E($P(Y,";",(X+2)),1,20) D SET(Z,1,1)
.S X=" " D SET(X,1,1)
.Q
S X="ENDCOVERPAGE" D SET(X,1,1)
K BGPX,BGPQUIT
Q
PEDCP ;
D PEDCP^BGP6PDH1
Q
SET(Y,F,P) ;
I '$G(F) S F=0
S %=$P(^TMP($J,"BGPDEL",0),U)+F,$P(^TMP($J,"BGPDEL",0),U)=%
I '$D(^TMP($J,"BGPDEL",%)) S ^TMP($J,"BGPDEL",%)=""
S $P(^TMP($J,"BGPDEL",%),U,P)=Y
Q
CTR(X,Y) ;
Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
;----------
USR() ;
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 ;;Asthma Related Measures
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
;
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
;;
BGP6PDLH ; IHS/CMI/LAB - cover page ;
+1 ;;16.1;IHS CLINICAL REPORTING;;MAR 22, 2016;Build 170
+2 ;
+3 SET X=""
DO SET(X,1,1)
+4 SET X="Cover Page"
DO SET(X,1,1)
+5 SET X=" "
DO SET(X,1,1)
+6 IF $GET(BGPAREAA)
GOTO AREACP
+7 IF BGPRTYPE=4
IF $GET(BGPYRPTH)="C"
SET X="*** IHS 2016 Selected Measures with Community Specified Report ***"
DO SET(X,1,1)
+8 IF BGPRTYPE=4
IF $GET(BGPYRPTH)="A"
SET X="*** IHS 2016 Selected Measures with All Communities Report ***"
DO SET(X,1,1)
+9 IF BGPRTYPE=4
IF $GET(BGPYRPTH)="P"
SET X="*** IHS 2016 Selected Measures with Patient Panel Population Report ***"
DO SET(X,1,1)
+10 IF BGPRTYPE=1
IF $GET(BGPNGR09)
SET X="*** IHS 2016 National GPRA/GPRAMA Report, Run Using 2016 Logic ***"
DO SET(X,1,1)
GOTO N
+11 IF BGPRTYPE=1
IF $GET(BGPDESGP)
SET X="*** IHS 2016 National GPRA/GPRAMA Report by Designated Provider ***"
DO SET(X,1,1)
GOTO N
+12 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF '$GET(BGPSUMON)
SET X="*** IHS 2016 National GPRA/GPRAMA Report ***"
DO SET(X,1,1)
+13 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF $GET(BGPSUMON)
SET X="*** IHS 2016 National GPRA/GPRAMA Report Clinical Performance Summaries ***"
DO SET(X,1,1)
+14 IF BGPRTYPE=1
IF $GET(BGPYGPU)
SET X="*** IHS 2016 GPRA/GPRAMA Report ***"
DO SET(X,1,1)
+15 IF BGPRTYPE=7
SET X="*** IHS 2016 Other National Measures Report ***"
DO SET(X,1,1)
+16 IF BGPRTYPE=6
IF '$GET(BGPEDPP)
SET X="*** IHS 2016 Patient Education with Community Specified Report ***"
DO SET(X,1,1)
+17 IF BGPRTYPE=6
IF $GET(BGPEDPP)
SET X="*** IHS 2016 Patient Education with Patient Panel Population Report ***"
DO SET(X,1,1)
N ;
+1 IF $GET(BGPCPPL)
SET X="** Including Comprehensive Patient List **"
DO SET(X,1,1)
+2 SET X=$$RPTVER^BGP6BAN
DO SET(X,1,1)
+3 SET X="Date Report Run: "_$$FMTE^XLFDT(DT)
DO SET(X,1,1)
+4 SET X="Site where Run: "_$PIECE(^DIC(4,DUZ(2),0),U)
DO SET(X,1,1)
+5 SET X="Report Generated by: "_$$USR
DO SET(X,1,1)
+6 SET X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
DO SET(X,1,1)
+7 SET X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED)
DO SET(X,1,1)
+8 SET X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED)
DO SET(X,1,1)
+9 SET X=" "
DO SET(X,1,1)
+10 IF BGPRTYPE=6
SET X="Measures: Patient Education Performance Measures"
DO SET(X,1,1)
+11 IF BGPRTYPE=4
SET X="Measures: "_$PIECE($TEXT(@BGPINDM),";;",2)
DO SET(X,1,1)
+12 IF BGPRTYPE=1
SET X="Measures: GPRA Developmental, GPRA and PART Denominators and Numerators and "
DO SET(X,1,1)
SET X="Selected Other Clinical Denominators and Numerators"
DO SET(X,1,1)
+13 IF BGPRTYPE=7
SET X="Measures: Key Clinical Denominators and Numerators for Non-GPRA National Reporting"
DO SET(X,1,1)
+14 IF '$GET(BGPSEAT)
SET X="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:"")
DO SET(X,1,1)
+15 SET X=" "
DO SET(X,1,1)
+16 IF $GET(BGPSEAT)
SET X="Patient Panel Population: "_$PIECE(^DIBT(BGPSEAT,0),U)
DO SET(X,1,1)
+17 SET X=" "
DO SET(X,1,1)
+18 IF $GET(BGPDESGP)
SET X="Designated Provider: "_$PIECE(^VA(200,BGPDESGP,0),U)
DO SET(X,1,1)
DO SET(" ",1,1)
+19 DO ENDTIME
+20 IF BGPRTYPE=4
IF BGPYRPTH="C"
DO COMHDR
+21 IF BGPRTYPE=4
IF BGPYRPTH="P"
DO PPHDR
+22 IF BGPRTYPE=4
IF BGPYRPTH="A"
DO ALLHDR
+23 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF '$GET(BGPSUMON)
DO GPRAHDR
+24 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF $GET(BGPSUMON)
DO GPRAHDRS
+25 IF BGPRTYPE=1
IF $GET(BGPYGPU)
DO COMHDR
+26 IF BGPRTYPE=7
DO ONMHDR
+27 IF BGPRTYPE=6
DO PEHDR
+28 IF $GET(BGPEXPT)
IF BGPRTYPE=1
Begin DoDot:1
+29 SET X="A file will be created called BG161"_$PIECE(^AUTTLOC(DUZ(2),0),U,10)_"."_BGPRPT_"."
DO SET(X,1,1)
+30 SET X="It will reside in the public/export directory."
DO SET(X,1,1)
+31 SET X="This file should be sent to your Area Office."
DO SET(X,1,1)
End DoDot:1
+32 SET X=" "
DO SET(X,1,1)
+33 IF $GET(BGPEXPT)
IF BGPRTYPE=7
Begin DoDot:1
+34 SET X="A file will be created called BG161"_$PIECE(^AUTTLOC(DUZ(2),0),U,10)_".ONM"_BGPRPT_"."
DO SET(X,1,1)
+35 SET X="It will reside in the public/export directory."
DO SET(X,1,1)
+36 SET X="This file should be sent to your Area Office."
DO SET(X,1,1)
End DoDot:1
+37 IF BGPRTYPE=6
IF $GET(BGPPEEXP)
Begin DoDot:1
+38 SET X="A file will be created called BG161"_$PIECE(^AUTTLOC(DUZ(2),0),U,10)_".PED"_BGPRPT_"."
DO SET(X,1,1)
+39 SET X="This file will reside in the public/export directory."
DO SET(X,1,1)
+40 SET X="This file should be sent to your Area Office."
DO SET(X,1,1)
+41 SET X=" "
DO SET(X,1,1)
End DoDot:1
+42 IF BGPROT'="P"
Begin DoDot:1
+43 IF $DATA(BGPGUI)
QUIT
+44 SET X="A delimited output file called "_BGPDELF
DO SET(X,1,1)
SET X="has been placed in the "_$$GETDEDIR^BGP6UTL2()_" directory for your use in Excel or some"
DO SET(X,1,1)
SET X="other software package."
DO SET(X,1,1)
+45 SET X="See your site manager to access this file."
DO SET(X,1,1)
End DoDot:1
+46 SET X=" "
DO SET(X,1,1)
+47 IF BGPYRPTH="P"
KILL BGPX,BGPQUIT
QUIT
+48 IF $GET(BGPALLPT)
SET X="All Communities Included."
DO SET(X,1,1)
+49 IF '$GET(BGPALLPT)
IF '$GET(BGPSEAT)
SET X="Community Taxonomy Name: "_$PIECE(^ATXAX(BGPTAXI,0),U)
DO SET(X,1,1)
+50 IF '$GET(BGPALLPT)
IF '$GET(BGPSEAT)
SET X="The following communities are included in this report:"
DO SET(X,1,1)
Begin DoDot:1
+51 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
+52 SET BGPZZ=0
SET C=0
FOR BGPZZ=1:3:N
Begin DoDot:2
+53 SET X=$EXTRACT($PIECE(Y,";",BGPZZ),1,20)
SET $PIECE(X,U,2)=$EXTRACT($PIECE(Y,";",(BGPZZ+1)),1,20)
SET $PIECE(X,U,3)=$EXTRACT($PIECE(Y,";",(BGPZZ+2)),1,20)
DO SET(X,1,1)
+54 SET X=$EXTRACT($GET(BGPTAX(BGPZZ)),1,20)
SET $PIECE(X,U,2)=$EXTRACT($GET(BGPTAX(BGPZZ+1)),1,20)
SET $PIECE(X,U,4)=$EXTRACT($GET(BGPTAX(BGPZZ+2)),1,20)
DO SET(X,1,1)
+55 QUIT
End DoDot:2
End DoDot:1
+56 SET X=" "
DO SET(X,1,1)
+57 SET X=" "
DO SET(X,1,1)
+58 KILL BGPX,BGPQUIT
+59 SET X=" "
DO SET(X,1,1)
+60 IF BGPRTYPE'=6
DO SET("ENDCOVERPAGE",1,1)
+61 QUIT
PEHDR ;EP
+1 DO PEHDR^BGP6PDH1
+2 QUIT
COMHDR ;
+1 DO COMHDR^BGP6PDH1
+2 QUIT
ONMHDR ;
+1 SET X=" "
DO SET(X,1,1)
+2 SET BGPTEXT="ONH1"
FOR BGPJ1=1:1
SET BGPX=$TEXT(@BGPTEXT+BGPJ1)
IF $PIECE(BGPX,";;",2)="QUIT"
QUIT
Begin DoDot:1
+3 SET BGPT=$PIECE(BGPX,";;",2)
+4 DO SET(BGPT,1,1)
End DoDot:1
+5 IF BGPRTC="U"
Begin DoDot:1
+6 DO SET("3. User defines population: a) Indian/Alaska Natives Only - based on",1,1)
+7 DO SET("Classification of 01; b) Non AI/AN (not 01); or c) Both.",1,1)
End DoDot:1
+8 IF BGPRTC="H"
Begin DoDot:1
+9 DO SET("3. Indian/Alaska Natives Only - based on Classification of 01.",1,1)
End DoDot:1
+10 SET BGPTEXT="ONH2"
FOR BGPJ1=1:1
SET BGPX=$TEXT(@BGPTEXT+BGPJ1)
IF $PIECE(BGPX,";;",2)="QUIT"
QUIT
Begin DoDot:1
+11 SET BGPT=$PIECE(BGPX,";;",2)
+12 DO SET(BGPT,1,1)
End DoDot:1
+13 DO SET(" ",1,1)
+14 QUIT
ONMHDRC ;
+1 SET BGPTEXT="ONH1"
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 DO SET(BGPT,1,1)
End DoDot:1
+4 IF BGPRTC="U"
Begin DoDot:1
+5 DO SET("3. User defines population: a) Indian/Alaska Natives Only - based on",1,1)
+6 DO SET("Classification of 01; b) Non AI/AN (not 01); or c) Both.",1,1)
End DoDot:1
+7 IF BGPRTC="H"
Begin DoDot:1
+8 DO SET("3. Indian/Alaska Natives Only - based on Classification of 01.",1,1)
End DoDot:1
+9 SET BGPTEXT="ONH2C"
FOR BGPJ1=1:1
SET BGPX=$TEXT(@BGPTEXT+BGPJ1)
IF $PIECE(BGPX,";;",2)="QUIT"
QUIT
Begin DoDot:1
+10 SET BGPT=$PIECE(BGPX,";;",2)
+11 DO SET(BGPT,1,1)
End DoDot:1
+12 DO SET(" ",1,1)
+13 QUIT
PPHDR ;
+1 DO PPHDR^BGP6PDH1
+2 QUIT
ALLHDR ;
+1 DO ALLHDR^BGP6PDH1
+2 QUIT
GPRAHDRS ;
+1 DO GPRAHDRS^BGP6PDH1
+2 QUIT
DENOMHDR ;
+1 DO DENOMHDR^BGP6PDH1
+2 QUIT
AREAHDR ;
+1 SET X=" "
DO SET(X,1,1)
+2 SET BGPX=$ORDER(^BGPCTRL("B",2016,0))
+3 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,15,BGPY))
IF BGPY'=+BGPY
QUIT
Begin DoDot:1
+4 SET X=^BGPCTRL(BGPX,15,BGPY,0)
DO SET(X,1,1)
+5 QUIT
End DoDot:1
+6 QUIT
GPRAHDR ;
+1 SET X=" "
DO SET(X,1,1)
+2 SET BGPNODEP=14
+3 SET BGPX=$ORDER(^BGPCTRL("B",2016,0))
+4 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,BGPNODEP,BGPY))
IF BGPY'=+BGPY
QUIT
Begin DoDot:1
+5 SET X=^BGPCTRL(BGPX,BGPNODEP,BGPY,0)
DO SET(X,1,1)
+6 QUIT
End DoDot:1
+7 QUIT
GPRAHDRA ;
+1 SET X=" "
DO SET(X,1,1)
+2 SET BGPX=$ORDER(^BGPCTRL("B",2016,0))
+3 SET BGPNODEP=14
+4 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,BGPNODEP,BGPY))
IF BGPY'=+BGPY
QUIT
Begin DoDot:1
+5 SET X=^BGPCTRL(BGPX,BGPNODEP,BGPY,0)
DO SET(X,1,1)
+6 QUIT
End DoDot:1
+7 QUIT
COMHDRA ;
+1 SET X=" "
DO SET(X,1,1)
+2 SET BGPX=$ORDER(^BGPCTRL("B",2016,0))
+3 SET BGPNODEP=17
+4 SET BGPY=0
FOR
SET BGPY=$ORDER(^BGPCTRL(BGPX,BGPNODEP,BGPY))
IF BGPY'=+BGPY
QUIT
Begin DoDot:1
+5 SET X=^BGPCTRL(BGPX,BGPNODEP,BGPY,0)
DO SET(X,1,1)
+6 QUIT
End DoDot:1
+7 IF $GET(BGPYGPU)
DO SET("See last pages of this report for Performance Summaries.",1,1)
DO SET(" ",1,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
SET X="RUN TIME (H.M.S): "_BGPHR_"."_BGPM_"."_BGPS
DO SET(X,1,1)
End DoDot:1
+3 QUIT
AREACP ;EP
+1 IF BGPRTYPE=6
SET X="*** IHS 2016 Patient Education with Community Specified Report***"
DO SET(X,1,1)
+2 IF BGPRTYPE=1
IF $GET(BGPNGR09)
SET X="*** IHS 2016 National GPRA/GPRAMA Report, Run Using 2016 Logic ***"
DO SET(X,1,1)
GOTO NA
+3 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF '$GET(BGPSUMON)
SET X="*** IHS 2016 National GPRA/GPRAMA Report ***"
DO SET(X,1,1)
+4 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
IF $GET(BGPSUMON)
SET X="*** IHS 2016 National GPRA/GPRAMA Report Clinical Performance Summaries ***"
DO SET(X,1,1)
+5 IF BGPRTYPE=1
IF $GET(BGPYGPU)
SET X="*** IHS 2016 GPRA/GPRAMA Performance Report ***"
DO SET(X,1,1)
+6 IF BGPRTYPE=7
DO SET("*** IHS 2016 Other National Measures Report ***",1,1)
NA SET X="AREA AGGREGATE"
DO SET(X,1,1)
+1 SET X=$$RPTVER^BGP6BAN
DO SET(X,1,1)
+2 SET X="Date Report Run: "_$$FMTE^XLFDT(DT)
DO SET(X,1,1)
+3 SET X="Site where Run: "_$$VAL^XBDIQ1(9999999.06,DUZ(2),.04)
DO SET(X,1,1)
+4 SET X="Report Generated by: "_$$USR
DO SET(X,1,1)
+5 SET X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
DO SET(X,1,1)
+6 SET X="Previous Year Period: "_$$FMTE^XLFDT(BGPPBD)_" to "_$$FMTE^XLFDT(BGPPED)
DO SET(X,1,1)
+7 SET X="Baseline Period: "_$$FMTE^XLFDT(BGPBBD)_" to "_$$FMTE^XLFDT(BGPBED)
DO SET(X,1,1)
+8 SET X=" "
DO SET(X,1,1)
+9 IF BGPRTYPE=6
SET X="Measures: Patient Education Performance Measures"
DO SET(X,1,1)
+10 IF BGPRTYPE=1
SET X="Measures: GPRA, GPRA Developmental, and PART Denominators and Numerators and "
DO SET(X,1,1)
SET X="Selected Other Clinical Denominators and Numerators"
DO SET(X,1,1)
+11 IF BGPRTYPE=7
DO SET("Measures: Key Clinical Denominators and Numerators for Non-GPRA National Reporting",1,1)
+12 IF BGPRTYPE=1!(BGPRTYPE=6)!(BGPRTYPE=7)
SET X="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:"")
DO SET(X,1,1)
+13 SET X=" "
DO SET(X,1,1)
+14 DO ENDTIME
+15 SET X=" "
DO SET(X,1,1)
+16 IF BGPRTYPE=6
DO PEDCP
QUIT
+17 IF BGPRTYPE=1
IF '$GET(BGPYGPU)
DO GPRAHDRA
+18 IF BGPRTYPE=1
IF $GET(BGPYGPU)
DO COMHDRA
+19 IF BGPRTYPE=7
DO ONMHDR
+20 IF BGPROT'="P"
IF '$DATA(BGPGUI)
Begin DoDot:1
+21 SET X="A delimited output file called "_BGPDELF
DO SET(X,1,1)
+22 SET X="has been placed in the "_$$GETDEDIR^BGP6UTL2()_" directory for your use in Excel or some"
DO SET(X,1,1)
SET X="other software package. See your site manager to access this file."
DO SET(X,1,1)
End DoDot:1
+23 SET X=" "
DO SET(X,1,1)
+24 IF $GET(BGPEXCEL)
IF '$GET(BGPYGPU)
IF BGPRTYPE=1
Begin DoDot:1
+25 ;S X=BGPFN2 D SET(X,1,1) S X=" " D SET(X,1,1)
SET X="National GPRA Filenames: "
DO SET(X,1,1)
SET X=BGPFGNT1
DO SET(X,1,1)
SET X=BGPFGNT2
DO SET(X,1,1)
SET X=BGPFGNT3
DO SET(X,1,1)
SET X=BGPFGNT4
DO SET(X,1,1)
End DoDot:1
+26 IF BGPRTYPE=7
Begin DoDot:1
+27 SET X="Other National Reporting Filenames: "_$GET(BGPFONN1)
DO SET(X,1,1)
SET X="^"_BGPFONN2
DO SET(X,1,1)
SET X="^"_BGPFONN3
DO SET(X,1,1)
SET X=" "
DO SET(X,1,1)
End DoDot:1
+28 SET X="Report includes data from the following facilities:"
DO SET(X,1,1)
+29 NEW BGPX
+30 SET BGPX=""
SET BGPC=0
FOR
SET BGPX=$ORDER(BGPSUL(BGPX))
IF BGPX=""
QUIT
Begin DoDot:1
+31 SET X=$PIECE(^BGPGPDCM(BGPX,0),U,9)
SET X=$ORDER(^AUTTLOC("C",X,0))
SET X=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
+32 SET BGPC=BGPC+1
SET X=BGPC_". "_$SELECT($PIECE(^BGPGPDCM(BGPX,0),U,17):"*",1:"")_X
DO SET(X,1,1)
+33 QUIT
End DoDot:1
+34 SET X=" "
DO SET(X,1,1)
+35 SET X="The following communities are included in this report:"
DO SET(X,1,1)
+36 SET BGPX=""
SET BGPC=0
FOR
SET BGPX=$ORDER(BGPSUL(BGPX))
IF BGPX=""
QUIT
Begin DoDot:1
+37 SET X=$PIECE(^BGPGPDCM(BGPX,0),U,9)
SET X=$ORDER(^AUTTLOC("C",X,0))
SET X=$SELECT(X:$PIECE(^DIC(4,X,0),U),1:"?????")
+38 SET BGPC=BGPC+1
SET X=BGPC_". "_$SELECT($PIECE(^BGPGPDCM(BGPX,0),U,17):"*",1:"")_X
DO SET(X,1,1)
+39 SET X="Community Taxonomy Name: "_$PIECE(^BGPGPDCM(BGPX,0),U,18)
DO SET(X,1,1)
+40 SET X=0
SET N=0
SET Y=""
SET Z=""
FOR
SET X=$ORDER(^BGPGPDCM(BGPX,9999,X))
IF X'=+X
QUIT
SET N=N+1
SET Y=Y_$SELECT(N=1:"",1:";")_$PIECE(^BGPGPDCM(BGPX,9999,X,0),U)
+41 SET X=0
SET C=0
FOR X=1:3:N
SET Z=$EXTRACT($PIECE(Y,";",X),1,20)
SET $PIECE(Z,U,2)=$EXTRACT($PIECE(Y,";",(X+1)),1,20)
SET $PIECE(Z,U,3)=$EXTRACT($PIECE(Y,";",(X+2)),1,20)
DO SET(Z,1,1)
+42 SET X=" "
DO SET(X,1,1)
+43 QUIT
End DoDot:1
+44 SET X="ENDCOVERPAGE"
DO SET(X,1,1)
+45 KILL BGPX,BGPQUIT
+46 QUIT
PEDCP ;
+1 DO PEDCP^BGP6PDH1
+2 QUIT
SET(Y,F,P) ;
+1 IF '$GET(F)
SET F=0
+2 SET %=$PIECE(^TMP($JOB,"BGPDEL",0),U)+F
SET $PIECE(^TMP($JOB,"BGPDEL",0),U)=%
+3 IF '$DATA(^TMP($JOB,"BGPDEL",%))
SET ^TMP($JOB,"BGPDEL",%)=""
+4 SET $PIECE(^TMP($JOB,"BGPDEL",%),U,P)=Y
+5 QUIT
CTR(X,Y) ;
+1 QUIT $JUSTIFY("",$SELECT($DATA(Y):Y,1:IOM)-$LENGTH(X)\2)_X
+2 ;----------
USR() ;
+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 ;;Asthma Related Measures
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
+1 ;
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 ;;