source: FOIAVistA/trunk/r/ENROLLMENT_APPLICATION_SYSTEM-EAS/EASEZLM.m@ 1394

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

initial load of FOIAVistA 6/30/08 version

File size: 5.6 KB
Line 
1EASEZLM ;ALB/jap - 1010EZ List Manager Processing Screens ;10/12/00 13:07
2 ;;1.0;ENROLLMENT APPLICATION SYSTEM;;Mar 15, 2001
3 ;
4EN ;Main entry point for 1010EZ processing
5 ;Ask user to select processing status
6 W @IOF
7 W !!,"10-10EZ Application Processing --",!
8 K DIR,DTOUT,DUOUT,DIRUT,Y
9 S DIR(0)="SMO^1:New;2:In Review;3:Printed, Pending Signature;4:Signed;5:Filed;6:Inactivated"
10 S DIR("A")="Select Applications to View"
11 D ^DIR K DIR
12 I $D(DIRUT) K DIR,DTOUT,DUOUT,DIRUT,Y Q
13 ;
14 S EASVIEW=0
15 ;I Y,"^1^2^3^4^5^"[(U_Y_U) S EASVIEW=Y
16 I Y,"^1^2^3^4^5^6^"[(U_Y_U) S EASVIEW=Y
17 Q:'EASVIEW
18 S EASPSTAT=""
19 D EN^EASEZL1
20 K EASVIEW G EN
21 Q
22 ;
23HDR ;Header code
24 N H
25 S VALMHDR(1)=" "
26 ;Processing - primary view
27 N HDR
28 S HDR=""
29 S H=$S(EASVIEW=1:"NEW",EASVIEW=2:"IN REVIEW",EASVIEW=3:"PRINTED, PENDING SIG.",EASVIEW=4:"SIGNED",EASVIEW=5:"FILED",EASVIEW=6:"INACTIVATED",1:"")
30 S HDR=HDR_H
31 S VALMHDR(2)="Application Status: "_$S(HDR="":"Unknown",1:HDR)
32 S VALMHDR(3)=" "
33 Q
34 ;
35INIT ;Init variables and list array
36 ;
37 S VALMSG=$$MSG^EASEZLM
38 S EASARY="EASEZ"
39 K ^TMP("EASEZ",$J),^TMP($J,712),^TMP("EASEZIDX",$J)
40 ;determine processing status
41 ;I EASPSTAT="" S V=EASVIEW,EASPSTAT=$S(V=1:"NEW",V=2:"REV",V=3:"PRT",V=4:"SIG",V=5:"CLS",1:"") K V
42 I EASPSTAT="" S V=EASVIEW,EASPSTAT=$S(V=1:"NEW",V=2:"REV",V=3:"PRT",V=4:"SIG",V=5:"FIL",V=6:"CLS",1:"") K V
43 I EASPSTAT="" S VALMCNT=0 D NOLINES^EASEZLM
44 I EASVIEW,EASPSTAT'="" D BLD
45 ;Print message if no Applications meet selection criteria
46 I 'VALMCNT D NOLINES^EASEZLM
47 Q
48 ;
49BLD ;Build initial EZ selection screen
50 N V,JDATE,JNAME,DAT,FILDATE,WEBID,WILLSEND,VETTYPE,FAC,APP,SSN,DOB,EDATE,IT,PRT,STATION
51 K ^TMP("EASEZ",$J)
52 S VALMBG=1,VALMCNT=0
53 S IT="" F S IT=$O(VALMDDF(IT)) Q:IT="" S X=VALMDDF(IT),EASCOL(IT)=$P(X,U,2),EASWID(IT)=$P(X,U,3)
54 S EASLN=0,EASNUM=0
55 I 'EASVIEW S VALMCNT=0,$P(^TMP("EASEZ",$J,0),U,4)=VALMCNT Q
56 W !!,"Please wait while processing...",!!
57 ;call to find all Applications needed for main LM screen
58 D PICKALL^EASEZU2(EASVIEW)
59 ;
60 S FAC="" F S FAC=$O(^TMP($J,712,EASVIEW,FAC)) Q:FAC="" S JNAME="" F S JNAME=$O(^TMP($J,712,EASVIEW,FAC,JNAME)) Q:JNAME="" D
61 .S JDATE=0 F S JDATE=$O(^TMP($J,712,EASVIEW,FAC,JNAME,JDATE)) Q:'JDATE S APP=0 F S APP=$O(^TMP($J,712,EASVIEW,FAC,JNAME,JDATE,APP)) Q:'APP D
62 ..S DAT=^TMP($J,712,EASVIEW,FAC,JNAME,JDATE,APP)
63 ..;reset processing status if application has filing date
64 ..;I EASVIEW=4 S FILDATE=$P(DAT,U,5)
65 ..S SSN=$P(DAT,U,2),VETTYPE=$P(DAT,U,3),EDATE=$P(DAT,U,4),WEBID=$P(DAT,U,6),WILLSEND=$P(DAT,U,7),FAC=$P(DAT,U,8)
66 ..S PRT=$S(WILLSEND:"Vet",1:"VA")
67 ..S STATION=FAC S:STATION=1 STATION=""
68 ..S EASLN=EASLN+1,EASNUM=EASNUM+1
69 ..S X=$$SETSTR^VALM1(EASLN,"",EASCOL("NUMBER"),EASWID("NUMBER"))
70 ..S X=$$SETSTR^VALM1(JNAME,X,EASCOL("APPLICANT"),EASWID("APPLICANT"))
71 ..S X=$$SETSTR^VALM1(SSN,X,EASCOL("SSN"),EASWID("SSN"))
72 ..S X=$$SETSTR^VALM1(VETTYPE,X,EASCOL("TYPE"),EASWID("TYPE"))
73 ..S X=$$SETSTR^VALM1(EDATE,X,EASCOL("DATE"),EASWID("DATE"))
74 ..S X=$$SETSTR^VALM1(" "_PRT,X,EASCOL("PRINTED"),EASWID("PRINTED"))
75 ..S X=$$SETSTR^VALM1(STATION,X,EASCOL("STATION"),EASWID("STATION"))
76 ..S X=$$SETSTR^VALM1(APP,X,EASCOL("APPNUM"),EASWID("APPNUM"))
77 ..S ^TMP("EASEZ",$J,EASLN,0)=X
78 ..S ^TMP("EASEZ",$J,"IDX",EASLN,APP)=JNAME_U_EDATE
79 ..;I EASVIEW=4,'FILDATE D
80 ..;.S $P(^TMP("EASEZ",$J,"IDX",EASLN,APP),U,3)=1
81 ..;.D FLDCTRL^VALM10(EASLN,"APPLICANT",IOINHI,IOINORM)
82 ..;.D FLDCTRL^VALM10(EASLN,"APPNUM",IOINHI,IOINORM)
83 ..S ^TMP("EASEZIDX",$J,APP)=JNAME_U_EDATE_U_WEBID_U_WILLSEND_U_STATION
84 S VALMCNT=EASNUM
85 S $P(^TMP("EASEZ",$J,0),U,4)=VALMCNT
86 Q
87 ;
88MSG() ;Custom message for list manager 'message window'
89 ;
90 I EASVIEW=4 Q "Applications not yet filed to the Patient database."
91 Q "Select an Application to view."
92 ;
93HELP ;Help code
94 S X="?" D DISP^XQORM1 W !!
95 Q
96 ;
97EXIT ;protocol action Exit code
98 D CLEAN^VALM10
99 D CLEAR^VALM1
100 K ^TMP(EASARY_"SRT",$J),^TMP(EASARY_"IDX",$J)
101 K EASBEG,EASEND,EASDFN,EASEZNEW,EASAPP,EASLOCK,EASLN
102 Q
103 ;
104SEL ;Select item in inital view to expand
105 N BG,LST,Y,DIR,DTOUT,DUOUT,DIRUT
106 S BG=VALMBG
107 S LST=VALMLST
108 S EASSEL=0,EASERR=0
109 I 'BG D Q
110 .W !!,*7,"There are no '",VALM("ENTITY"),"s' to select.",!
111 .S EASERR=1
112 .S DIR(0)="E" D ^DIR K DIR
113 S Y=+$P($P(XQORNOD(0),U,4),"=",2)
114 I 'Y D
115 .S DIR(0)="N^"_BG_":"_LST,DIR("A")="Select "_VALM("ENTITY")_"(s)"
116 .D ^DIR K DIR I $D(DIRUT) S EASERR=1,EASSEL=0
117 Q:EASERR
118 ;
119 ;check for valid entries
120 S EASSEL=Y
121 I EASSEL<BG!(EASSEL>LST) D
122 .W !,*7,"Selection '",EASSEL,"' is not a valid choice."
123 .S EASERR=1,EASSEL=0 D PAUSE^VALM1
124 ;
125 Q
126 ;
127NOLINES ;if array empty, inform user
128 I $G(EASLOCK)=1 D Q
129 .S ^TMP(EASARY,$J,1,0)=$$SETSTR^VALM1(" ","",1,60)
130 .S ^TMP(EASARY,$J,"IDX",1,1)=""
131 .S ^TMP(EASARY,$J,2,0)=$$SETSTR^VALM1("No Applications meet the selection criteria. ","",5,60)
132 .S ^TMP(EASARY,$J,"IDX",2,2)=""
133 I $G(EASLOCK)=0 D Q
134 .S ^TMP(EASARY,$J,1,0)=$$SETSTR^VALM1(" ","",1,60)
135 .S ^TMP(EASARY,$J,"IDX",1,1)=""
136 .S ^TMP(EASARY,$J,2,0)=$$SETSTR^VALM1("Application being processed by another user.","",5,60)
137 .S ^TMP(EASARY,$J,"IDX",2,2)=""
138 .S ^TMP(EASARY,$J,3,0)=$$SETSTR^VALM1("Try again late.....","",5,60)
139 .S ^TMP(EASARY,$J,"IDX",3,3)=""
140 S ^TMP(EASARY,$J,1,0)=$$SETSTR^VALM1(" ","",1,60)
141 S ^TMP(EASARY,$J,"IDX",1,1)=""
142 S ^TMP(EASARY,$J,2,0)=$$SETSTR^VALM1("No Applications meet the selection criteria. ","",5,60)
143 S ^TMP(EASARY,$J,"IDX",2,2)=""
144 Q
145 ;
146FNL ;option (list template) Exit code
147 D CLEAN^VALM10
148 D CLEAR^VALM1
149 K ^TMP($J,712)
150 K ^TMP("EASEZ",$J),^TMP("EASEZSRT",$J),^TMP("EASEZIDX",$J)
151 K ^TMP("VALM STACK",$J)
152 K EASVIEW,EASSEL,EASLN,EASNUM,EASARY,EASCOL,EASWID,EASAPP,EASPSTAT,EASRTR,EASERR
153 Q
154 ;
155NOACT(STAT,ACTION) ;action not allowed
156 ;
157 W !!,$C(7),ACTION_" not allowed for this "_STAT_" Application."
158 S VALMBCK="R"
159 D PAUSE^VALM1
160 Q
Note: See TracBrowser for help on using the repository browser.