source: FOIAVistA/tag/r/MAILMAN-XM/XMJMORX.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 7.6 KB
Line 
1XMJMORX ;ISC-SF/GMB-Range actions for ^TMP message lists ;12/04/2002 10:13
2 ;;8.0;MailMan;**9**;Jun 28, 2002
3 ; Similar to ^XMJMOR
4DELETE(XMDUZ,XMKALL,XMK) ; Delete
5 N XMMSG,XMABORT
6 S XMABORT=0
7 I $D(^TMP("XM",$J,".")) D
8 . D SELMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XDEL",34302,34303,.XMMSG,.XMABORT)
9 . ;K:'XMKALL ^TMP("XM",$J,".")
10 E D
11 . D ACTWHICH^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XDEL",34301,34302,34303.1,.XMMSG,.XMABORT)
12 Q:XMABORT
13 W:$D(XMMSG) !,XMMSG
14 Q
15FILTER(XMDUZ,XMKALL,XMK) ; Filter
16 N XMMSG,XMABORT
17 S XMABORT=0
18 I $D(^TMP("XM",$J,".")) D
19 . D SELMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XFLTR",34306,0,.XMMSG)
20 E D
21 . D ACTWHICH^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XFLTR",34305,34306,0,.XMMSG,.XMABORT)
22 Q:XMABORT
23 W:$D(XMMSG) !,XMMSG
24 Q
25FORWARD(XMDUZ,XMKALL,XMK) ; Forward
26 N XMWHICH,XMMSG,XMABORT,XMINSTR
27 S XMABORT=0
28 I $D(^TMP("XM",$J,".")) D Q
29 . N XMKZ
30 . D INIT^XMXADDR
31 . S XMKZ=$O(^TMP("XM",$J,".",""))
32 . I '$O(^TMP("XM",$J,".",XMKZ)) D Q
33 . . D FWDONE^XMJMOR(XMDUZ,$P(^TMP("XM",$J,"MSG",XMKZ),U,3),.XMINSTR,.XMABORT)
34 . D TOWHOM^XMJMT(XMDUZ,$$EZBLD^DIALOG(34111),.XMINSTR,"",.XMABORT) Q:XMABORT ; Forward
35 . D SELMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XFWD^XMXMSGS1",34309,0,.XMMSG)
36 . D CLEANUP^XMXADDR
37 . I $D(XMERR) D ZSHOW^XMJERR
38 . W:$D(XMMSG) !,XMMSG
39 D WHICH^XMJMORX1(34308,0,.XMWHICH,.XMABORT) Q:XMABORT
40 D INIT^XMXADDR
41 I $P(XMWHICH,",",2,99)="",$P(XMWHICH,",",1)=+XMWHICH D Q
42 . N XMZ
43 . S XMZ=$P($G(^TMP("XM",$J,"MSG",+XMWHICH)),U,3)
44 . I 'XMZ W !,$$EZBLD^DIALOG(34309.3) Q ; No messages forwarded.
45 . D FWDONE^XMJMOR(XMDUZ,XMZ,.XMINSTR,.XMABORT)
46 D TOWHOM^XMJMT(XMDUZ,$$EZBLD^DIALOG(34111),.XMINSTR,"",.XMABORT) Q:XMABORT ; Forward
47 D ACTMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,XMWHICH,"XFWD^XMXMSGS1",34309,.XMMSG)
48 D CLEANUP^XMXADDR
49 I $D(XMERR) D ZSHOW^XMJERR
50 W:$D(XMMSG) !,XMMSG
51 Q
52LATER(XMDUZ,XMKALL,XMK) ; Later
53 N XMWHICH,XMMSG,XMABORT,XMWHEN
54 S XMABORT=0
55 I $D(^TMP("XM",$J,".")) D
56 . D LTRDATE^XMJMD(.XMWHEN,.XMABORT) Q:XMABORT
57 . D SELMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XLATER^XMXMSGS2",34312,0,.XMMSG)
58 E D
59 . D WHICH^XMJMORX1(34311,0,.XMWHICH,.XMABORT) Q:XMABORT
60 . D LTRDATE^XMJMD(.XMWHEN,.XMABORT) Q:XMABORT
61 . D ACTMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,XMWHICH,"XLATER^XMXMSGS2",34312,.XMMSG)
62 Q:XMABORT
63 W:$D(XMMSG) !,XMMSG
64 Q
65NEWTOGL(XMDUZ,XMKALL,XMK) ; New Toggle
66 N XMMSG,XMABORT
67 S XMABORT=0
68 I $D(^TMP("XM",$J,".")) D
69 . D SELMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XNTOGL",34315,0,.XMMSG)
70 E D
71 . D ACTWHICH^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XNTOGL",34314,34315,0,.XMMSG,.XMABORT)
72 Q:XMABORT
73 W:$D(XMMSG) !,XMMSG
74 Q
75PRINT(XMDUZ,XMPRTHDR) ; Print (Needs XMTYPE)
76 N XMRECIPS,XMABORT,XMSAVE,XMMSG,XMWHICH,XMZLIST,I
77 ; XMPRTHDR 1=Print header
78 ; 0=don't (headerless print)
79 ; XMRECIPS 0=Don't print recipients
80 ; 1=Print summary recipients
81 ; 2=Print detail recipients
82 S XMABORT=0
83 S:$G(XMPRTHDR)="" XMPRTHDR=1 ; default is to print with headers
84 I $D(^TMP("XM",$J,".")) D
85 . D LISTSEL(.XMZLIST)
86 E D Q:XMABORT
87 . D WHICH^XMJMORX1($S(XMPRTHDR:34317,1:34317.1),0,.XMWHICH,.XMABORT) Q:XMABORT
88 . D LIST(.XMWHICH,.XMZLIST)
89 I '$D(XMZLIST) W !!,$$EZBLD^DIALOG(34319) Q ; No valid messages selected.
90 I +XMZLIST(1)=XMZLIST(1) D
91 . D PRTONE^XMJMOR(XMDUZ,$$BSKT^XMXUTIL2(XMDUZ,XMZLIST(1)),XMZLIST(1),XMPRTHDR,.XMABORT)
92 E D
93 . D QRECIP^XMJMP(.XMRECIPS,.XMABORT) Q:XMABORT
94 . F I="DUZ","XMDUZ","XMV(","XMZLIST(","XMRECIPS","XMPRTHDR" S XMSAVE(I)=""
95 . D EN^XUTMDEVQ("PLISTX^XMJMP",$$EZBLD^DIALOG(34501),.XMSAVE) ; MailMan: Print
96 . I $G(POP) S XMABORT=1 Q
97 . W:$D(XMMSG) !!,XMMSG
98 Q:$G(XMTYPE)'["N"!XMABORT
99 N XMKZ,XMZ,XMRANGE
100 I $D(^TMP("XM",$J,".")) D Q
101 . S XMKZ=""
102 . F S XMKZ=$O(^TMP("XM",$J,".",XMKZ)) Q:'XMKZ D
103 . . S XMZ=$P(^TMP("XM",$J,"MSG",XMKZ),U,3)
104 . . Q:$D(^XMB(3.7,XMDUZ,XMTYPE,XMK,XMZ))
105 . . K ^TMP("XM",$J,"MSG",XMKZ)
106 . . K ^TMP("XM",$J,".",XMKZ)
107 F I=1:1:$L(XMWHICH,",") D
108 . S XMRANGE=$P(XMWHICH,",",I)
109 . Q:'XMRANGE
110 . F XMKZ=$P(XMRANGE,"-",1):1:$S(XMRANGE["-":$P(XMRANGE,"-",2),1:XMRANGE) D
111 . . Q:'$D(^TMP("XM",$J,"MSG",XMKZ))
112 . . S XMZ=$P(^TMP("XM",$J,"MSG",XMKZ),U,3)
113 . . K:'$D(^XMB(3.7,XMDUZ,XMTYPE,XMK,XMZ)) ^TMP("XM",$J,"MSG",XMKZ)
114 Q
115LISTSEL(XMZLIST) ;
116 N XMKZ,J,XMZ
117 S (XMKZ,J)=0
118 F S XMKZ=$O(^TMP("XM",$J,".",XMKZ)) Q:'XMKZ D
119 . S XMZ=$P(^TMP("XM",$J,"MSG",XMKZ),U,3)
120 . I J=0 S J=1,XMZLIST(1)=XMZ Q
121 . I $L(XMZLIST(J))+$L(XMZ)>240 S J=J+1,XMZLIST(J)=XMZ Q
122 . S XMZLIST(J)=XMZLIST(J)_","_XMZ
123 Q
124LIST(XMWHICH,XMZLIST) ;
125 N I,J,XMRANGE,XMKZ,XMZ
126 S J=0
127 F I=1:1:$L(XMWHICH,",") D
128 . S XMRANGE=$P(XMWHICH,",",I)
129 . Q:'XMRANGE
130 . F XMKZ=$P(XMRANGE,"-",1):1:$S(XMRANGE["-":$P(XMRANGE,"-",2),1:XMRANGE) D
131 . . S XMZ=$P($G(^TMP("XM",$J,"MSG",XMKZ)),U,3) Q:'XMZ
132 . . I J=0 S J=1,XMZLIST(1)=XMZ Q
133 . . I $L(XMZLIST(J))+$L(XMZ)>240 S J=J+1,XMZLIST(J)=XMZ Q
134 . . S XMZLIST(J)=XMZLIST(J)_","_XMZ
135 Q
136SAVE(XMDUZ,XMKALL,XMK) ; Save a range of messages to another basket
137 N XMWHICH,XMMSG,XMABORT,XMKTO,XMDIC,XMKNTO
138 S XMABORT=0
139 S XMDIC("B")="@" ; no default bskt
140 I $D(^TMP("XM",$J,".")) D
141 . D SELBSKT^XMJBU(XMDUZ,$$EZBLD^DIALOG(34325),"L",.XMDIC,.XMKTO,.XMKNTO) I XMKTO=U S XMABORT=1 Q ; Save messages to which basket?
142 . I 'XMKALL,XMKTO=XMK S XMMSG=$$EZBLD^DIALOG(34326) Q ; Same basket. No messages saved.
143 . D SELMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XSAVE",34324,0,.XMMSG)
144 . K:'XMKALL ^TMP("XM",$J,".")
145 E D
146 . D WHICH^XMJMORX1(34323,0,.XMWHICH,.XMABORT) Q:XMABORT
147 . D SELBSKT^XMJBU(XMDUZ,$$EZBLD^DIALOG(34325),"L",.XMDIC,.XMKTO,.XMKNTO) ; Save messages to which basket?
148 . I XMKTO=U S XMABORT=1 Q
149 . I 'XMKALL,XMKTO=XMK S XMMSG=$$EZBLD^DIALOG(34326) Q ; Same basket. No messages saved.
150 . D ACTMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,XMWHICH,"XSAVE",34324,.XMMSG)
151 Q:XMABORT
152 W:$D(XMMSG) !,XMMSG
153 Q
154TERM(XMDUZ,XMKALL,XMK) ; Terminate a range of messages
155 N XMMSG,XMABORT
156 S XMABORT=0
157 I $D(^TMP("XM",$J,".")) D
158 . D SELMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XTERM",34329,34330,.XMMSG,.XMABORT)
159 . ;K:'XMKALL ^TMP("XM",$J,".")
160 E D
161 . D ACTWHICH^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XTERM",34328,34329,34330.1,.XMMSG,.XMABORT)
162 Q:XMABORT
163 Q:'$D(XMMSG)
164 W !,XMMSG
165 I XMMSG W !,$$EZBLD^DIALOG($S(XMK<1:34331.1,1:34331)) ; You won't see future responses. (In WASTE basket)
166 Q
167VAPOR(XMDUZ,XMKALL,XMK) ; Set vaporize date for a range of messages
168 N XMWHICH,XMMSG,XMABORT,XMWHEN
169 S XMABORT=0
170 I $D(^TMP("XM",$J,".")) D
171 . D VAPRDATE^XMJMOR(.XMWHEN,.XMABORT) Q:XMABORT
172 . D SELMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XVAPOR^XMXMSGS2",$S(XMWHEN="@":34337.2,1:34337),$S(XMWHEN="@":34338.2,1:34338),.XMMSG)
173 E D
174 . D VAPRDATE^XMJMOR(.XMWHEN,.XMABORT) Q:XMABORT
175 . D WHICH^XMJMORX1($S(XMWHEN="@":34336.1,1:34336),$S(XMWHEN="@":34338.3,1:34338.1),.XMWHICH,.XMABORT) Q:XMABORT
176 . D ACTMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,XMWHICH,"XVAPOR^XMXMSGS2",34337,.XMMSG)
177 Q:XMABORT
178 W:$D(XMMSG) !,XMMSG
179 Q
180XMTPRI(XMDUZ,XMKALL,XMK) ; Toggle transmit priority
181 ; XMDUZ better be .5 and XMK better be > 1000!
182 N XMTPRI,XMWHICH,XMMSG,XMABORT
183 S XMABORT=0
184 I $D(^TMP("XM",$J,".")) D
185 . D ASKPRI(.XMTPRI,.XMABORT) Q:XMABORT
186 . D SELMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,"XXP^XMXMSGS1",34334,34335,.XMMSG,.XMABORT)
187 E D
188 . D WHICH^XMJMORX1(34333,34335.1,.XMWHICH,.XMABORT) Q:XMABORT
189 . D ASKPRI(.XMTPRI,.XMABORT) Q:XMABORT
190 . D ACTMSG^XMJMORX1(XMDUZ,1,XMKALL,XMK,XMWHICH,"XXP^XMXMSGS1",34334,.XMMSGT)
191 Q:XMABORT
192 W:$D(XMMSG) !,XMMSG
193 Q
194ASKPRI(XMTPRI,XMABORT) ;
195 N XMTXT,XMOPT,XMOX,XMDIR
196 D SET^XMXSEC1("H",34332.3,.XMOPT,.XMOX) ; H:High
197 D SET^XMXSEC1("L",34332.1,.XMOPT,.XMOX) ; L:Low
198 D SET^XMXSEC1("N",34332.2,.XMOPT,.XMOX) ; N:Normal
199 S XMDIR("A")=$$EZBLD^DIALOG(34332) ; Select transmit priority:
200 I $G(XMTPRI)'="" D
201 . S XMTXT=XMOPT(XMTPRI)
202 . S XMDIR("B")=XMOX("O",XMTPRI)_":"_XMTXT
203 S XMDIR("??")="XM-U-B-XMIT PRIORITY TOGGLE"
204 D XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMTPRI,.XMABORT) Q:XMABORT
205 S XMTPRI=$S(XMTPRI="N":0,XMTPRI="H":1,1:2)
206 Q
Note: See TracBrowser for help on using the repository browser.