Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SCRPW302

SCRPW302.m

Go to the documentation of this file.
  1. SCRPW302 ;BPFO/JRC - Performance Monitor Report Utils; 30 Jul 2003
  1. ;;5.3;SCHEDULING;**292**;AUG 13, 2003
  1. ;
  1. TLMT(SCRNARR) ; Set Time Limit into screen array
  1. ;Input : SCRNARR - Screen array full global reference
  1. ;Output : 1 = OK 0 = User abort/timeout
  1. ; @SCRNARR@("TLMT") = Time Limit (days)
  1. ;Note : @SCRNARR@("TLMT") is initialized (KILLed) on input
  1. ;
  1. ; Declare variables
  1. N DIR,X,Y,DIRUT,DIROUT,DTOUT,DUOUT
  1. K @SCRNARR@("TLMT")
  1. ; Prompt user for number of days
  1. S DIR(0)="N^2:100:0"
  1. S DIR("A")="Enter number of days for Elapsed Time: "
  1. S DIR("B")=10
  1. D ^DIR
  1. I $D(DIRUT) Q 0
  1. S @SCRNARR@("TLMT")=X
  1. Q 1
  1. ;
  1. DATE(MIN,MAX,SCRNARR) ; Set Date Range into screen array
  1. ;Input : SCRNARR - Screen array full global reference
  1. ; MIN - Minimum date (FileMan) (default to MAX - time limit)
  1. ; MAX - Maximum date (FileMan) (default to T - time limit)
  1. ; @SCRNARR@("TLMT") - Time limit (optional - default to 10)
  1. ;Output : 1 = OK 0 = User abort/timeout
  1. ; @SCRNARR@("RANGE") = StartDate^EndDate
  1. ;Note : @SCRNARR@("RANGE") is initialized (KILLed) on input
  1. ;
  1. ;Declare variables
  1. N STDATE,ENDDATE,DATE,DIR,X,Y,TLMT,DIRUT,DIROUT,DTOUT,DUOUT
  1. K @SCRNARR@("RANGE")
  1. S MIN=$P($G(MIN),".",1)
  1. S MAX=$P($G(MAX),".",1)
  1. ;Get time limit out of screen array (default to 10)
  1. S TLMT=+$G(@SCRNARR@("TLMT")) S:'TLMT TLMT=10
  1. ;Maximum date can't be more then Today minus time limit
  1. S DATE=$$FMADD^XLFDT($$DT^XLFDT(),-TLMT)
  1. I ('MAX)!(MAX>DATE) S MAX=DATE
  1. ;Minimum date can't be after maximum date
  1. I (MAX'>MIN) S MIN=$$FMADD^XLFDT(MAX,-TLMT)
  1. ;Prompt user for start date
  1. S DIR(0)="D^"_MIN_":"_MAX_":PEX"
  1. S DIR("A")="Enter Report Start Date"
  1. S DATE=$S('MIN:$$FMADD^XLFDT(MAX,-TLMT),1:MIN)
  1. S DIR("B")=$$FMTE^XLFDT(DATE,"5D")
  1. D ^DIR
  1. I $D(DIRUT) Q 0
  1. S STDATE=Y
  1. ;Prompt user for end date
  1. K DIR,X,Y
  1. S MIN=STDATE
  1. S DIR(0)="D^"_MIN_":"_MAX_":PEX"
  1. S DIR("A")="Enter Report Stop Date"
  1. S DIR("B")=$$FMTE^XLFDT($$FMADD^XLFDT(STDATE,TLMT),"5D")
  1. D ^DIR
  1. I $D(DIRUT) K @SCRNARR@("RANGE") Q 0
  1. S ENDDATE=Y
  1. S @SCRNARR@("RANGE")=STDATE_"^"_ENDDATE
  1. Q 1
  1. DIV(SCRNARR) ; Set Divisions into screen array (prompt is one/many/all)
  1. ;Input : SCRNARR - Screen array full global reference
  1. ;Output : 1 = OK 0 = User abort/timeout
  1. ; @SCRNARR@("DIVISION") = User pick all divisions ?
  1. ; 1 = Yes (all) 0 = No
  1. ; @SCRNARR@("DIVISION",PtrDiv) = Division name
  1. ;Note : @SCRNARR@("DIVISION") is initialized (KILLed) on input
  1. ; : @SCRNARR@("DIVISION",PtrDiv) is only set when the user
  1. ; picked individual divisions (i.e. didn't pick all)
  1. ;
  1. ;Declare variables
  1. N VAUTD,Y
  1. K @SCRNARR@("DIVISION")
  1. ;Get division selection
  1. D DIVISION^VAUTOMA
  1. I Y<0 Q 0
  1. M @SCRNARR@("DIVISION")=VAUTD
  1. Q 1
  1. ;
  1. PROV(SCRNARR) ; Set Providers into screen array (prompt is one/many/all)
  1. ;Input : SCRNARR - Screen array full global reference
  1. ;Output : 1 = OK 0 = User abort/timeout
  1. ; @SCRNARR@("PROVIDERS") = User pick all providers ?
  1. ; 1 = Yes (all) 0 = No
  1. ; @SCRNARR@("PROVIDERS",PtrProvider) = Provider name
  1. ;Note : @SCRNARR@("PROVIDERS") is initialized (KILLed) on input
  1. ; : @SCRNARR@("PROVIDERS",PtrProvider) is only set when the user
  1. ; picked individual providers (i.e. didn't pick all)
  1. ;
  1. ;Declare variables
  1. N DIC,VAUTSTR,VAUTVB,VAUTNI,SCANARR,Y
  1. K @SCRNARR@("PROVIDERS")
  1. ;Get provider selection
  1. S DIC="^VA(200,"
  1. S VAUTSTR="PROVIDER"
  1. S VAUTVB="SCANARR"
  1. S VAUTNI=2
  1. D FIRST^VAUTOMA
  1. I Y<0 Q 0
  1. M @SCRNARR@("PROVIDERS")=SCANARR
  1. Q 1
  1. ;
  1. SCAN(SCRNARR) ; Set Scanned Notes into screen array
  1. ;Input : SCRNARR - Screen array full global reference
  1. ;Output : 1 = OK 0 = User abort/timeout
  1. ; @SCRNARR@("SCANNED") = Include count of encounters with
  1. ; scanned notes 1 = Yes 0 = No
  1. ;Note : @SCRNARR@("SCANNED") is initialized (KILLed) on input
  1. ;
  1. ;Declare variables
  1. N DIR,X,Y,DIRUT,DIROUT,DTOUT,DUOUT
  1. K @SCRNARR@("SCANNED")
  1. ;Prompt user
  1. S DIR(0)="Y"
  1. S DIR("B")="NO"
  1. S DIR("A")="Would you like to include SCANNED notes "
  1. D ^DIR
  1. I $D(DIRUT) Q 0
  1. S @SCRNARR@("SCANNED")=Y
  1. Q 1