SCRPW302 ;BPFO/JRC - Performance Monitor Report Utils; 30 Jul 2003
;;5.3;SCHEDULING;**292,1015**;AUG 13, 2003;Build 21
;
TLMT(SCRNARR) ; Set Time Limit into screen array
;Input : SCRNARR - Screen array full global reference
;Output : 1 = OK 0 = User abort/timeout
; @SCRNARR@("TLMT") = Time Limit (days)
;Note : @SCRNARR@("TLMT") is initialized (KILLed) on input
;
; Declare variables
N DIR,X,Y,DIRUT,DIROUT,DTOUT,DUOUT
K @SCRNARR@("TLMT")
; Prompt user for number of days
S DIR(0)="N^2:100:0"
S DIR("A")="Enter number of days for Elapsed Time: "
S DIR("B")=10
D ^DIR
I $D(DIRUT) Q 0
S @SCRNARR@("TLMT")=X
Q 1
;
DATE(MIN,MAX,SCRNARR) ; Set Date Range into screen array
;Input : SCRNARR - Screen array full global reference
; MIN - Minimum date (FileMan) (default to MAX - time limit)
; MAX - Maximum date (FileMan) (default to T - time limit)
; @SCRNARR@("TLMT") - Time limit (optional - default to 10)
;Output : 1 = OK 0 = User abort/timeout
; @SCRNARR@("RANGE") = StartDate^EndDate
;Note : @SCRNARR@("RANGE") is initialized (KILLed) on input
;
;Declare variables
N STDATE,ENDDATE,DATE,DIR,X,Y,TLMT,DIRUT,DIROUT,DTOUT,DUOUT
K @SCRNARR@("RANGE")
S MIN=$P($G(MIN),".",1)
S MAX=$P($G(MAX),".",1)
;Get time limit out of screen array (default to 10)
S TLMT=+$G(@SCRNARR@("TLMT")) S:'TLMT TLMT=10
;Maximum date can't be more then Today minus time limit
S DATE=$$FMADD^XLFDT($$DT^XLFDT(),-TLMT)
I ('MAX)!(MAX>DATE) S MAX=DATE
;Minimum date can't be after maximum date
I (MAX'>MIN) S MIN=$$FMADD^XLFDT(MAX,-TLMT)
;Prompt user for start date
S DIR(0)="D^"_MIN_":"_MAX_":PEX"
S DIR("A")="Enter Report Start Date"
S DATE=$S('MIN:$$FMADD^XLFDT(MAX,-TLMT),1:MIN)
S DIR("B")=$$FMTE^XLFDT(DATE,"5D")
D ^DIR
I $D(DIRUT) Q 0
S STDATE=Y
;Prompt user for end date
K DIR,X,Y
S MIN=STDATE
S DIR(0)="D^"_MIN_":"_MAX_":PEX"
S DIR("A")="Enter Report Stop Date"
S DIR("B")=$$FMTE^XLFDT($$FMADD^XLFDT(STDATE,TLMT),"5D")
D ^DIR
I $D(DIRUT) K @SCRNARR@("RANGE") Q 0
S ENDDATE=Y
S @SCRNARR@("RANGE")=STDATE_"^"_ENDDATE
Q 1
DIV(SCRNARR) ; Set Divisions into screen array (prompt is one/many/all)
;Input : SCRNARR - Screen array full global reference
;Output : 1 = OK 0 = User abort/timeout
; @SCRNARR@("DIVISION") = User pick all divisions ?
; 1 = Yes (all) 0 = No
; @SCRNARR@("DIVISION",PtrDiv) = Division name
;Note : @SCRNARR@("DIVISION") is initialized (KILLed) on input
; : @SCRNARR@("DIVISION",PtrDiv) is only set when the user
; picked individual divisions (i.e. didn't pick all)
;
;Declare variables
N VAUTD,Y
K @SCRNARR@("DIVISION")
;Get division selection
D DIVISION^VAUTOMA
I Y<0 Q 0
M @SCRNARR@("DIVISION")=VAUTD
Q 1
;
PROV(SCRNARR) ; Set Providers into screen array (prompt is one/many/all)
;Input : SCRNARR - Screen array full global reference
;Output : 1 = OK 0 = User abort/timeout
; @SCRNARR@("PROVIDERS") = User pick all providers ?
; 1 = Yes (all) 0 = No
; @SCRNARR@("PROVIDERS",PtrProvider) = Provider name
;Note : @SCRNARR@("PROVIDERS") is initialized (KILLed) on input
; : @SCRNARR@("PROVIDERS",PtrProvider) is only set when the user
; picked individual providers (i.e. didn't pick all)
;
;Declare variables
N DIC,VAUTSTR,VAUTVB,VAUTNI,SCANARR,Y
K @SCRNARR@("PROVIDERS")
;Get provider selection
S DIC="^VA(200,"
S VAUTSTR="PROVIDER"
S VAUTVB="SCANARR"
S VAUTNI=2
D FIRST^VAUTOMA
I Y<0 Q 0
M @SCRNARR@("PROVIDERS")=SCANARR
Q 1
;
SCAN(SCRNARR) ; Set Scanned Notes into screen array
;Input : SCRNARR - Screen array full global reference
;Output : 1 = OK 0 = User abort/timeout
; @SCRNARR@("SCANNED") = Include count of encounters with
; scanned notes 1 = Yes 0 = No
;Note : @SCRNARR@("SCANNED") is initialized (KILLed) on input
;
;Declare variables
N DIR,X,Y,DIRUT,DIROUT,DTOUT,DUOUT
K @SCRNARR@("SCANNED")
;Prompt user
S DIR(0)="Y"
S DIR("B")="NO"
S DIR("A")="Would you like to include SCANNED notes "
D ^DIR
I $D(DIRUT) Q 0
S @SCRNARR@("SCANNED")=Y
Q 1
SCRPW302 ;BPFO/JRC - Performance Monitor Report Utils; 30 Jul 2003
+1 ;;5.3;SCHEDULING;**292,1015**;AUG 13, 2003;Build 21
+2 ;
TLMT(SCRNARR) ; Set Time Limit into screen array
+1 ;Input : SCRNARR - Screen array full global reference
+2 ;Output : 1 = OK 0 = User abort/timeout
+3 ; @SCRNARR@("TLMT") = Time Limit (days)
+4 ;Note : @SCRNARR@("TLMT") is initialized (KILLed) on input
+5 ;
+6 ; Declare variables
+7 NEW DIR,X,Y,DIRUT,DIROUT,DTOUT,DUOUT
+8 KILL @SCRNARR@("TLMT")
+9 ; Prompt user for number of days
+10 SET DIR(0)="N^2:100:0"
+11 SET DIR("A")="Enter number of days for Elapsed Time: "
+12 SET DIR("B")=10
+13 DO ^DIR
+14 IF $DATA(DIRUT)
QUIT 0
+15 SET @SCRNARR@("TLMT")=X
+16 QUIT 1
+17 ;
DATE(MIN,MAX,SCRNARR) ; Set Date Range into screen array
+1 ;Input : SCRNARR - Screen array full global reference
+2 ; MIN - Minimum date (FileMan) (default to MAX - time limit)
+3 ; MAX - Maximum date (FileMan) (default to T - time limit)
+4 ; @SCRNARR@("TLMT") - Time limit (optional - default to 10)
+5 ;Output : 1 = OK 0 = User abort/timeout
+6 ; @SCRNARR@("RANGE") = StartDate^EndDate
+7 ;Note : @SCRNARR@("RANGE") is initialized (KILLed) on input
+8 ;
+9 ;Declare variables
+10 NEW STDATE,ENDDATE,DATE,DIR,X,Y,TLMT,DIRUT,DIROUT,DTOUT,DUOUT
+11 KILL @SCRNARR@("RANGE")
+12 SET MIN=$PIECE($GET(MIN),".",1)
+13 SET MAX=$PIECE($GET(MAX),".",1)
+14 ;Get time limit out of screen array (default to 10)
+15 SET TLMT=+$GET(@SCRNARR@("TLMT"))
IF 'TLMT
SET TLMT=10
+16 ;Maximum date can't be more then Today minus time limit
+17 SET DATE=$$FMADD^XLFDT($$DT^XLFDT(),-TLMT)
+18 IF ('MAX)!(MAX>DATE)
SET MAX=DATE
+19 ;Minimum date can't be after maximum date
+20 IF (MAX'>MIN)
SET MIN=$$FMADD^XLFDT(MAX,-TLMT)
+21 ;Prompt user for start date
+22 SET DIR(0)="D^"_MIN_":"_MAX_":PEX"
+23 SET DIR("A")="Enter Report Start Date"
+24 SET DATE=$SELECT('MIN:$$FMADD^XLFDT(MAX,-TLMT),1:MIN)
+25 SET DIR("B")=$$FMTE^XLFDT(DATE,"5D")
+26 DO ^DIR
+27 IF $DATA(DIRUT)
QUIT 0
+28 SET STDATE=Y
+29 ;Prompt user for end date
+30 KILL DIR,X,Y
+31 SET MIN=STDATE
+32 SET DIR(0)="D^"_MIN_":"_MAX_":PEX"
+33 SET DIR("A")="Enter Report Stop Date"
+34 SET DIR("B")=$$FMTE^XLFDT($$FMADD^XLFDT(STDATE,TLMT),"5D")
+35 DO ^DIR
+36 IF $DATA(DIRUT)
KILL @SCRNARR@("RANGE")
QUIT 0
+37 SET ENDDATE=Y
+38 SET @SCRNARR@("RANGE")=STDATE_"^"_ENDDATE
+39 QUIT 1
DIV(SCRNARR) ; Set Divisions into screen array (prompt is one/many/all)
+1 ;Input : SCRNARR - Screen array full global reference
+2 ;Output : 1 = OK 0 = User abort/timeout
+3 ; @SCRNARR@("DIVISION") = User pick all divisions ?
+4 ; 1 = Yes (all) 0 = No
+5 ; @SCRNARR@("DIVISION",PtrDiv) = Division name
+6 ;Note : @SCRNARR@("DIVISION") is initialized (KILLed) on input
+7 ; : @SCRNARR@("DIVISION",PtrDiv) is only set when the user
+8 ; picked individual divisions (i.e. didn't pick all)
+9 ;
+10 ;Declare variables
+11 NEW VAUTD,Y
+12 KILL @SCRNARR@("DIVISION")
+13 ;Get division selection
+14 DO DIVISION^VAUTOMA
+15 IF Y<0
QUIT 0
+16 MERGE @SCRNARR@("DIVISION")=VAUTD
+17 QUIT 1
+18 ;
PROV(SCRNARR) ; Set Providers into screen array (prompt is one/many/all)
+1 ;Input : SCRNARR - Screen array full global reference
+2 ;Output : 1 = OK 0 = User abort/timeout
+3 ; @SCRNARR@("PROVIDERS") = User pick all providers ?
+4 ; 1 = Yes (all) 0 = No
+5 ; @SCRNARR@("PROVIDERS",PtrProvider) = Provider name
+6 ;Note : @SCRNARR@("PROVIDERS") is initialized (KILLed) on input
+7 ; : @SCRNARR@("PROVIDERS",PtrProvider) is only set when the user
+8 ; picked individual providers (i.e. didn't pick all)
+9 ;
+10 ;Declare variables
+11 NEW DIC,VAUTSTR,VAUTVB,VAUTNI,SCANARR,Y
+12 KILL @SCRNARR@("PROVIDERS")
+13 ;Get provider selection
+14 SET DIC="^VA(200,"
+15 SET VAUTSTR="PROVIDER"
+16 SET VAUTVB="SCANARR"
+17 SET VAUTNI=2
+18 DO FIRST^VAUTOMA
+19 IF Y<0
QUIT 0
+20 MERGE @SCRNARR@("PROVIDERS")=SCANARR
+21 QUIT 1
+22 ;
SCAN(SCRNARR) ; Set Scanned Notes into screen array
+1 ;Input : SCRNARR - Screen array full global reference
+2 ;Output : 1 = OK 0 = User abort/timeout
+3 ; @SCRNARR@("SCANNED") = Include count of encounters with
+4 ; scanned notes 1 = Yes 0 = No
+5 ;Note : @SCRNARR@("SCANNED") is initialized (KILLed) on input
+6 ;
+7 ;Declare variables
+8 NEW DIR,X,Y,DIRUT,DIROUT,DTOUT,DUOUT
+9 KILL @SCRNARR@("SCANNED")
+10 ;Prompt user
+11 SET DIR(0)="Y"
+12 SET DIR("B")="NO"
+13 SET DIR("A")="Would you like to include SCANNED notes "
+14 DO ^DIR
+15 IF $DATA(DIRUT)
QUIT 0
+16 SET @SCRNARR@("SCANNED")=Y
+17 QUIT 1