BGP6DPEF ; IHS/CMI/LAB - IHS gpra print ;
;;16.1;IHS CLINICAL REPORTING;;MAR 22, 2016;Build 170
;
;
7 ;EP
S X=""
D S^BGP6DPED(" ",1,1) D S^BGP6DPED(" ",1,1) ;S X=$P(^BGPPEIM(BGPIC,0),U,2) D S^BGP6DPED(X,1,1)
D H1^BGP6PDL1
D S^BGP6DPED(" ",1,1)
S BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
S BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
S BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
I $G(BGPSEAT) S X=$P(^DIBT(BGPSEAT,0),U,1)_" Population w/ Pat Ed" D S^BGP6DPED(X,1,1)
I '$G(BGPSEAT) S X="# User Pop" D S^BGP6DPED(X,1,1)
S Y=BGPCYD_"^^"_BGPPRD_"^^^"_BGPBLD D S^BGP6DPED(Y,,2)
D S^BGP6DPED(" ",1,1)
S X="Goal Setting" D S^BGP6DPED(X,1,1)
S N=11,P=24 D SETN^BGP6DPED
S X="# w/goal set" D S^BGP6DPED(X,1,1)
D H2^BGP6PDL1
D S^BGP6DPED(" ",1,1)
K BGPPROVS
S N=16 D SETNM^BGP6DPEQ
K BGPX
S BGPCNT=0
S X="",C=0 F S X=$O(BGPPROVS(X)) Q:X="" S Y="" F S Y=$O(BGPPROVS(X,Y)) Q:Y="" S C=C+1 S BGPX((9999999-$P(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
S BGP1=0 F S BGP1=$O(BGPX(BGP1)) Q:BGP1'=+BGP1!(BGPCNT>15) D
.S BGPCNT=BGPCNT+1 S BGP2=0 F S BGP2=$O(BGPX(BGP1,BGP2)) Q:BGP2'=+BGP2 D
..S X=BGPCNT_". "_$P(BGPX(BGP1,BGP2),U,2) D S^BGP6DPED(X,1,1)
..S BGPCYN=$P(BGPX(BGP1,BGP2),U,3)
..S BGPPRN=$P(BGPX(BGP1,BGP2),U,4)
..S BGPBLN=$P(BGPX(BGP1,BGP2),U,5)
..S BGPCYP=$P(BGPX(BGP1,BGP2),U,6)
..S BGPPRP=$P(BGPX(BGP1,BGP2),U,7)
..S BGPBLP=$P(BGPX(BGP1,BGP2),U,8)
..D H2^BGP6PDL1
NOTSET ;
D S^BGP6DPED(" ",1,1)
S BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
S BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
S BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
D S^BGP6DPED(" ",1,1)
S N=11,P=25 D SETN^BGP6DPED
S X="# w/goal not set" D S^BGP6DPED(X,1,1)
D H2^BGP6PDL1
D S^BGP6DPED(" ",1,1)
K BGPPROVS
S N=17 D SETNM^BGP6DPEQ
K BGPX
S BGPCNT=0
S X="",C=0 F S X=$O(BGPPROVS(X)) Q:X="" S Y="" F S Y=$O(BGPPROVS(X,Y)) Q:Y="" S C=C+1 S BGPX((9999999-$P(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
S BGP1=0 F S BGP1=$O(BGPX(BGP1)) Q:BGP1'=+BGP1!(BGPCNT>15) D
.S BGPCNT=BGPCNT+1 S BGP2=0 F S BGP2=$O(BGPX(BGP1,BGP2)) Q:BGP2'=+BGP2 D
..S X=BGPCNT_". "_$P(BGPX(BGP1,BGP2),U,2) D S^BGP6DPED(X,1,1)
..S BGPCYN=$P(BGPX(BGP1,BGP2),U,3)
..S BGPPRN=$P(BGPX(BGP1,BGP2),U,4)
..S BGPBLN=$P(BGPX(BGP1,BGP2),U,5)
..S BGPCYP=$P(BGPX(BGP1,BGP2),U,6)
..S BGPPRP=$P(BGPX(BGP1,BGP2),U,7)
..S BGPBLP=$P(BGPX(BGP1,BGP2),U,8)
..D H2^BGP6PDL1
MET ;
D S^BGP6DPED(" ",1,1)
S BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
S BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
S BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
D S^BGP6DPED(" ",1,1)
S N=11,P=26 D SETN^BGP6DPED
S X="# w/goal met" D S^BGP6DPED(X,1,1)
D H2^BGP6PDL1
D S^BGP6DPED(" ",1,1)
K BGPPROVS
S N=18 D SETNM^BGP6DPEQ
K BGPX
S BGPCNT=0
S X="",C=0 F S X=$O(BGPPROVS(X)) Q:X="" S Y="" F S Y=$O(BGPPROVS(X,Y)) Q:Y="" S C=C+1 S BGPX((9999999-$P(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
S BGP1=0 F S BGP1=$O(BGPX(BGP1)) Q:BGP1'=+BGP1!(BGPCNT>15) D
.S BGPCNT=BGPCNT+1 S BGP2=0 F S BGP2=$O(BGPX(BGP1,BGP2)) Q:BGP2'=+BGP2 D
..S X=BGPCNT_". "_$P(BGPX(BGP1,BGP2),U,2) D S^BGP6DPED(X,1,1)
..S BGPCYN=$P(BGPX(BGP1,BGP2),U,3)
..S BGPPRN=$P(BGPX(BGP1,BGP2),U,4)
..S BGPBLN=$P(BGPX(BGP1,BGP2),U,5)
..S BGPCYP=$P(BGPX(BGP1,BGP2),U,6)
..S BGPPRP=$P(BGPX(BGP1,BGP2),U,7)
..S BGPBLP=$P(BGPX(BGP1,BGP2),U,8)
..D H2^BGP6PDL1
MAIN ;
D S^BGP6DPED(" ",1,1)
S BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
S BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
S BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
D S^BGP6DPED(" ",1,1)
S N=11,P=27 D SETN^BGP6DPED
S X="# w/goal maintained" D S^BGP6DPED(X,1,1)
D H2^BGP6PDL1
D S^BGP6DPED(" ",1,1)
K BGPPROVS
S N=19 D SETNM^BGP6DPEQ
K BGPX
S BGPCNT=0
S X="",C=0 F S X=$O(BGPPROVS(X)) Q:X="" S Y="" F S Y=$O(BGPPROVS(X,Y)) Q:Y="" S C=C+1 S BGPX((9999999-$P(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
S BGP1=0 F S BGP1=$O(BGPX(BGP1)) Q:BGP1'=+BGP1!(BGPCNT>15) D
.S BGPCNT=BGPCNT+1 S BGP2=0 F S BGP2=$O(BGPX(BGP1,BGP2)) Q:BGP2'=+BGP2 D
..S X=BGPCNT_". "_$P(BGPX(BGP1,BGP2),U,2) D S^BGP6DPED(X,1,1)
..S BGPCYN=$P(BGPX(BGP1,BGP2),U,3)
..S BGPPRN=$P(BGPX(BGP1,BGP2),U,4)
..S BGPBLN=$P(BGPX(BGP1,BGP2),U,5)
..S BGPCYP=$P(BGPX(BGP1,BGP2),U,6)
..S BGPPRP=$P(BGPX(BGP1,BGP2),U,7)
..S BGPBLP=$P(BGPX(BGP1,BGP2),U,8)
..D H2^BGP6PDL1
NOTMET ;
D S^BGP6DPED(" ",1,1)
S BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
S BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
S BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
D S^BGP6DPED(" ",1,1)
S N=11,P=28 D SETN^BGP6DPED
S X="# w/goal not met" D S^BGP6DPED(X,1,1)
D H2^BGP6PDL1
D S^BGP6DPED(" ",1,1)
K BGPPROVS
S N=21 D SETNM^BGP6DPEQ
K BGPX
S BGPCNT=0
S X="",C=0 F S X=$O(BGPPROVS(X)) Q:X="" S Y="" F S Y=$O(BGPPROVS(X,Y)) Q:Y="" S C=C+1 S BGPX((9999999-$P(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
S BGP1=0 F S BGP1=$O(BGPX(BGP1)) Q:BGP1'=+BGP1!(BGPCNT>15) D
.S BGPCNT=BGPCNT+1 S BGP2=0 F S BGP2=$O(BGPX(BGP1,BGP2)) Q:BGP2'=+BGP2 D
..S X=BGPCNT_". "_$P(BGPX(BGP1,BGP2),U,2) D S^BGP6DPED(X,1,1)
..S BGPCYN=$P(BGPX(BGP1,BGP2),U,3)
..S BGPPRN=$P(BGPX(BGP1,BGP2),U,4)
..S BGPBLN=$P(BGPX(BGP1,BGP2),U,5)
..S BGPCYP=$P(BGPX(BGP1,BGP2),U,6)
..S BGPPRP=$P(BGPX(BGP1,BGP2),U,7)
..S BGPBLP=$P(BGPX(BGP1,BGP2),U,8)
..D H2^BGP6PDL1
;UPPED
S X=""
D S^BGP6DPED(" ",1,1) D S^BGP6DPED(" ",1,1) ;S X=$P(^BGPPEIM(BGPIC,0),U,2) D S^BGP6DPED(X,1,1)
D H1^BGP6PDL1
D S^BGP6DPED(" ",1,1)
S BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,19)
S BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,19)
S BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,19)
I $G(BGPSEAT) S X=$P(^DIBT(BGPSEAT,0),U,1)_" Population w/ Pat Ed" D S^BGP6DPED(X,1,1)
I '$G(BGPSEAT) S X="# User Pop w/ Pat Ed" D S^BGP6DPED(X,1,1)
S Y=BGPCYD_"^^"_BGPPRD_"^^^"_BGPBLD D S^BGP6DPED(Y,,2)
D S^BGP6DPED(" ",1,1)
S X="Goal Setting" D S^BGP6DPED(X,1,1)
S N=11,P=20 D SETN^BGP6DPED
S X="# w/goal set" D S^BGP6DPED(X,1,1)
D H2^BGP6PDL1
S N=11,P=21 D SETN^BGP6DPED
S X="# w/goal not set" D S^BGP6DPED(X,1,1)
D H2^BGP6PDL1
S N=11,P=22 D SETN^BGP6DPED
S X="# w/goal met" D S^BGP6DPED(X,1,1)
D H2^BGP6PDL1
S N=11,P=23 D SETN^BGP6DPED
S X="# w/goal not met" D S^BGP6DPED(X,1,1)
D H2^BGP6PDL1
Q
BGP6DPEF ; IHS/CMI/LAB - IHS gpra print ;
+1 ;;16.1;IHS CLINICAL REPORTING;;MAR 22, 2016;Build 170
+2 ;
+3 ;
7 ;EP
+1 SET X=""
+2 ;S X=$P(^BGPPEIM(BGPIC,0),U,2) D S^BGP6DPED(X,1,1)
DO S^BGP6DPED(" ",1,1)
DO S^BGP6DPED(" ",1,1)
+3 DO H1^BGP6PDL1
+4 DO S^BGP6DPED(" ",1,1)
+5 SET BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
+6 SET BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
+7 SET BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
+8 IF $GET(BGPSEAT)
SET X=$PIECE(^DIBT(BGPSEAT,0),U,1)_" Population w/ Pat Ed"
DO S^BGP6DPED(X,1,1)
+9 IF '$GET(BGPSEAT)
SET X="# User Pop"
DO S^BGP6DPED(X,1,1)
+10 SET Y=BGPCYD_"^^"_BGPPRD_"^^^"_BGPBLD
DO S^BGP6DPED(Y,,2)
+11 DO S^BGP6DPED(" ",1,1)
+12 SET X="Goal Setting"
DO S^BGP6DPED(X,1,1)
+13 SET N=11
SET P=24
DO SETN^BGP6DPED
+14 SET X="# w/goal set"
DO S^BGP6DPED(X,1,1)
+15 DO H2^BGP6PDL1
+16 DO S^BGP6DPED(" ",1,1)
+17 KILL BGPPROVS
+18 SET N=16
DO SETNM^BGP6DPEQ
+19 KILL BGPX
+20 SET BGPCNT=0
+21 SET X=""
SET C=0
FOR
SET X=$ORDER(BGPPROVS(X))
IF X=""
QUIT
SET Y=""
FOR
SET Y=$ORDER(BGPPROVS(X,Y))
IF Y=""
QUIT
SET C=C+1
SET BGPX((9999999-$PIECE(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
+22 SET BGP1=0
FOR
SET BGP1=$ORDER(BGPX(BGP1))
IF BGP1'=+BGP1!(BGPCNT>15)
QUIT
Begin DoDot:1
+23 SET BGPCNT=BGPCNT+1
SET BGP2=0
FOR
SET BGP2=$ORDER(BGPX(BGP1,BGP2))
IF BGP2'=+BGP2
QUIT
Begin DoDot:2
+24 SET X=BGPCNT_". "_$PIECE(BGPX(BGP1,BGP2),U,2)
DO S^BGP6DPED(X,1,1)
+25 SET BGPCYN=$PIECE(BGPX(BGP1,BGP2),U,3)
+26 SET BGPPRN=$PIECE(BGPX(BGP1,BGP2),U,4)
+27 SET BGPBLN=$PIECE(BGPX(BGP1,BGP2),U,5)
+28 SET BGPCYP=$PIECE(BGPX(BGP1,BGP2),U,6)
+29 SET BGPPRP=$PIECE(BGPX(BGP1,BGP2),U,7)
+30 SET BGPBLP=$PIECE(BGPX(BGP1,BGP2),U,8)
+31 DO H2^BGP6PDL1
End DoDot:2
End DoDot:1
NOTSET ;
+1 DO S^BGP6DPED(" ",1,1)
+2 SET BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
+3 SET BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
+4 SET BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
+5 DO S^BGP6DPED(" ",1,1)
+6 SET N=11
SET P=25
DO SETN^BGP6DPED
+7 SET X="# w/goal not set"
DO S^BGP6DPED(X,1,1)
+8 DO H2^BGP6PDL1
+9 DO S^BGP6DPED(" ",1,1)
+10 KILL BGPPROVS
+11 SET N=17
DO SETNM^BGP6DPEQ
+12 KILL BGPX
+13 SET BGPCNT=0
+14 SET X=""
SET C=0
FOR
SET X=$ORDER(BGPPROVS(X))
IF X=""
QUIT
SET Y=""
FOR
SET Y=$ORDER(BGPPROVS(X,Y))
IF Y=""
QUIT
SET C=C+1
SET BGPX((9999999-$PIECE(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
+15 SET BGP1=0
FOR
SET BGP1=$ORDER(BGPX(BGP1))
IF BGP1'=+BGP1!(BGPCNT>15)
QUIT
Begin DoDot:1
+16 SET BGPCNT=BGPCNT+1
SET BGP2=0
FOR
SET BGP2=$ORDER(BGPX(BGP1,BGP2))
IF BGP2'=+BGP2
QUIT
Begin DoDot:2
+17 SET X=BGPCNT_". "_$PIECE(BGPX(BGP1,BGP2),U,2)
DO S^BGP6DPED(X,1,1)
+18 SET BGPCYN=$PIECE(BGPX(BGP1,BGP2),U,3)
+19 SET BGPPRN=$PIECE(BGPX(BGP1,BGP2),U,4)
+20 SET BGPBLN=$PIECE(BGPX(BGP1,BGP2),U,5)
+21 SET BGPCYP=$PIECE(BGPX(BGP1,BGP2),U,6)
+22 SET BGPPRP=$PIECE(BGPX(BGP1,BGP2),U,7)
+23 SET BGPBLP=$PIECE(BGPX(BGP1,BGP2),U,8)
+24 DO H2^BGP6PDL1
End DoDot:2
End DoDot:1
MET ;
+1 DO S^BGP6DPED(" ",1,1)
+2 SET BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
+3 SET BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
+4 SET BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
+5 DO S^BGP6DPED(" ",1,1)
+6 SET N=11
SET P=26
DO SETN^BGP6DPED
+7 SET X="# w/goal met"
DO S^BGP6DPED(X,1,1)
+8 DO H2^BGP6PDL1
+9 DO S^BGP6DPED(" ",1,1)
+10 KILL BGPPROVS
+11 SET N=18
DO SETNM^BGP6DPEQ
+12 KILL BGPX
+13 SET BGPCNT=0
+14 SET X=""
SET C=0
FOR
SET X=$ORDER(BGPPROVS(X))
IF X=""
QUIT
SET Y=""
FOR
SET Y=$ORDER(BGPPROVS(X,Y))
IF Y=""
QUIT
SET C=C+1
SET BGPX((9999999-$PIECE(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
+15 SET BGP1=0
FOR
SET BGP1=$ORDER(BGPX(BGP1))
IF BGP1'=+BGP1!(BGPCNT>15)
QUIT
Begin DoDot:1
+16 SET BGPCNT=BGPCNT+1
SET BGP2=0
FOR
SET BGP2=$ORDER(BGPX(BGP1,BGP2))
IF BGP2'=+BGP2
QUIT
Begin DoDot:2
+17 SET X=BGPCNT_". "_$PIECE(BGPX(BGP1,BGP2),U,2)
DO S^BGP6DPED(X,1,1)
+18 SET BGPCYN=$PIECE(BGPX(BGP1,BGP2),U,3)
+19 SET BGPPRN=$PIECE(BGPX(BGP1,BGP2),U,4)
+20 SET BGPBLN=$PIECE(BGPX(BGP1,BGP2),U,5)
+21 SET BGPCYP=$PIECE(BGPX(BGP1,BGP2),U,6)
+22 SET BGPPRP=$PIECE(BGPX(BGP1,BGP2),U,7)
+23 SET BGPBLP=$PIECE(BGPX(BGP1,BGP2),U,8)
+24 DO H2^BGP6PDL1
End DoDot:2
End DoDot:1
MAIN ;
+1 DO S^BGP6DPED(" ",1,1)
+2 SET BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
+3 SET BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
+4 SET BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
+5 DO S^BGP6DPED(" ",1,1)
+6 SET N=11
SET P=27
DO SETN^BGP6DPED
+7 SET X="# w/goal maintained"
DO S^BGP6DPED(X,1,1)
+8 DO H2^BGP6PDL1
+9 DO S^BGP6DPED(" ",1,1)
+10 KILL BGPPROVS
+11 SET N=19
DO SETNM^BGP6DPEQ
+12 KILL BGPX
+13 SET BGPCNT=0
+14 SET X=""
SET C=0
FOR
SET X=$ORDER(BGPPROVS(X))
IF X=""
QUIT
SET Y=""
FOR
SET Y=$ORDER(BGPPROVS(X,Y))
IF Y=""
QUIT
SET C=C+1
SET BGPX((9999999-$PIECE(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
+15 SET BGP1=0
FOR
SET BGP1=$ORDER(BGPX(BGP1))
IF BGP1'=+BGP1!(BGPCNT>15)
QUIT
Begin DoDot:1
+16 SET BGPCNT=BGPCNT+1
SET BGP2=0
FOR
SET BGP2=$ORDER(BGPX(BGP1,BGP2))
IF BGP2'=+BGP2
QUIT
Begin DoDot:2
+17 SET X=BGPCNT_". "_$PIECE(BGPX(BGP1,BGP2),U,2)
DO S^BGP6DPED(X,1,1)
+18 SET BGPCYN=$PIECE(BGPX(BGP1,BGP2),U,3)
+19 SET BGPPRN=$PIECE(BGPX(BGP1,BGP2),U,4)
+20 SET BGPBLN=$PIECE(BGPX(BGP1,BGP2),U,5)
+21 SET BGPCYP=$PIECE(BGPX(BGP1,BGP2),U,6)
+22 SET BGPPRP=$PIECE(BGPX(BGP1,BGP2),U,7)
+23 SET BGPBLP=$PIECE(BGPX(BGP1,BGP2),U,8)
+24 DO H2^BGP6PDL1
End DoDot:2
End DoDot:1
NOTMET ;
+1 DO S^BGP6DPED(" ",1,1)
+2 SET BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,29)
+3 SET BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,29)
+4 SET BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,29)
+5 DO S^BGP6DPED(" ",1,1)
+6 SET N=11
SET P=28
DO SETN^BGP6DPED
+7 SET X="# w/goal not met"
DO S^BGP6DPED(X,1,1)
+8 DO H2^BGP6PDL1
+9 DO S^BGP6DPED(" ",1,1)
+10 KILL BGPPROVS
+11 SET N=21
DO SETNM^BGP6DPEQ
+12 KILL BGPX
+13 SET BGPCNT=0
+14 SET X=""
SET C=0
FOR
SET X=$ORDER(BGPPROVS(X))
IF X=""
QUIT
SET Y=""
FOR
SET Y=$ORDER(BGPPROVS(X,Y))
IF Y=""
QUIT
SET C=C+1
SET BGPX((9999999-$PIECE(BGPPROVS(X,Y),U,1)),C)=X_U_Y_U_BGPPROVS(X,Y)
+15 SET BGP1=0
FOR
SET BGP1=$ORDER(BGPX(BGP1))
IF BGP1'=+BGP1!(BGPCNT>15)
QUIT
Begin DoDot:1
+16 SET BGPCNT=BGPCNT+1
SET BGP2=0
FOR
SET BGP2=$ORDER(BGPX(BGP1,BGP2))
IF BGP2'=+BGP2
QUIT
Begin DoDot:2
+17 SET X=BGPCNT_". "_$PIECE(BGPX(BGP1,BGP2),U,2)
DO S^BGP6DPED(X,1,1)
+18 SET BGPCYN=$PIECE(BGPX(BGP1,BGP2),U,3)
+19 SET BGPPRN=$PIECE(BGPX(BGP1,BGP2),U,4)
+20 SET BGPBLN=$PIECE(BGPX(BGP1,BGP2),U,5)
+21 SET BGPCYP=$PIECE(BGPX(BGP1,BGP2),U,6)
+22 SET BGPPRP=$PIECE(BGPX(BGP1,BGP2),U,7)
+23 SET BGPBLP=$PIECE(BGPX(BGP1,BGP2),U,8)
+24 DO H2^BGP6PDL1
End DoDot:2
End DoDot:1
+25 ;UPPED
+26 SET X=""
+27 ;S X=$P(^BGPPEIM(BGPIC,0),U,2) D S^BGP6DPED(X,1,1)
DO S^BGP6DPED(" ",1,1)
DO S^BGP6DPED(" ",1,1)
+28 DO H1^BGP6PDL1
+29 DO S^BGP6DPED(" ",1,1)
+30 SET BGPCYD=$$V^BGP6DPED(1,BGPRPT,11,19)
+31 SET BGPPRD=$$V^BGP6DPED(2,BGPRPT,11,19)
+32 SET BGPBLD=$$V^BGP6DPED(3,BGPRPT,11,19)
+33 IF $GET(BGPSEAT)
SET X=$PIECE(^DIBT(BGPSEAT,0),U,1)_" Population w/ Pat Ed"
DO S^BGP6DPED(X,1,1)
+34 IF '$GET(BGPSEAT)
SET X="# User Pop w/ Pat Ed"
DO S^BGP6DPED(X,1,1)
+35 SET Y=BGPCYD_"^^"_BGPPRD_"^^^"_BGPBLD
DO S^BGP6DPED(Y,,2)
+36 DO S^BGP6DPED(" ",1,1)
+37 SET X="Goal Setting"
DO S^BGP6DPED(X,1,1)
+38 SET N=11
SET P=20
DO SETN^BGP6DPED
+39 SET X="# w/goal set"
DO S^BGP6DPED(X,1,1)
+40 DO H2^BGP6PDL1
+41 SET N=11
SET P=21
DO SETN^BGP6DPED
+42 SET X="# w/goal not set"
DO S^BGP6DPED(X,1,1)
+43 DO H2^BGP6PDL1
+44 SET N=11
SET P=22
DO SETN^BGP6DPED
+45 SET X="# w/goal met"
DO S^BGP6DPED(X,1,1)
+46 DO H2^BGP6PDL1
+47 SET N=11
SET P=23
DO SETN^BGP6DPED
+48 SET X="# w/goal not met"
DO S^BGP6DPED(X,1,1)
+49 DO H2^BGP6PDL1
+50 QUIT