source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SCRPW302.m@ 691

Last change on this file since 691 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 4.1 KB
RevLine 
[613]1SCRPW302 ;BPFO/JRC - Performance Monitor Report Utils; 30 Jul 2003
2 ;;5.3;SCHEDULING;**292**;AUG 13, 2003
3 ;
4TLMT(SCRNARR) ; Set Time Limit into screen array
5 ;Input : SCRNARR - Screen array full global reference
6 ;Output : 1 = OK 0 = User abort/timeout
7 ; @SCRNARR@("TLMT") = Time Limit (days)
8 ;Note : @SCRNARR@("TLMT") is initialized (KILLed) on input
9 ;
10 ; Declare variables
11 N DIR,X,Y,DIRUT,DIROUT,DTOUT,DUOUT
12 K @SCRNARR@("TLMT")
13 ; Prompt user for number of days
14 S DIR(0)="N^2:100:0"
15 S DIR("A")="Enter number of days for Elapsed Time: "
16 S DIR("B")=10
17 D ^DIR
18 I $D(DIRUT) Q 0
19 S @SCRNARR@("TLMT")=X
20 Q 1
21 ;
22DATE(MIN,MAX,SCRNARR) ; Set Date Range into screen array
23 ;Input : SCRNARR - Screen array full global reference
24 ; MIN - Minimum date (FileMan) (default to MAX - time limit)
25 ; MAX - Maximum date (FileMan) (default to T - time limit)
26 ; @SCRNARR@("TLMT") - Time limit (optional - default to 10)
27 ;Output : 1 = OK 0 = User abort/timeout
28 ; @SCRNARR@("RANGE") = StartDate^EndDate
29 ;Note : @SCRNARR@("RANGE") is initialized (KILLed) on input
30 ;
31 ;Declare variables
32 N STDATE,ENDDATE,DATE,DIR,X,Y,TLMT,DIRUT,DIROUT,DTOUT,DUOUT
33 K @SCRNARR@("RANGE")
34 S MIN=$P($G(MIN),".",1)
35 S MAX=$P($G(MAX),".",1)
36 ;Get time limit out of screen array (default to 10)
37 S TLMT=+$G(@SCRNARR@("TLMT")) S:'TLMT TLMT=10
38 ;Maximum date can't be more then Today minus time limit
39 S DATE=$$FMADD^XLFDT($$DT^XLFDT(),-TLMT)
40 I ('MAX)!(MAX>DATE) S MAX=DATE
41 ;Minimum date can't be after maximum date
42 I (MAX'>MIN) S MIN=$$FMADD^XLFDT(MAX,-TLMT)
43 ;Prompt user for start date
44 S DIR(0)="D^"_MIN_":"_MAX_":PEX"
45 S DIR("A")="Enter Report Start Date"
46 S DATE=$S('MIN:$$FMADD^XLFDT(MAX,-TLMT),1:MIN)
47 S DIR("B")=$$FMTE^XLFDT(DATE,"5D")
48 D ^DIR
49 I $D(DIRUT) Q 0
50 S STDATE=Y
51 ;Prompt user for end date
52 K DIR,X,Y
53 S MIN=STDATE
54 S DIR(0)="D^"_MIN_":"_MAX_":PEX"
55 S DIR("A")="Enter Report Stop Date"
56 S DIR("B")=$$FMTE^XLFDT($$FMADD^XLFDT(STDATE,TLMT),"5D")
57 D ^DIR
58 I $D(DIRUT) K @SCRNARR@("RANGE") Q 0
59 S ENDDATE=Y
60 S @SCRNARR@("RANGE")=STDATE_"^"_ENDDATE
61 Q 1
62DIV(SCRNARR) ; Set Divisions into screen array (prompt is one/many/all)
63 ;Input : SCRNARR - Screen array full global reference
64 ;Output : 1 = OK 0 = User abort/timeout
65 ; @SCRNARR@("DIVISION") = User pick all divisions ?
66 ; 1 = Yes (all) 0 = No
67 ; @SCRNARR@("DIVISION",PtrDiv) = Division name
68 ;Note : @SCRNARR@("DIVISION") is initialized (KILLed) on input
69 ; : @SCRNARR@("DIVISION",PtrDiv) is only set when the user
70 ; picked individual divisions (i.e. didn't pick all)
71 ;
72 ;Declare variables
73 N VAUTD,Y
74 K @SCRNARR@("DIVISION")
75 ;Get division selection
76 D DIVISION^VAUTOMA
77 I Y<0 Q 0
78 M @SCRNARR@("DIVISION")=VAUTD
79 Q 1
80 ;
81PROV(SCRNARR) ; Set Providers into screen array (prompt is one/many/all)
82 ;Input : SCRNARR - Screen array full global reference
83 ;Output : 1 = OK 0 = User abort/timeout
84 ; @SCRNARR@("PROVIDERS") = User pick all providers ?
85 ; 1 = Yes (all) 0 = No
86 ; @SCRNARR@("PROVIDERS",PtrProvider) = Provider name
87 ;Note : @SCRNARR@("PROVIDERS") is initialized (KILLed) on input
88 ; : @SCRNARR@("PROVIDERS",PtrProvider) is only set when the user
89 ; picked individual providers (i.e. didn't pick all)
90 ;
91 ;Declare variables
92 N DIC,VAUTSTR,VAUTVB,VAUTNI,SCANARR,Y
93 K @SCRNARR@("PROVIDERS")
94 ;Get provider selection
95 S DIC="^VA(200,"
96 S VAUTSTR="PROVIDER"
97 S VAUTVB="SCANARR"
98 S VAUTNI=2
99 D FIRST^VAUTOMA
100 I Y<0 Q 0
101 M @SCRNARR@("PROVIDERS")=SCANARR
102 Q 1
103 ;
104SCAN(SCRNARR) ; Set Scanned Notes into screen array
105 ;Input : SCRNARR - Screen array full global reference
106 ;Output : 1 = OK 0 = User abort/timeout
107 ; @SCRNARR@("SCANNED") = Include count of encounters with
108 ; scanned notes 1 = Yes 0 = No
109 ;Note : @SCRNARR@("SCANNED") is initialized (KILLed) on input
110 ;
111 ;Declare variables
112 N DIR,X,Y,DIRUT,DIROUT,DTOUT,DUOUT
113 K @SCRNARR@("SCANNED")
114 ;Prompt user
115 S DIR(0)="Y"
116 S DIR("B")="NO"
117 S DIR("A")="Would you like to include SCANNED notes "
118 D ^DIR
119 I $D(DIRUT) Q 0
120 S @SCRNARR@("SCANNED")=Y
121 Q 1
Note: See TracBrowser for help on using the repository browser.