BRNUSER ; IHS/PHXAO/TMJ - ROI USER INITAITED WORKLOAD REPORT AND (BY DATE RANGE) ;
;;2.0;RELEASE OF INFO SYSTEM;*1*;APR 10, 2003
;;IHS/OIT/LJF 10/05/2007 PATCH 1 Added choice to print by
; 01/23/2008 PATCH 1 Added date range limits
; 01/242/008 PATCH 1 Added choice of facility
;
;
;
;
BD ;get beginning date
;W !! S DIR(0)="D^::EP",DIR("A")="Enter beginning ROI Initiated Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
W !! S DIR(0)="D^:"_DT_":EP",DIR("A")="Enter beginning ROI Initiated Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1 ;IHS/OIT/LJF 01/23/2008 PATCH 1
I $D(DIRUT) G END
S BRNBD=Y
ED ;get ending date
;W ! S DIR(0)="D^"_BRNBD_"::EP",DIR("A")="Enter ending ROI Initiation Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
W ! S DIR(0)="D^"_BRNBD_":"_DT_":EP",DIR("A")="Enter ending ROI Initiation Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1 ;IHS/OIT/LJF 01/23/2008 PATCH 1
I $D(DIRUT) G BD
S BRNED=Y
S X1=BRNBD,X2=-1 D C^%DTC S BRNSD=X
W !
;
REPORT ; ask which user field to use in reporting workload ;IHS/OIT/LJF 10/05/2007 PATCH 1
NEW BRNROLE
W ! S DIR(0)="S^I:User Who INITIATED Request;A:User Who was ASSIGNED Request;C:User Who CLOSED Request"
S DIR("A")="Select USER'S ROLE for Workload Reporting"
S DIR("?")="There are 3 possible users handling request. For which role do you want a report?"
D ^DIR K DIR
G:$D(DIRUT) BD
S BRNROLE=Y
;IHS/OIT/LJF 10/05/2007 PATCH 1 end of code additions
;
ASK ;Ask if a particular User
S BRNUSE=1,BRNUSE1=10000
;
;IHS/OIT/LJF 10/05/2007 PATCH 1
;W ! S DIR(0)="Y0",DIR("A")="Want to INCLUDE a particular User who Initiated the Disclosure",DIR("B")="NO"
W ! S DIR(0)="Y0",DIR("A")="Want to INCLUDE a particular User",DIR("B")="NO"
;
S DIR("?")="To RESTRICT to a particular User - Answer Yes."
D ^DIR K DIR
G:$D(DIRUT) BD
I 'Y G PRINT
USER ;ROI Disclosure USER
S DIC=200,DIC(0)="AEMQ",DIC("A")="Enter User Name: "
D ^DIC K DIC
Q:$D(DIRUT)
G:Y=0 ASK
S BRNUSE=+Y,BRNUSE1=+Y
;
PRINT ;PRINT CLOSED DISCLOSURES BY DATE
;
;select facility
NEW BRNFAC D ASKFAC^BRNU(.BRNFAC) I BRNFAC="" D END Q ;IHS/OIT/LJF 01/24/2008 PATCH 1
;
;set up print
S FLDS="[BRN DISCLOSURE INFO]",BY(0)="^BRNREC(""AD""," S L(0)=3,DIC="^BRNREC(",L=0
;
;IHS/OIT/LJF 10/05/2007 PATCH 1 reset print template based on user role selected
S FLDS="[BRN DISCLOSURE "_$S(BRNROLE="I":"INFO]",BRNROLE="A":"ASSIGNED]",1:"CLOSED]")
S BY(0)="^BRNREC"_$S(BRNROLE="I":"(""AD"",",BRNROLE="A":"(""AF"",",1:"(""AG"",")
;
S FR(0,1)=BRNUSE,TO(0,1)=BRNUSE1
S FR(0,2)=BRNBD,TO(0,2)=BRNED
I BRNFAC>0 S DIS(0)="I $P(^BRNREC(D0,0),U,22)=BRNFAC" ;IHS/OIT/LJF 01/24/2008 PATCH 1
K DHIT,DIOEND,DIOBEG
D EN1^DIP
END ;
K BRNROLE ;IHS/OIT/LJF 10/05/2007 PATCH 1
K BRNBD,BRNED,BRNSD,BRNUSE,BRNUSE1,X,DD0,B Q
BRNUSER ; IHS/PHXAO/TMJ - ROI USER INITAITED WORKLOAD REPORT AND (BY DATE RANGE) ;
+1 ;;2.0;RELEASE OF INFO SYSTEM;*1*;APR 10, 2003
+2 ;;IHS/OIT/LJF 10/05/2007 PATCH 1 Added choice to print by
+3 ; 01/23/2008 PATCH 1 Added date range limits
+4 ; 01/242/008 PATCH 1 Added choice of facility
+5 ;
+6 ;
+7 ;
+8 ;
BD ;get beginning date
+1 ;W !! S DIR(0)="D^::EP",DIR("A")="Enter beginning ROI Initiated Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
+2 ;IHS/OIT/LJF 01/23/2008 PATCH 1
WRITE !!
SET DIR(0)="D^:"_DT_":EP"
SET DIR("A")="Enter beginning ROI Initiated Date"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+3 IF $DATA(DIRUT)
GOTO END
+4 SET BRNBD=Y
ED ;get ending date
+1 ;W ! S DIR(0)="D^"_BRNBD_"::EP",DIR("A")="Enter ending ROI Initiation Date" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
+2 ;IHS/OIT/LJF 01/23/2008 PATCH 1
WRITE !
SET DIR(0)="D^"_BRNBD_":"_DT_":EP"
SET DIR("A")="Enter ending ROI Initiation Date"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+3 IF $DATA(DIRUT)
GOTO BD
+4 SET BRNED=Y
+5 SET X1=BRNBD
SET X2=-1
DO C^%DTC
SET BRNSD=X
+6 WRITE !
+7 ;
REPORT ; ask which user field to use in reporting workload ;IHS/OIT/LJF 10/05/2007 PATCH 1
+1 NEW BRNROLE
+2 WRITE !
SET DIR(0)="S^I:User Who INITIATED Request;A:User Who was ASSIGNED Request;C:User Who CLOSED Request"
+3 SET DIR("A")="Select USER'S ROLE for Workload Reporting"
+4 SET DIR("?")="There are 3 possible users handling request. For which role do you want a report?"
+5 DO ^DIR
KILL DIR
+6 IF $DATA(DIRUT)
GOTO BD
+7 SET BRNROLE=Y
+8 ;IHS/OIT/LJF 10/05/2007 PATCH 1 end of code additions
+9 ;
ASK ;Ask if a particular User
+1 SET BRNUSE=1
SET BRNUSE1=10000
+2 ;
+3 ;IHS/OIT/LJF 10/05/2007 PATCH 1
+4 ;W ! S DIR(0)="Y0",DIR("A")="Want to INCLUDE a particular User who Initiated the Disclosure",DIR("B")="NO"
+5 WRITE !
SET DIR(0)="Y0"
SET DIR("A")="Want to INCLUDE a particular User"
SET DIR("B")="NO"
+6 ;
+7 SET DIR("?")="To RESTRICT to a particular User - Answer Yes."
+8 DO ^DIR
KILL DIR
+9 IF $DATA(DIRUT)
GOTO BD
+10 IF 'Y
GOTO PRINT
USER ;ROI Disclosure USER
+1 SET DIC=200
SET DIC(0)="AEMQ"
SET DIC("A")="Enter User Name: "
+2 DO ^DIC
KILL DIC
+3 IF $DATA(DIRUT)
QUIT
+4 IF Y=0
GOTO ASK
+5 SET BRNUSE=+Y
SET BRNUSE1=+Y
+6 ;
PRINT ;PRINT CLOSED DISCLOSURES BY DATE
+1 ;
+2 ;select facility
+3 ;IHS/OIT/LJF 01/24/2008 PATCH 1
NEW BRNFAC
DO ASKFAC^BRNU(.BRNFAC)
IF BRNFAC=""
DO END
QUIT
+4 ;
+5 ;set up print
+6 SET FLDS="[BRN DISCLOSURE INFO]"
SET BY(0)="^BRNREC(""AD"","
SET L(0)=3
SET DIC="^BRNREC("
SET L=0
+7 ;
+8 ;IHS/OIT/LJF 10/05/2007 PATCH 1 reset print template based on user role selected
+9 SET FLDS="[BRN DISCLOSURE "_$SELECT(BRNROLE="I":"INFO]",BRNROLE="A":"ASSIGNED]",1:"CLOSED]")
+10 SET BY(0)="^BRNREC"_$SELECT(BRNROLE="I":"(""AD"",",BRNROLE="A":"(""AF"",",1:"(""AG"",")
+11 ;
+12 SET FR(0,1)=BRNUSE
SET TO(0,1)=BRNUSE1
+13 SET FR(0,2)=BRNBD
SET TO(0,2)=BRNED
+14 ;IHS/OIT/LJF 01/24/2008 PATCH 1
IF BRNFAC>0
SET DIS(0)="I $P(^BRNREC(D0,0),U,22)=BRNFAC"
+15 KILL DHIT,DIOEND,DIOBEG
+16 DO EN1^DIP
END ;
+1 ;IHS/OIT/LJF 10/05/2007 PATCH 1
KILL BRNROLE
+2 KILL BRNBD,BRNED,BRNSD,BRNUSE,BRNUSE1,X,DD0,B
QUIT