source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGENRPC1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1DGENRPC1 ;ALB/CJM - Enrollees by Status, Priority, Preferred Facility Report; May 12, 1999
2 ;;5.3;Registration;**147,232**;Aug 13,1993
3 ;
4REPORT ;
5 N DGENRP,DGENFLG
6 ;
7 ;Control variables used in generating report
8 ;DGENRP("LIST")=1 if patients should be listed
9 ;DGENRP("PRIORITY",<priority to include>)=""
10 ;DGENRP("PRIORITY","ALL")=1 means to include all
11 ;DGENRP("STATUS",<status to include>)=""
12 ;DGENRP("STATUS","ALL")=1 means to include all
13 ;DGENRP("FACILITY",<preferred facility to include>)=""
14 ;DGENRP("FACILITY","ALL")=1 means to include all
15 ;
16 G:'$$ASKINST(.DGENRP) EXIT
17 ;
18 G:'$$ASKLIST(.DGENRP) EXIT
19 I DGENRP("LIST") D G:'DGENFLG EXIT
20 .S DGENFLG=$$ASKSTATS(.DGENRP) Q:'DGENFLG
21 .S DGENFLG=$$ASKPRTY(.DGENRP)
22 ;
23 ;
24 I $$DEVICE() D PRINT^DGENRPC2
25EXIT ;
26 Q
27 ;
28DEVICE() ;
29 ;Description: allows the user to select a device.
30 ;Input: none
31 ;
32 ;Output:
33 ; Function Value - Returns 0 if the user decides not to print or to
34 ; queue the report, 1 otherwise.
35 ;
36 N OK
37 S OK=1
38 S %ZIS="MQ"
39 W !,"*** This report requires a 132 column printer. ******"
40 D ^%ZIS
41 S:POP OK=0
42 D:OK&$D(IO("Q"))
43 .S ZTRTN="PRINT^DGENRPC2",ZTDESC="Enrollments by Status, Priority, Preferred Facility REPORT",ZTSAVE("DGENRP(")=""
44 .D ^%ZTLOAD
45 .W !,$S($D(ZTSK):"REQUEST QUEUED TASK="_ZTSK,1:"REQUEST CANCELLED")
46 .D HOME^%ZIS
47 .S OK=0
48 Q OK
49 ;
50ASKLIST(DGENRP) ;
51 ;Description: Asks user if he wants patient listing and sets to DGENRP("LIST")
52 ;
53 ;Outpu: Function returns 1 on success, 0 on failure (i.e., user "^" out)
54 ;
55 N DIR
56 S DGENRP("LIST")=0
57 S DIR(0)="Y"
58 S DIR("A")="Do you want a list of selected patients"
59 S DIR("?")="Answer NO if you just want the summary statistics."
60 S DIR("B")="NO"
61 D ^DIR
62 I $D(DIRUT) Q 0
63 S DGENRP("LIST")=Y
64 Q 1
65 ;
66ASKSTATS(DGENRP) ;
67 ;Description: ask status codes to include
68 ;
69 N DIR
70 S DGENRP("STATUS","ALL")=0
71 S DIR(0)="Y"
72 S DIR("A")="Do you want to include all Enrollment Statuses in the patient listing"
73 S DIR("?")="Answer NO if the report should include only selected Enrollment Statuses."
74 S DIR("B")="NO"
75 D ^DIR
76 I $D(DIRUT) Q 0
77 I Y S DGENRP("STATUS","ALL")=1 Q 1
78 F Q:'$$STATUS(.DGENRP)
79 I '$O(DGENRP("STATUS",0)) Q 0
80 Q 1
81 ;
82STATUS(DGENRP) ;
83 ;Description: Ask user to select a status code
84 N DIR
85 S DIR(0)="27.11,.04O"
86 D ^DIR
87 Q:$D(DIRUT) 0
88 S DGENRP("STATUS",+Y)=""
89 Q 1
90 ;
91ASKPRTY(DGENRP) ;
92 ;Description: ask enrollment priorities to include
93 ;
94 N DIR
95 S DGENRP("PRIORITY","ALL")=0
96 S DIR(0)="Y"
97 S DIR("A")="Do you want to include all Enrollment Priorities in the patient listing"
98 S DIR("?")="Answer NO if the report should inlclude only selected Enrollment Priorities."
99 S DIR("B")="NO"
100 D ^DIR
101 I $D(DIRUT) Q 0
102 I Y S DGENRP("PRIORITY","ALL")=1 Q 1
103 F Q:'$$PRIORITY(.DGENRP)
104 I '$O(DGENRP("PRIORITY",0)) Q 0
105 Q 1
106 ;
107 ;
108PRIORITY(DGENRP) ;
109 ;Description: Asks user to select an Enrollment Priority
110 N DIR
111 S DIR(0)="27.11,.07O"
112 D ^DIR
113 Q:$D(DIRUT) 0
114 S DGENRP("PRIORITY",Y)=""
115 Q 1
116 ;
117ASKINST(DGENRP) ;
118 ;Description: ask preferred facilities to include
119 ;
120 N DIR
121 S DGENRP("FACILITY","ALL")=0
122 S DIR(0)="Y"
123 S DIR("A")="Do you want to include all Preferred Facilities"
124 S DIR("?")="Answer NO if you want all enrollments found regardless of when the patient's Preferred Facility."
125 S DIR("B")="NO"
126 D ^DIR
127 I $D(DIRUT) Q 0
128 I Y S DGENRP("FACILITY","ALL")=1 Q 1
129 F Q:'$$FACILITY
130 I '$O(DGENRP("FACILITY",0)) Q 0
131 Q 1
132 ;
133 ;
134FACILITY() ;
135 ;Description: Asks user to select an institution
136 N DIR
137 S DIR(0)="PO^4:AEM"
138 S DIR("A")="Preferred Facility"
139 S DIR("?")="Selection of Preferred Facilities to include is made from the Institution file."
140 D ^DIR
141 Q:$D(DIRUT) 0
142 S:+Y DGENRP("FACILITY",+Y)=""
143 Q 1
144 ;
Note: See TracBrowser for help on using the repository browser.