BGP2GR2 ; IHS/CMI/LAB - BGPG Visual CRS Reports 12/30/2004 12:29:35 PM 27 Apr 2010 10:30 PM ;
;;12.1;IHS CLINICAL REPORTING;;MAY 17, 2012;Build 66
;
;
CATSTR(BGPSRET,STR) ;EP
N BGPDA
S BGPSRET=""
S BGPDA=0 F S BGPDA=$O(STR(BGPDA)) Q:'BGPDA D
. S BGPSRET=BGPSRET_$G(STR(BGPDA))
Q
;
XP(RETVAL,BGPSTR) ;EP
S X="MERR^BGP2GU",@^%ZOSF("TRAP")
N BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPEX,BGPLD,BGPRT
;BGPCT = COMMUNITY TAXONOMY IEN OR NAME
;BGPEX = EXPORT 1 or 0
;BGPLD = local files 1 or 0
;BGPRT = time to run report
;
W !,BOMB
S P="|",R="~"
S BGPI=0
S BGPERR=""
S BGPCT=$P($P(BGPSTR,P),R)
I $P(BGPCT,R)'?.N S BGPCT=$O(^ATXAX("B",BGPCT,0))
;S BGPCT=$O(^ATXAX("B",BGPCT,0))
S BGPEX=$P(BGPSTR,P,2)
S BGPLD=$P(BGPSTR,P,3)
S BGPOPT="CR 11 COMPREHENSIVE NATIONAL EXPORT"
S BGPMFITI=$P(BGPSTR,P,4) ;added for mfi v6.1
S BGPRT=$P(BGPSTR,P,5)
K ^BGPTMP($J)
S RETVAL="^BGPTMP("_$J_")"
S ^BGPTMP($J,BGPI)="T00250DATA"_$C(30)
D EP^BGP2GNXP(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPCT,BGPEX,BGPLD,BGPMFITI,BGPRT)
S BGPI=BGPI+1
S ^BGPTMP($J,BGPI)=+$G(BGPERR)_$C(30)
S ^BGPTMP($J,BGPI+1)=$C(31)
D EN^XBVK("BGP")
Q
;
PED(RETVAL,BGPSTR) ;EP
S X="MERR^BGP2GU",@^%ZOSF("TRAP") ; m error trap
N BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPOT,BGPOPT,BGPRT,P,R,A,BGPFN,BGPRBG
N BGPTP,BGPQTR,BGPRDT,BGPRE,BGPBAS,BGPPATT,BGPLIST,BGPPRV,BGPPROV,BGPEXP,BGPIND
S P="|",R="~",A="*"
I $G(BGPSTR)="" D CATSTR(.BGPSTR,.BGPSTR)
S BGPI=0
S BGPERR=""
S BGPCT=$P($P(BGPSTR,P),R)
I $P(BGPCT,R)'?.N S BGPCT=$O(^ATXAX("B",BGPCT,0))
S BGPTP=$P(BGPSTR,P,2)
S BGPQTR=$P(BGPSTR,P,3)
S BGPRDT=$P(BGPSTR,P,4)
S BGPRBG=$P(BGPSTR,P,5)
S BGPOPT="CRS 12 PATIENT EDUCATION REPORT"
S BGPBAS=$P(BGPSTR,P,6)
S BGPPATT=$P(BGPSTR,P,7)
S BGPLIST=$P(BGPSTR,P,8)
S BGPPRV=$P($P(BGPSTR,P,9),R)
S BGPPROV=$P($P(BGPSTR,P,9),R,2)
S BGPEXP=$P(BGPSTR,P,10)
S BGPOT=$P(BGPSTR,P,11)
S BGPINDI=$P(BGPSTR,P,13)
S BGPLSTI=$P(BGPSTR,P,12)
S BGPMFITI=$P(BGPSTR,P,14)
S BGPRE=$P(BGPSTR,P,15)
S BGPFN=$P(BGPSTR,P,16)
N I
F I=2:1 D Q:$P(BGPLSTI,A,I)=""
. Q:$P(BGPLSTI,A,I)=""
. N BGPL
. S BGPL=$P($P(BGPLSTI,A,I),R)
. S BGPLIST(BGPL)=""
N J
F J=2:1 D Q:$P(BGPINDI,A,J)=""
. Q:$P(BGPINDI,A,J)=""
. N BGPL
. S BGPL=$P($P(BGPINDI,A,J),R)
. S BGPIND(BGPL)=""
K ^BGPTMP($J)
S RETVAL="^BGPTMP("_$J_")"
S ^BGPTMP($J,BGPI)="T00250DATA"_$C(30)
D EP^BGP2GPED(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPCT,BGPTP,.BGPIND,BGPQTR,BGPRE,BGPBAS,BGPPATT,BGPLIST,.BGPLIST,BGPPRV,BGPPROV,BGPEXP,BGPOT,BGPRDT,BGPMFITI,BGPFN,"",BGPRBG)
S BGPI=BGPI+1
S ^BGPTMP($J,BGPI)=$G(BGPERR)_$C(30)
S ^BGPTMP($J,BGPI+1)=$C(31)
D EN^XBVK("BGP")
Q
;
PEDPP(RETVAL,BGPSTR) ;EP
S X="MERR^BGP2GU",@^%ZOSF("TRAP") ; m error trap
N BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPST,BGPOT,BGPOPT,BGPRT,P,R,A,BGPFN,BGPSTMP,BGPRBG
N BGPTP,BGPQTR,BGPRDT,BGPRE,BGPBAS,BGPPATT,BGPLIST,BGPPRV,BGPPROV,BGPEXP,BGPIND
S P="|",R="~",A="*"
I $G(BGPSTR)="" D CATSTR(.BGPSTR,.BGPSTR)
S BGPI=0
S BGPERR=""
S BGPST=$P($P(BGPSTR,P),R)
I $P(BGPST,R)'?.N S BGPST=$O(^DIBT("B",BGPST,0))
S BGPTP=$P(BGPSTR,P,2)
S BGPQTR=$P(BGPSTR,P,3)
S BGPRDT=$P(BGPSTR,P,4)
S BGPRBG=$P(BGPSTR,P,5)
S BGPOPT="CRS 12 PATIENT EDUCATION REPORT"
S BGPBAS=$P(BGPSTR,P,6)
S BGPPATT=$P(BGPSTR,P,7)
S BGPLIST=$P(BGPSTR,P,8)
S BGPPRV=$P($P(BGPSTR,P,9),R)
S BGPPROV=$P($P(BGPSTR,P,9),R,2)
S BGPEXP=$P(BGPSTR,P,10)
S BGPOT=$P(BGPSTR,P,11)
S BGPINDI=$P(BGPSTR,P,13)
S BGPLSTI=$P(BGPSTR,P,12)
S BGPMFITI=$P(BGPSTR,P,14)
S BGPRE=$P(BGPSTR,P,15)
S BGPFN=$P(BGPSTR,P,16)
N I
F I=2:1 D Q:$P(BGPLSTI,A,I)=""
. Q:$P(BGPLSTI,A,I)=""
. N BGPL
. S BGPL=$P($P(BGPLSTI,A,I),R)
. S BGPLIST(BGPL)=""
N J
F J=2:1 D Q:$P(BGPINDI,A,J)=""
. Q:$P(BGPINDI,A,J)=""
. N BGPL
. S BGPL=$P($P(BGPINDI,A,J),R)
. S BGPIND(BGPL)=""
K ^BGPTMP($J)
S RETVAL="^BGPTMP("_$J_")"
S ^BGPTMP($J,BGPI)="T00250DATA"_$C(30)
D EP^BGP2GPED(.BGPERR,DUZ,DUZ(2),BGPOPT,"",BGPTP,.BGPIND,BGPQTR,BGPRE,BGPBAS,BGPPATT,BGPLIST,.BGPLIST,BGPPRV,BGPPROV,BGPEXP,BGPOT,BGPRDT,BGPMFITI,BGPFN,BGPST,BGPRBG)
S BGPI=BGPI+1
S ^BGPTMP($J,BGPI)=$G(BGPERR)_$C(30)
S ^BGPTMP($J,BGPI+1)=$C(31)
D EN^XBVK("BGP")
Q
;
LHW(RETVAL,BGPSTR) ;EP
S X="MERR^BGP2GU",@^%ZOSF("TRAP")
N BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPEX,BGPLD,BGPRT,BGPMFITI,BGPOM,BGPOT,BGPFN
;BGPCT = COMMUNITY TAXONOMY IEN OR NAME
;BGPEX = EXPORT 1 or 0
;BGPLD = local files 1 or 0
;BGPRT = time to run report
;
S P="|",R="~"
S BGPI=0
S BGPERR=""
S BGPCT=$P($P(BGPSTR,P),R)
I $P(BGPCT,R)'?.N S BGPCT=$O(^ATXAX("B",BGPCT,0))
;S BGPCT=$O(^ATXAX("B",BGPCT,0))
S BGPOM=$P(BGPSTR,P,3)
S BGPOPT="CRS 12 LOCAL HT/WT"
S BGPMFITI=$P(BGPSTR,P,2) ;added for mfi v6.1
S BGPRT=$P(BGPSTR,P,5)
S BGPOT=$P(BGPSTR,P,4)
S BGPFN=$P(BGPSTR,P,6)
K ^BGPTMP($J)
S RETVAL="^BGPTMP("_$J_")"
S ^BGPTMP($J,BGPI)="T00250DATA"_$C(30)
D EP^BGP2GLHW(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPCT,BGPMFITI,BGPOM,BGPOT,BGPRT,BGPFN)
S BGPI=BGPI+1
S ^BGPTMP($J,BGPI)=$G(BGPERR)_$C(30)
S ^BGPTMP($J,BGPI+1)=$C(31)
D EN^XBVK("BGP")
Q
;
CMP(RETVAL,BGPSTR) ;EP
S X="MERR^BGP2GU",@^%ZOSF("TRAP")
N BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPQTR,BGPRDT,BGPRE,BGPLIST,BGPPRV,BGPPROV,BGPOT,BGPOPT,BGPRT,R
N BGPBEN,BGPBLDT,BGPFN
S P="|",R="~"
S BGPI=0
S BGPERR=""
S BGPCT=$P($P(BGPSTR,P),R)
I $P(BGPCT,R)'?.N S BGPCT=$O(^ATXAX("B",BGPCT,0))
S BGPQTR=$P(BGPSTR,P,2)
S BGPRDT=$P(BGPSTR,P,3)
S BGPRE=$P(BGPSTR,P,4)
S BGPOPT="CRS 12 NATIONAL GPRA COMPREHENSIVE PATIENT LIST"
S BGPLIST=$P(BGPSTR,P,5)
S BGPPRV=$P($P(BGPSTR,P,6),R)
S BGPPROV=$P($P(BGPSTR,P,6),R,2)
S BGPOT=$P(BGPSTR,P,7)
S BGPMFITI=$P(BGPSTR,P,8)
S BGPBLDT=$P(BGPSTR,P,9)
S BGPBEN=$P(BGPSTR,P,10)
S BGPFN=$P(BGPSTR,P,11)
K ^BGPTMP($J)
S RETVAL="^BGPTMP("_$J_")"
S ^BGPTMP($J,BGPI)="T00250DATA"_$C(30)
D EP^BGP2GCMP(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPLIST,BGPPRV,BGPPROV,BGPQTR,BGPRE,BGPCT,BGPOT,BGPRDT,BGPMFITI,BGPBLDT,BGPBEN,BGPFN)
S BGPI=BGPI+1
S ^BGPTMP($J,BGPI)=+$G(BGPERR)_$C(30)
S ^BGPTMP($J,BGPI+1)=$C(31)
D EN^XBVK("BGP")
Q
;
DASH(RETVAL,BGPSTR) ;-- dashboard report
S X="MERR^BGP2GU",@^%ZOSF("TRAP")
N BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPYN,BGPOT,BGPOPT,BGPRT,R,BGPOM,BGPFN
S P="|",R="~"
S BGPI=0
S BGPERR=""
S BGPCT=$P($P(BGPSTR,P),R)
I $P(BGPCT,R)'?.N S BGPCT=$O(^ATXAX("B",BGPCT,0))
S BGPYN=$P(BGPSTR,P,2)
S BGPOT=$P(BGPSTR,P,3)
S BGPOPT=$P(BGPSTR,P,4)
S BGPOPT="CRS 12 NATIONAL GPRA DASHBOARD REPORT"
S BGPRT=$P(BGPSTR,P,5)
S BGPMFITI=$P(BGPSTR,P,6)
S BGPYWCHW=$P(BGPSTR,P,7)
S BGPOM=$P(BGPSTR,P,8)
S BGPFN=$P(BGPSTR,P,9)
K ^BGPTMP($J)
S RETVAL="^BGPTMP("_$J_")"
S ^BGPTMP($J,BGPI)="T00250DATA"_$C(30)
D EP^BGP2GDSH(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPCT,BGPOT,BGPRT,BGPMFITI,BGPFN)
S BGPI=BGPI+1
S ^BGPTMP($J,BGPI)=$G(BGPERR)_$C(30)
S ^BGPTMP($J,BGPI+1)=$C(31)
D EN^XBVK("BGP")
Q
;
BGP2GR2 ; IHS/CMI/LAB - BGPG Visual CRS Reports 12/30/2004 12:29:35 PM 27 Apr 2010 10:30 PM ;
+1 ;;12.1;IHS CLINICAL REPORTING;;MAY 17, 2012;Build 66
+2 ;
+3 ;
CATSTR(BGPSRET,STR) ;EP
+1 NEW BGPDA
+2 SET BGPSRET=""
+3 SET BGPDA=0
FOR
SET BGPDA=$ORDER(STR(BGPDA))
IF 'BGPDA
QUIT
Begin DoDot:1
+4 SET BGPSRET=BGPSRET_$GET(STR(BGPDA))
End DoDot:1
+5 QUIT
+6 ;
XP(RETVAL,BGPSTR) ;EP
+1 SET X="MERR^BGP2GU"
SET @^%ZOSF("TRAP")
+2 NEW BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPEX,BGPLD,BGPRT
+3 ;BGPCT = COMMUNITY TAXONOMY IEN OR NAME
+4 ;BGPEX = EXPORT 1 or 0
+5 ;BGPLD = local files 1 or 0
+6 ;BGPRT = time to run report
+7 ;
+8 WRITE !,BOMB
+9 SET P="|"
SET R="~"
+10 SET BGPI=0
+11 SET BGPERR=""
+12 SET BGPCT=$PIECE($PIECE(BGPSTR,P),R)
+13 IF $PIECE(BGPCT,R)'?.N
SET BGPCT=$ORDER(^ATXAX("B",BGPCT,0))
+14 ;S BGPCT=$O(^ATXAX("B",BGPCT,0))
+15 SET BGPEX=$PIECE(BGPSTR,P,2)
+16 SET BGPLD=$PIECE(BGPSTR,P,3)
+17 SET BGPOPT="CR 11 COMPREHENSIVE NATIONAL EXPORT"
+18 ;added for mfi v6.1
SET BGPMFITI=$PIECE(BGPSTR,P,4)
+19 SET BGPRT=$PIECE(BGPSTR,P,5)
+20 KILL ^BGPTMP($JOB)
+21 SET RETVAL="^BGPTMP("_$JOB_")"
+22 SET ^BGPTMP($JOB,BGPI)="T00250DATA"_$CHAR(30)
+23 DO EP^BGP2GNXP(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPCT,BGPEX,BGPLD,BGPMFITI,BGPRT)
+24 SET BGPI=BGPI+1
+25 SET ^BGPTMP($JOB,BGPI)=+$GET(BGPERR)_$CHAR(30)
+26 SET ^BGPTMP($JOB,BGPI+1)=$CHAR(31)
+27 DO EN^XBVK("BGP")
+28 QUIT
+29 ;
PED(RETVAL,BGPSTR) ;EP
+1 ; m error trap
SET X="MERR^BGP2GU"
SET @^%ZOSF("TRAP")
+2 NEW BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPOT,BGPOPT,BGPRT,P,R,A,BGPFN,BGPRBG
+3 NEW BGPTP,BGPQTR,BGPRDT,BGPRE,BGPBAS,BGPPATT,BGPLIST,BGPPRV,BGPPROV,BGPEXP,BGPIND
+4 SET P="|"
SET R="~"
SET A="*"
+5 IF $GET(BGPSTR)=""
DO CATSTR(.BGPSTR,.BGPSTR)
+6 SET BGPI=0
+7 SET BGPERR=""
+8 SET BGPCT=$PIECE($PIECE(BGPSTR,P),R)
+9 IF $PIECE(BGPCT,R)'?.N
SET BGPCT=$ORDER(^ATXAX("B",BGPCT,0))
+10 SET BGPTP=$PIECE(BGPSTR,P,2)
+11 SET BGPQTR=$PIECE(BGPSTR,P,3)
+12 SET BGPRDT=$PIECE(BGPSTR,P,4)
+13 SET BGPRBG=$PIECE(BGPSTR,P,5)
+14 SET BGPOPT="CRS 12 PATIENT EDUCATION REPORT"
+15 SET BGPBAS=$PIECE(BGPSTR,P,6)
+16 SET BGPPATT=$PIECE(BGPSTR,P,7)
+17 SET BGPLIST=$PIECE(BGPSTR,P,8)
+18 SET BGPPRV=$PIECE($PIECE(BGPSTR,P,9),R)
+19 SET BGPPROV=$PIECE($PIECE(BGPSTR,P,9),R,2)
+20 SET BGPEXP=$PIECE(BGPSTR,P,10)
+21 SET BGPOT=$PIECE(BGPSTR,P,11)
+22 SET BGPINDI=$PIECE(BGPSTR,P,13)
+23 SET BGPLSTI=$PIECE(BGPSTR,P,12)
+24 SET BGPMFITI=$PIECE(BGPSTR,P,14)
+25 SET BGPRE=$PIECE(BGPSTR,P,15)
+26 SET BGPFN=$PIECE(BGPSTR,P,16)
+27 NEW I
+28 FOR I=2:1
Begin DoDot:1
+29 IF $PIECE(BGPLSTI,A,I)=""
QUIT
+30 NEW BGPL
+31 SET BGPL=$PIECE($PIECE(BGPLSTI,A,I),R)
+32 SET BGPLIST(BGPL)=""
End DoDot:1
IF $PIECE(BGPLSTI,A,I)=""
QUIT
+33 NEW J
+34 FOR J=2:1
Begin DoDot:1
+35 IF $PIECE(BGPINDI,A,J)=""
QUIT
+36 NEW BGPL
+37 SET BGPL=$PIECE($PIECE(BGPINDI,A,J),R)
+38 SET BGPIND(BGPL)=""
End DoDot:1
IF $PIECE(BGPINDI,A,J)=""
QUIT
+39 KILL ^BGPTMP($JOB)
+40 SET RETVAL="^BGPTMP("_$JOB_")"
+41 SET ^BGPTMP($JOB,BGPI)="T00250DATA"_$CHAR(30)
+42 DO EP^BGP2GPED(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPCT,BGPTP,.BGPIND,BGPQTR,BGPRE,BGPBAS,BGPPATT,BGPLIST,.BGPLIST,BGPPRV,BGPPROV,BGPEXP,BGPOT,BGPRDT,BGPMFITI,BGPFN,"",BGPRBG)
+43 SET BGPI=BGPI+1
+44 SET ^BGPTMP($JOB,BGPI)=$GET(BGPERR)_$CHAR(30)
+45 SET ^BGPTMP($JOB,BGPI+1)=$CHAR(31)
+46 DO EN^XBVK("BGP")
+47 QUIT
+48 ;
PEDPP(RETVAL,BGPSTR) ;EP
+1 ; m error trap
SET X="MERR^BGP2GU"
SET @^%ZOSF("TRAP")
+2 NEW BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPST,BGPOT,BGPOPT,BGPRT,P,R,A,BGPFN,BGPSTMP,BGPRBG
+3 NEW BGPTP,BGPQTR,BGPRDT,BGPRE,BGPBAS,BGPPATT,BGPLIST,BGPPRV,BGPPROV,BGPEXP,BGPIND
+4 SET P="|"
SET R="~"
SET A="*"
+5 IF $GET(BGPSTR)=""
DO CATSTR(.BGPSTR,.BGPSTR)
+6 SET BGPI=0
+7 SET BGPERR=""
+8 SET BGPST=$PIECE($PIECE(BGPSTR,P),R)
+9 IF $PIECE(BGPST,R)'?.N
SET BGPST=$ORDER(^DIBT("B",BGPST,0))
+10 SET BGPTP=$PIECE(BGPSTR,P,2)
+11 SET BGPQTR=$PIECE(BGPSTR,P,3)
+12 SET BGPRDT=$PIECE(BGPSTR,P,4)
+13 SET BGPRBG=$PIECE(BGPSTR,P,5)
+14 SET BGPOPT="CRS 12 PATIENT EDUCATION REPORT"
+15 SET BGPBAS=$PIECE(BGPSTR,P,6)
+16 SET BGPPATT=$PIECE(BGPSTR,P,7)
+17 SET BGPLIST=$PIECE(BGPSTR,P,8)
+18 SET BGPPRV=$PIECE($PIECE(BGPSTR,P,9),R)
+19 SET BGPPROV=$PIECE($PIECE(BGPSTR,P,9),R,2)
+20 SET BGPEXP=$PIECE(BGPSTR,P,10)
+21 SET BGPOT=$PIECE(BGPSTR,P,11)
+22 SET BGPINDI=$PIECE(BGPSTR,P,13)
+23 SET BGPLSTI=$PIECE(BGPSTR,P,12)
+24 SET BGPMFITI=$PIECE(BGPSTR,P,14)
+25 SET BGPRE=$PIECE(BGPSTR,P,15)
+26 SET BGPFN=$PIECE(BGPSTR,P,16)
+27 NEW I
+28 FOR I=2:1
Begin DoDot:1
+29 IF $PIECE(BGPLSTI,A,I)=""
QUIT
+30 NEW BGPL
+31 SET BGPL=$PIECE($PIECE(BGPLSTI,A,I),R)
+32 SET BGPLIST(BGPL)=""
End DoDot:1
IF $PIECE(BGPLSTI,A,I)=""
QUIT
+33 NEW J
+34 FOR J=2:1
Begin DoDot:1
+35 IF $PIECE(BGPINDI,A,J)=""
QUIT
+36 NEW BGPL
+37 SET BGPL=$PIECE($PIECE(BGPINDI,A,J),R)
+38 SET BGPIND(BGPL)=""
End DoDot:1
IF $PIECE(BGPINDI,A,J)=""
QUIT
+39 KILL ^BGPTMP($JOB)
+40 SET RETVAL="^BGPTMP("_$JOB_")"
+41 SET ^BGPTMP($JOB,BGPI)="T00250DATA"_$CHAR(30)
+42 DO EP^BGP2GPED(.BGPERR,DUZ,DUZ(2),BGPOPT,"",BGPTP,.BGPIND,BGPQTR,BGPRE,BGPBAS,BGPPATT,BGPLIST,.BGPLIST,BGPPRV,BGPPROV,BGPEXP,BGPOT,BGPRDT,BGPMFITI,BGPFN,BGPST,BGPRBG)
+43 SET BGPI=BGPI+1
+44 SET ^BGPTMP($JOB,BGPI)=$GET(BGPERR)_$CHAR(30)
+45 SET ^BGPTMP($JOB,BGPI+1)=$CHAR(31)
+46 DO EN^XBVK("BGP")
+47 QUIT
+48 ;
LHW(RETVAL,BGPSTR) ;EP
+1 SET X="MERR^BGP2GU"
SET @^%ZOSF("TRAP")
+2 NEW BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPEX,BGPLD,BGPRT,BGPMFITI,BGPOM,BGPOT,BGPFN
+3 ;BGPCT = COMMUNITY TAXONOMY IEN OR NAME
+4 ;BGPEX = EXPORT 1 or 0
+5 ;BGPLD = local files 1 or 0
+6 ;BGPRT = time to run report
+7 ;
+8 SET P="|"
SET R="~"
+9 SET BGPI=0
+10 SET BGPERR=""
+11 SET BGPCT=$PIECE($PIECE(BGPSTR,P),R)
+12 IF $PIECE(BGPCT,R)'?.N
SET BGPCT=$ORDER(^ATXAX("B",BGPCT,0))
+13 ;S BGPCT=$O(^ATXAX("B",BGPCT,0))
+14 SET BGPOM=$PIECE(BGPSTR,P,3)
+15 SET BGPOPT="CRS 12 LOCAL HT/WT"
+16 ;added for mfi v6.1
SET BGPMFITI=$PIECE(BGPSTR,P,2)
+17 SET BGPRT=$PIECE(BGPSTR,P,5)
+18 SET BGPOT=$PIECE(BGPSTR,P,4)
+19 SET BGPFN=$PIECE(BGPSTR,P,6)
+20 KILL ^BGPTMP($JOB)
+21 SET RETVAL="^BGPTMP("_$JOB_")"
+22 SET ^BGPTMP($JOB,BGPI)="T00250DATA"_$CHAR(30)
+23 DO EP^BGP2GLHW(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPCT,BGPMFITI,BGPOM,BGPOT,BGPRT,BGPFN)
+24 SET BGPI=BGPI+1
+25 SET ^BGPTMP($JOB,BGPI)=$GET(BGPERR)_$CHAR(30)
+26 SET ^BGPTMP($JOB,BGPI+1)=$CHAR(31)
+27 DO EN^XBVK("BGP")
+28 QUIT
+29 ;
CMP(RETVAL,BGPSTR) ;EP
+1 SET X="MERR^BGP2GU"
SET @^%ZOSF("TRAP")
+2 NEW BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPQTR,BGPRDT,BGPRE,BGPLIST,BGPPRV,BGPPROV,BGPOT,BGPOPT,BGPRT,R
+3 NEW BGPBEN,BGPBLDT,BGPFN
+4 SET P="|"
SET R="~"
+5 SET BGPI=0
+6 SET BGPERR=""
+7 SET BGPCT=$PIECE($PIECE(BGPSTR,P),R)
+8 IF $PIECE(BGPCT,R)'?.N
SET BGPCT=$ORDER(^ATXAX("B",BGPCT,0))
+9 SET BGPQTR=$PIECE(BGPSTR,P,2)
+10 SET BGPRDT=$PIECE(BGPSTR,P,3)
+11 SET BGPRE=$PIECE(BGPSTR,P,4)
+12 SET BGPOPT="CRS 12 NATIONAL GPRA COMPREHENSIVE PATIENT LIST"
+13 SET BGPLIST=$PIECE(BGPSTR,P,5)
+14 SET BGPPRV=$PIECE($PIECE(BGPSTR,P,6),R)
+15 SET BGPPROV=$PIECE($PIECE(BGPSTR,P,6),R,2)
+16 SET BGPOT=$PIECE(BGPSTR,P,7)
+17 SET BGPMFITI=$PIECE(BGPSTR,P,8)
+18 SET BGPBLDT=$PIECE(BGPSTR,P,9)
+19 SET BGPBEN=$PIECE(BGPSTR,P,10)
+20 SET BGPFN=$PIECE(BGPSTR,P,11)
+21 KILL ^BGPTMP($JOB)
+22 SET RETVAL="^BGPTMP("_$JOB_")"
+23 SET ^BGPTMP($JOB,BGPI)="T00250DATA"_$CHAR(30)
+24 DO EP^BGP2GCMP(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPLIST,BGPPRV,BGPPROV,BGPQTR,BGPRE,BGPCT,BGPOT,BGPRDT,BGPMFITI,BGPBLDT,BGPBEN,BGPFN)
+25 SET BGPI=BGPI+1
+26 SET ^BGPTMP($JOB,BGPI)=+$GET(BGPERR)_$CHAR(30)
+27 SET ^BGPTMP($JOB,BGPI+1)=$CHAR(31)
+28 DO EN^XBVK("BGP")
+29 QUIT
+30 ;
DASH(RETVAL,BGPSTR) ;-- dashboard report
+1 SET X="MERR^BGP2GU"
SET @^%ZOSF("TRAP")
+2 NEW BGPI,BGPJ,BGPDATA,BGPDA,P,BGPERR,BGPCT,BGPYN,BGPOT,BGPOPT,BGPRT,R,BGPOM,BGPFN
+3 SET P="|"
SET R="~"
+4 SET BGPI=0
+5 SET BGPERR=""
+6 SET BGPCT=$PIECE($PIECE(BGPSTR,P),R)
+7 IF $PIECE(BGPCT,R)'?.N
SET BGPCT=$ORDER(^ATXAX("B",BGPCT,0))
+8 SET BGPYN=$PIECE(BGPSTR,P,2)
+9 SET BGPOT=$PIECE(BGPSTR,P,3)
+10 SET BGPOPT=$PIECE(BGPSTR,P,4)
+11 SET BGPOPT="CRS 12 NATIONAL GPRA DASHBOARD REPORT"
+12 SET BGPRT=$PIECE(BGPSTR,P,5)
+13 SET BGPMFITI=$PIECE(BGPSTR,P,6)
+14 SET BGPYWCHW=$PIECE(BGPSTR,P,7)
+15 SET BGPOM=$PIECE(BGPSTR,P,8)
+16 SET BGPFN=$PIECE(BGPSTR,P,9)
+17 KILL ^BGPTMP($JOB)
+18 SET RETVAL="^BGPTMP("_$JOB_")"
+19 SET ^BGPTMP($JOB,BGPI)="T00250DATA"_$CHAR(30)
+20 DO EP^BGP2GDSH(.BGPERR,DUZ,DUZ(2),BGPOPT,BGPCT,BGPOT,BGPRT,BGPMFITI,BGPFN)
+21 SET BGPI=BGPI+1
+22 SET ^BGPTMP($JOB,BGPI)=$GET(BGPERR)_$CHAR(30)
+23 SET ^BGPTMP($JOB,BGPI+1)=$CHAR(31)
+24 DO EN^XBVK("BGP")
+25 QUIT
+26 ;