BGP0NPLP ; IHS/CMI/LAB - IHS gpra print 30 Jun 2009 5:58 PM ;
;;10.0;IHS CLINICAL REPORTING;;JUN 18, 2010
;
NPL ;
Q:$G(BGPAREAA)
S BGPQUIT="",BGPGPG=0
S BGPINDT=0,BGPCOUNT=0
S BGPINDT=0 F S BGPINDT=$O(BGPINDL(BGPINDT)) Q:BGPINDT'=+BGPINDT!(BGPQUIT) D
.S BGPINDII=0 F S BGPINDII=$O(BGPINDL(BGPINDT,BGPL)) Q:BGPINDII'=+BGPINDII!(BGPQUIT) D
..I '$$ANYPATS(BGPINDT,BGPINDII) D HEADER W !!,"No Patients to Report.",! Q
..D NPL1 ;F S BGPINDT=$O(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT)) Q:BGPINDT'=+BGPINDT!(BGPQUIT) D NPL1
Q
ANYPATS(I,L) ;
NEW O,G
S G=""
S O=0 F S O=$O(^XTMP("BGP0DNP",BGJP,BGPH,"LIST",BGPINDT,O)) Q:O'=+O D
.I $D(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,O,BGPL)) S G=1
.Q
Q
NPL1 ;EP
Q:$G(BGPAREAA)
S BGPO=0 F S BGPO=$O(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO)) Q:BGPO'=+BGPO!(BGPQUIT) D NPL11
Q
NPL11 ;
S BGPL=0 F S BGPL=$O(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL)) Q:BGPL'=+BGPL!(BGPQUIT) D
.S BGPINDT=$P(^BGPNPLT(BGPL,0),U)
.I BGPRTYPE=1!(BGPRTYPE=9) Q:BGPRTYPE'=$P(^BGPNPLT(BGPL,0),U,7)
.;I BGPRTYPE="" S BGPRTYPE=1
.S BGPCOUNT=0,BGPPCNT=0
.D HEADER Q:BGPQUIT
.;I BGPPTYPE="D" D W^BGP0DP("",0,3,BGPPTYPE)
.S BGPCNT=BGPINDL(BGPINDT,BGPL)
.I BGPCNT<11!(BGPLIST'="R") S BGPCNT=1 G GO
.I BGPCNT<100 S BGPCNT=BGPCNT\10 G GO
.S BGPCNT=10
GO .;
.D WTITLE^BGP0DP(BGPINDT) ;W !,$P(^BGPINDT(BGPINDT,0),U,3)
NEXT .;
.S BGPX=0 F S BGPX=$O(^BGPNPLT(BGPL,11,BGPX)) Q:BGPX'=+BGPX D
..I BGPPTYPE="P",$Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
..D W^BGP0DP(^BGPNPLT(BGPL,11,BGPX,0),0,1,BGPPTYPE)
.D H1
.S BGPCOM="" F S BGPCOM=$O(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM)) Q:BGPCOM=""!(BGPQUIT) D
..S BGPSEX="" F S BGPSEX=$O(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX)) Q:BGPSEX=""!(BGPQUIT) D
...S BGPAGE="" F S BGPAGE=$O(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE)) Q:BGPAGE=""!(BGPQUIT) D
....S DFN=0 F S DFN=$O(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN)) Q:DFN'=+DFN!(BGPQUIT) S BGPCOUNT=BGPCOUNT+1 D PRINTL
....Q
...Q
..Q
.I BGPPTYPE="P",$Y>(BGPIOSL-3) D HEADER Q:BGPQUIT
.D W^BGP0DP("Total # of patients on list: ",+$G(BGPPCNT),0,2,BGPPTYPE)
.D W^BGP0DP("",0,1,BGPPTYPE)
Q
;
PRINTL ;print one line
Q:(BGPCOUNT#BGPCNT)
I BGPPTYPE="P",$Y>(BGPIOSL-3) D HEADER Q:BGPQUIT D
.S X=0 F S X=$O(^BGPNPLT(BGPL,11,X)) Q:X'=+X W !,^BGPNPLT(BGPL,11,X,0)
.D H1
Q:BGPQUIT
S BGPPCNT=BGPPCNT+1
I BGPPTYPE="P" W !,$E($P(^DPT(DFN,0),U),1,22),?24,$$HRN^AUPNPAT(DFN,DUZ(2)),?31,$E(BGPCOM,1,14),?46,BGPSEX,?49,BGPAGE D
.W ?53,$P(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN),"|||",1),?65,$P(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN),"|||",2)
I BGPPTYPE="D" D
.S X=$E($P(^DPT(DFN,0),U),1,22)_U_$$HRN^AUPNPAT(DFN,DUZ(2))_U_$E(BGPCOM,1,14)_U_BGPSEX_U_BGPAGE
.S Y=$P(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN),"|||",1) S $P(X,U,6)=Y
.S Y=$P(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN),"|||",2) S $P(X,U,7)=Y
.D W^BGP0DP(X,0,1,BGPPTYPE)
Q
;
I BGPPTYPE="D" D HEADERD Q
G:'BGPGPG HEADER1
K DIR I $E(IOST)="C",IO=IO(0),'$D(ZTQUEUED) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S BGPQUIT=1 Q
W:$D(IOF) @IOF S BGPGPG=BGPGPG+1
I $G(BGPGUI) W "ZZZZZZZ",! ;maw
W !,"***** CONFIDENTIAL PATIENT INFORMATION, COVERED BY THE PRIVACY ACT *****"
W !?3,$P(^VA(200,DUZ,0),U,2),?35,$$FMTE^XLFDT(DT),?70,"Page ",BGPGPG,!
I BGPRTYPE=1 W !,$$CTR("*** IHS 2010 GPRA Performance & PART Patient List ***",80),!
I BGPRTYPE=9 W !,$$CTR("*** IHS 2010 GPRA Developmental Measures Patient List ***",80),!
I BGPRTYPE=7 W !,$$CTR("*** IHS 2010 Other National Measures Patient List ***",80),!
W $$CTR($$RPTVER^BGP0BAN,80),!
W $$CTR($P(^DIC(4,DUZ(2),0),U),80),!
S X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) W $$CTR(X,80),!
W $$CTR($S(BGPLIST="A":"All Patients",BGPLIST="R":"Random Patient List",1:"Patient List by Provider: "_BGPLPROV),80),!
W !,$TR($J("",80)," ","-")
Q
H1 ;
D W^BGP0DP("UP=User Pop; AC=Active Clinical; AD=Active Diabetic; AAD=Active Adult Diabetic",0,2,BGPPTYPE)
D W^BGP0DP("PREG=Pregnant Female; IMM=Active IMM Pkg Pt; IHD=Active Ischemic Heart Disease",0,1,BGPPTYPE)
D W^BGP0DP("CHD=Active Coronary Heart Disease",0,1,BGPRTYPE)
D W^BGP0DP("PATIENT NAME",0,1,BGPPTYPE,1)
D W^BGP0DP("HRN",0,0,BGPPTYPE,2,24) ;,?24,"HRN",
D W^BGP0DP("COMMUNITY",0,0,BGPPTYPE,3,31) ;?31,"COMMUNITY",
D W^BGP0DP("SEX",0,0,BGPPTYPE,4,45) ;?45,"SEX",
D W^BGP0DP("AGE",0,0,BGPPTYPE,5,49) ;?49,"AGE",
D W^BGP0DP("DENOMINATOR",0,0,BGPPTYPE,6,53) ;?53,"DENOMINATOR",
D W^BGP0DP("NUMERATOR",0,0,BGPPTYPE,7,65) ;?65,"NUMERATOR"
D W^BGP0DP($TR($J("",80)," ","-"),0,1,BGPPTYPE)
;W !,"PATIENT NAME",?24,"HRN",?31,"COMMUNITY",?45,"SEX",?49,"AGE",?53,"DENOMINATOR",?65,"NUMERATOR"
;W !,$TR($J("",80)," ","-")
Q
CTR(X,Y) ;EP - Center X in a field Y wide.
Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
;----------
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")
;----------
LOC() ;EP - Return location name from file 4 based on DUZ(2).
Q $S($G(DUZ(2)):$S($D(^DIC(4,DUZ(2),0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ(2) UNDEFINED OR 0")
;----------
S X="**** CONFIDENTIAL PATIENT INFORMATION, COVERED BY THE PRIVACY ACT *****" D W^BGP0DP(X,0,2,BGPPTYPE)
I BGPRTYPE=1 S X="*** IHS 2010 GPRA Performance & PART Patient List ***" D W^BGP0DP(X,0,1,BGPPTYPE)
I BGPRTYPE=9 S X="*** IHS 2010 GPRA Developmental Measures Patient List ***" D W^BGP0DP(X,0,1,BGPPTYPE)
I BGPRTYPE=7 S X="*** IHS 2010 Other National Measures Patient List ***" D W^BGP0DP(X,0,1,BGPPTYPE)
S X=$$RPTVER^BGP0BAN D W^BGP0DP(X,0,1,BGPPTYPE)
S X=$P(^DIC(4,DUZ(2),0),U) D W^BGP0DP(X,0,1,BGPPTYPE)
S X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED) D W^BGP0DP(X,0,1,BGPPTYPE)
S X=$S(BGPLIST="A":"All Patients",BGPLIST="R":"Random Patient List",1:"Patient List by Provider: "_BGPLPROV) D W^BGP0DP(X,0,1,BGPPTYPE)
S X=$TR($J("",80)," ","-") D W^BGP0DP(X,0,1,BGPPTYPE)
Q
BGP0NPLP ; IHS/CMI/LAB - IHS gpra print 30 Jun 2009 5:58 PM ;
+1 ;;10.0;IHS CLINICAL REPORTING;;JUN 18, 2010
+2 ;
NPL ;
+1 IF $GET(BGPAREAA)
QUIT
+2 SET BGPQUIT=""
SET BGPGPG=0
+3 SET BGPINDT=0
SET BGPCOUNT=0
+4 SET BGPINDT=0
FOR
SET BGPINDT=$ORDER(BGPINDL(BGPINDT))
IF BGPINDT'=+BGPINDT!(BGPQUIT)
QUIT
Begin DoDot:1
+5 SET BGPINDII=0
FOR
SET BGPINDII=$ORDER(BGPINDL(BGPINDT,BGPL))
IF BGPINDII'=+BGPINDII!(BGPQUIT)
QUIT
Begin DoDot:2
+6 IF '$$ANYPATS(BGPINDT,BGPINDII)
DO HEADER
WRITE !!,"No Patients to Report.",!
QUIT
+7 ;F S BGPINDT=$O(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT)) Q:BGPINDT'=+BGPINDT!(BGPQUIT) D NPL1
DO NPL1
End DoDot:2
End DoDot:1
+8 QUIT
ANYPATS(I,L) ;
+1 NEW O,G
+2 SET G=""
+3 SET O=0
FOR
SET O=$ORDER(^XTMP("BGP0DNP",BGJP,BGPH,"LIST",BGPINDT,O))
IF O'=+O
QUIT
Begin DoDot:1
+4 IF $DATA(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,O,BGPL))
SET G=1
+5 QUIT
End DoDot:1
+6 QUIT
NPL1 ;EP
+1 IF $GET(BGPAREAA)
QUIT
+2 SET BGPO=0
FOR
SET BGPO=$ORDER(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO))
IF BGPO'=+BGPO!(BGPQUIT)
QUIT
DO NPL11
+3 QUIT
NPL11 ;
+1 SET BGPL=0
FOR
SET BGPL=$ORDER(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL))
IF BGPL'=+BGPL!(BGPQUIT)
QUIT
Begin DoDot:1
+2 SET BGPINDT=$PIECE(^BGPNPLT(BGPL,0),U)
+3 IF BGPRTYPE=1!(BGPRTYPE=9)
IF BGPRTYPE'=$PIECE(^BGPNPLT(BGPL,0),U,7)
QUIT
+4 ;I BGPRTYPE="" S BGPRTYPE=1
+5 SET BGPCOUNT=0
SET BGPPCNT=0
+6 DO HEADER
IF BGPQUIT
QUIT
+7 ;I BGPPTYPE="D" D W^BGP0DP("",0,3,BGPPTYPE)
+8 SET BGPCNT=BGPINDL(BGPINDT,BGPL)
+9 IF BGPCNT<11!(BGPLIST'="R")
SET BGPCNT=1
GOTO GO
+10 IF BGPCNT<100
SET BGPCNT=BGPCNT\10
GOTO GO
+11 SET BGPCNT=10
GO ;
+1 ;W !,$P(^BGPINDT(BGPINDT,0),U,3)
DO WTITLE^BGP0DP(BGPINDT)
NEXT ;
+1 SET BGPX=0
FOR
SET BGPX=$ORDER(^BGPNPLT(BGPL,11,BGPX))
IF BGPX'=+BGPX
QUIT
Begin DoDot:2
+2 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-3)
DO HEADER
IF BGPQUIT
QUIT
+3 DO W^BGP0DP(^BGPNPLT(BGPL,11,BGPX,0),0,1,BGPPTYPE)
End DoDot:2
+4 DO H1
+5 SET BGPCOM=""
FOR
SET BGPCOM=$ORDER(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM))
IF BGPCOM=""!(BGPQUIT)
QUIT
Begin DoDot:2
+6 SET BGPSEX=""
FOR
SET BGPSEX=$ORDER(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX))
IF BGPSEX=""!(BGPQUIT)
QUIT
Begin DoDot:3
+7 SET BGPAGE=""
FOR
SET BGPAGE=$ORDER(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE))
IF BGPAGE=""!(BGPQUIT)
QUIT
Begin DoDot:4
+8 SET DFN=0
FOR
SET DFN=$ORDER(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN))
IF DFN'=+DFN!(BGPQUIT)
QUIT
SET BGPCOUNT=BGPCOUNT+1
DO PRINTL
+9 QUIT
End DoDot:4
+10 QUIT
End DoDot:3
+11 QUIT
End DoDot:2
+12 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-3)
DO HEADER
IF BGPQUIT
QUIT
+13 DO W^BGP0DP("Total # of patients on list: ",+$GET(BGPPCNT),0,2,BGPPTYPE)
+14 DO W^BGP0DP("",0,1,BGPPTYPE)
End DoDot:1
+15 QUIT
+16 ;
PRINTL ;print one line
+1 IF (BGPCOUNT#BGPCNT)
QUIT
+2 IF BGPPTYPE="P"
IF $Y>(BGPIOSL-3)
DO HEADER
IF BGPQUIT
QUIT
Begin DoDot:1
+3 SET X=0
FOR
SET X=$ORDER(^BGPNPLT(BGPL,11,X))
IF X'=+X
QUIT
WRITE !,^BGPNPLT(BGPL,11,X,0)
+4 DO H1
End DoDot:1
+5 IF BGPQUIT
QUIT
+6 SET BGPPCNT=BGPPCNT+1
+7 IF BGPPTYPE="P"
WRITE !,$EXTRACT($PIECE(^DPT(DFN,0),U),1,22),?24,$$HRN^AUPNPAT(DFN,DUZ(2)),?31,$EXTRACT(BGPCOM,1,14),?46,BGPSEX,?49,BGPAGE
Begin DoDot:1
+8 WRITE ?53,$PIECE(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN),"|||",1),?65,$PIECE(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN),"|||",2)
End DoDot:1
+9 IF BGPPTYPE="D"
Begin DoDot:1
+10 SET X=$EXTRACT($PIECE(^DPT(DFN,0),U),1,22)_U_$$HRN^AUPNPAT(DFN,DUZ(2))_U_$EXTRACT(BGPCOM,1,14)_U_BGPSEX_U_BGPAGE
+11 SET Y=$PIECE(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN),"|||",1)
SET $PIECE(X,U,6)=Y
+12 SET Y=$PIECE(^XTMP("BGP0DNP",BGPJ,BGPH,"LIST",BGPINDT,BGPO,BGPL,BGPCOM,BGPSEX,BGPAGE,DFN),"|||",2)
SET $PIECE(X,U,7)=Y
+13 DO W^BGP0DP(X,0,1,BGPPTYPE)
End DoDot:1
+14 QUIT
+15 ;
+1 IF BGPPTYPE="D"
DO HEADERD
QUIT
+2 IF 'BGPGPG
GOTO HEADER1
+3 KILL DIR
IF $EXTRACT(IOST)="C"
IF IO=IO(0)
IF '$DATA(ZTQUEUED)
WRITE !
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET BGPQUIT=1
QUIT
+1 IF $DATA(IOF)
WRITE @IOF
SET BGPGPG=BGPGPG+1
+2 ;maw
IF $GET(BGPGUI)
WRITE "ZZZZZZZ",!
+3 WRITE !,"***** CONFIDENTIAL PATIENT INFORMATION, COVERED BY THE PRIVACY ACT *****"
+4 WRITE !?3,$PIECE(^VA(200,DUZ,0),U,2),?35,$$FMTE^XLFDT(DT),?70,"Page ",BGPGPG,!
+5 IF BGPRTYPE=1
WRITE !,$$CTR("*** IHS 2010 GPRA Performance & PART Patient List ***",80),!
+6 IF BGPRTYPE=9
WRITE !,$$CTR("*** IHS 2010 GPRA Developmental Measures Patient List ***",80),!
+7 IF BGPRTYPE=7
WRITE !,$$CTR("*** IHS 2010 Other National Measures Patient List ***",80),!
+8 WRITE $$CTR($$RPTVER^BGP0BAN,80),!
+9 WRITE $$CTR($PIECE(^DIC(4,DUZ(2),0),U),80),!
+10 SET X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
WRITE $$CTR(X,80),!
+11 WRITE $$CTR($SELECT(BGPLIST="A":"All Patients",BGPLIST="R":"Random Patient List",1:"Patient List by Provider: "_BGPLPROV),80),!
+12 WRITE !,$TRANSLATE($JUSTIFY("",80)," ","-")
+13 QUIT
H1 ;
+1 DO W^BGP0DP("UP=User Pop; AC=Active Clinical; AD=Active Diabetic; AAD=Active Adult Diabetic",0,2,BGPPTYPE)
+2 DO W^BGP0DP("PREG=Pregnant Female; IMM=Active IMM Pkg Pt; IHD=Active Ischemic Heart Disease",0,1,BGPPTYPE)
+3 DO W^BGP0DP("CHD=Active Coronary Heart Disease",0,1,BGPRTYPE)
+4 DO W^BGP0DP("PATIENT NAME",0,1,BGPPTYPE,1)
+5 ;,?24,"HRN",
DO W^BGP0DP("HRN",0,0,BGPPTYPE,2,24)
+6 ;?31,"COMMUNITY",
DO W^BGP0DP("COMMUNITY",0,0,BGPPTYPE,3,31)
+7 ;?45,"SEX",
DO W^BGP0DP("SEX",0,0,BGPPTYPE,4,45)
+8 ;?49,"AGE",
DO W^BGP0DP("AGE",0,0,BGPPTYPE,5,49)
+9 ;?53,"DENOMINATOR",
DO W^BGP0DP("DENOMINATOR",0,0,BGPPTYPE,6,53)
+10 ;?65,"NUMERATOR"
DO W^BGP0DP("NUMERATOR",0,0,BGPPTYPE,7,65)
+11 DO W^BGP0DP($TRANSLATE($JUSTIFY("",80)," ","-"),0,1,BGPPTYPE)
+12 ;W !,"PATIENT NAME",?24,"HRN",?31,"COMMUNITY",?45,"SEX",?49,"AGE",?53,"DENOMINATOR",?65,"NUMERATOR"
+13 ;W !,$TR($J("",80)," ","-")
+14 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 ;----------
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 ;----------
LOC() ;EP - Return location name from file 4 based on DUZ(2).
+1 QUIT $SELECT($GET(DUZ(2)):$SELECT($DATA(^DIC(4,DUZ(2),0)):$PIECE(^(0),U),1:"UNKNOWN"),1:"DUZ(2) UNDEFINED OR 0")
+2 ;----------
+1 SET X="**** CONFIDENTIAL PATIENT INFORMATION, COVERED BY THE PRIVACY ACT *****"
DO W^BGP0DP(X,0,2,BGPPTYPE)
+2 IF BGPRTYPE=1
SET X="*** IHS 2010 GPRA Performance & PART Patient List ***"
DO W^BGP0DP(X,0,1,BGPPTYPE)
+3 IF BGPRTYPE=9
SET X="*** IHS 2010 GPRA Developmental Measures Patient List ***"
DO W^BGP0DP(X,0,1,BGPPTYPE)
+4 IF BGPRTYPE=7
SET X="*** IHS 2010 Other National Measures Patient List ***"
DO W^BGP0DP(X,0,1,BGPPTYPE)
+5 SET X=$$RPTVER^BGP0BAN
DO W^BGP0DP(X,0,1,BGPPTYPE)
+6 SET X=$PIECE(^DIC(4,DUZ(2),0),U)
DO W^BGP0DP(X,0,1,BGPPTYPE)
+7 SET X="Report Period: "_$$FMTE^XLFDT(BGPBD)_" to "_$$FMTE^XLFDT(BGPED)
DO W^BGP0DP(X,0,1,BGPPTYPE)
+8 SET X=$SELECT(BGPLIST="A":"All Patients",BGPLIST="R":"Random Patient List",1:"Patient List by Provider: "_BGPLPROV)
DO W^BGP0DP(X,0,1,BGPPTYPE)
+9 SET X=$TRANSLATE($JUSTIFY("",80)," ","-")
DO W^BGP0DP(X,0,1,BGPPTYPE)
+10 QUIT