source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMJMSO.m@ 1042

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

initial load of WorldVistAEHR

File size: 7.5 KB
Line 
1XMJMSO ;ISC-SF/GMB-Options at 'send' transmit prompt ;07/17/2003 14:06
2 ;;8.0;MailMan;**20**;Jun 28, 2002
3 ; Replaces ^XMA22 (ISC-WASH/CAP/THM)
4SENDMSG(XMDUZ,XMZ,XMSUBJ,XMINSTR,XMRESTR,XMABORT) ;
5 N XMFINISH,XMDIR,XMY,XMOPT,XMOX
6 I $$BCAST,'$D(XMINSTR("VAPOR")),$$QVAPOR D V
7 S XMFINISH=0
8 F D Q:XMFINISH!XMABORT
9 . D SENDSET(.XMINSTR,.XMOPT,.XMOX,.XMDIR)
10 . D XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMY,.XMABORT) Q:XMABORT
11 . K XMDIR,XMOPT,XMOX
12 . D @XMY
13 Q
14SENDSET(XMINSTR,XMOPT,XMOX,XMDIR) ;
15 D OPTEDIT^XMXSEC2(.XMINSTR,.XMOPT,.XMOX,1)
16 D SET^XMXSEC2("B",37331,.XMOPT,.XMOX) ; Backup to review message
17 D SET^XMXSEC2("ER",37332,.XMOPT,.XMOX) ; Edit Recipients
18 D SET^XMXSEC2("L",37333,.XMOPT,.XMOX) ; Transmit later
19 D SET^XMXSEC2("IM",37445,.XMOPT,.XMOX) ; Include responses from another message
20 D SET^XMXSEC2("T",37334,.XMOPT,.XMOX) ; Transmit now
21 I $G(XMOPT("NS","?"))=37309.1 K XMOPT("NS","?") ; You have no Network Signature.
22 S XMDIR("A")=$$EZBLD^DIALOG(34067) ; Select Message option:
23 S XMDIR("B")=XMOX("O","T")_":"_XMOPT("T") ; Transmit now
24 S XMDIR("??")="XM-U-MO-SEND"
25 Q
26B ; Backup to review message
27 D BACKUP^XMJMP(XMDUZ,0,"",XMZ)
28 ; OR D PRINTIT^XMJMP1(....)
29 Q
30FLAGTOGL(XMINSTR,XMFLAG,XMSET,XMREMOVE) ; Flag Toggle
31 I $G(XMINSTR("FLAGS"))[XMFLAG D
32 . S XMINSTR("FLAGS")=$TR(XMINSTR("FLAGS"),XMFLAG)
33 . W !,$$EZBLD^DIALOG(XMREMOVE)
34 E D
35 . S XMINSTR("FLAGS")=$G(XMINSTR("FLAGS"))_XMFLAG
36 . W !,$$EZBLD^DIALOG(XMSET)
37 Q
38C ; Confidential msg
39 D FLAGTOGL(.XMINSTR,"C",37301.9,37302.9)
40 Q
41D ; Deliver to recipient basket
42 I $D(XMINSTR("RCPT BSKT")) D Q
43 . K XMINSTR("RCPT BSKT")
44 . W !,$$EZBLD^DIALOG(37304.9) ; Delivery basket removed.
45 N XMTEXT
46 W !
47 D BLD^DIALOG(37303.1,"","","XMTEXT","F")
48 D MSG^DIALOG("WM","",80,"","XMTEXT")
49 W !
50 ;The delivery basket is the basket to which this message should be delivered
51 ;for all recipients (even future ones, should the message be forwarded).
52 ;Any message filters, which the recipient might have, are ignored."
53 ;If the basket does not exist, it will be created."
54 ;Note: The recipients must have chosen to allow delivery baskets by setting
55 ;ACCEPT DELIVERY BASKET? under 'Personal Preferences|Delivery Basket Edit'
56 ;to one of the following:
57 ; YES - If basket doesn't exist, create it, and deliver the message to it.
58 ; EXIST - If the basket already exists, then deliver the message to it.
59 ; Else, just deliver the message as usual.
60 ; SELECT - If the basket already exists AND accepts such messages,
61 ; then deliver the message to it.
62 ; Else, just deliver the message as usual.
63 ;If the recipient has not set this field or has set it to NO, then
64 ;the message would be delivered as usual.
65 N XMDIC,XMK,XMKN
66 S XMDIC("B")="@"
67 S XMDIC("S")="I Y>1"
68 D SELBSKT^XMJBU(XMDUZ,$$EZBLD^DIALOG(37303.2),"L",.XMDIC,.XMK,.XMKN) ; Select delivery basket:
69 Q:XMK=U
70 S XMINSTR("RCPT BSKT")=XMKN
71 Q
72ER ; Additional Recipients
73 D TOWHOM^XMJMT(XMDUZ,$$EZBLD^DIALOG(34110),.XMINSTR,.XMRESTR,.XMABORT) ; Send
74 Q
75ES ; Edit Subject
76 N XMOLDSUB,XMABORT
77 S XMOLDSUB=XMSUBJ,XMABORT=0
78 D SUBJ^XMJMS(.XMSUBJ,.XMABORT) Q:XMABORT
79 Q:XMSUBJ=XMOLDSUB
80 N XMFDA
81 S XMFDA(3.9,XMZ_",",.01)=XMSUBJ
82 D FILE^DIE("","XMFDA")
83 Q
84ET ; Edit msg
85 I $G(XMPAKMAN) Q:$$NOPAKEDT
86 D BODY^XMJMS(XMDUZ,XMZ,XMSUBJ,.XMRESTR,.XMABORT)
87 Q
88NOPAKEDT() ; Function returns 0 if OK to edit; 1, if not OK.
89 I $D(XMSECURE) W !,$$EZBLD^DIALOG(37405.4) Q 1 ; You may not edit a secure KIDS or PackMan message.
90 N DIR,X,Y,DIRUT
91 W @IOF
92 N XMTEXT
93 D BLD^DIALOG(37306.1,"","","XMTEXT","F")
94 D MSG^DIALOG("WM","",80,"","XMTEXT")
95 ; W A R N I N G
96 ; You are about to edit what appears to be a PackMan message.
97 ; Please note the following:
98 ; 1. If you edit this message you may compromise its integrity.
99 ; 2. If you must edit it,
100 ; - Do not edit the code.
101 ; - Confine your editing to the text (the lines between $TXT and $ENDTXT).
102 ; - You may insert lines in the text.
103 ; - Do not begin any line with a '$' (dollar sign).
104 ; - Be careful!
105 S DIR(0)="Y"
106 S DIR("A")=$$EZBLD^DIALOG(37306.2) ; Are you sure you want to edit this message
107 S DIR("B")=$$EZBLD^DIALOG(39053) ; NO
108 D ^DIR
109 Q 'Y
110I ; Information only msg
111 D FLAGTOGL(.XMINSTR,"I",37307.9,37308.9)
112 Q
113IM ; Include responses from another message
114 I $G(XMPAKMAN) D Q
115 . W !,$$EZBLD^DIALOG(37445.4) ; You may not Include anything into a KIDS or PackMan message.
116 D INCL^XMJMRO(XMDUZ,XMZ,XMZ,XMSUBJ,.XMRESTR,2,.XMABORT)
117 Q
118L ; Transmit Later
119 N DIR,X,Y,XMWHEN,ZTRTN,ZTDTH,ZTDESC,ZTIO,ZTSAVE,ZTSK,XMROOT,I,DIRUT
120 I $E($O(^TMP("XMY0",$J,"G.")),1,2)="G." D
121 . ;Note: When you send a message Later, it is sent to all members of
122 . ;the groups to which you addressed it, even if you 'minus'ed anyone.
123 . ;To have your 'minus'es honored, you must ^-out of this and Transmit
124 . ;Now, not Later. If you didn't 'minus' anyone from the groups, just
125 . ;ignore this note, and continue ...
126 . N XMTEXT
127 . W !
128 . D BLD^DIALOG(37333.3,"","","XMTEXT","F")
129 . D MSG^DIALOG("WM","",80,"","XMTEXT")
130 . W !
131 S DIR(0)="D^NOW:"_$$SCH^XLFDT("12M",DT)_":ETX"
132 S DIR("A")=$$EZBLD^DIALOG(37333.1) ; Enter Date@time at which to send this message
133 D ^DIR Q:$D(DIRUT)
134 S XMWHEN=Y
135 W !,$$EZBLD^DIALOG(37333.2) ; Latering ...
136 S ZTIO=""
137 S ZTRTN="LATER^XMXSEND"
138 S ZTDTH=$$FMTH^XLFDT(XMWHEN)
139 S ZTDESC=$$EZBLD^DIALOG(39310) ; MailMan: Send Message Later
140 S XMROOT=$$GET1^DIQ(3.9,XMZ_",",3,"","^TMP(""XM"",$J,""BODY"")")
141 F I="DUZ","XMDUZ","XMSUBJ","^TMP(""XMY0"",$J,","^TMP(""XM"",$J,""BODY"",","XMINSTR(" S ZTSAVE(I)=""
142 D ^%ZTLOAD
143 ;D HOME^%ZIS call this only if preceded by call to ^%ZIS
144 I $D(ZTSK) D
145 . S XMFINISH=1
146 . W $$EZBLD^DIALOG(37333.9,ZTSK) ; Latered (Task #_ZTSK_)
147 . D KILLMSG^XMXUTIL(XMZ)
148 . D CLEANUP^XMXADDR
149 E D
150 . W !,$C(7),$$EZBLD^DIALOG(37333.8) ; Latering was not successful. Try again or transmit now.
151 K ^TMP("XM",$J,"BODY")
152 Q
153NS ; Add Network Signature
154 I '$$GOTNS^XMVVITA(XMDUZ) D Q:'$$GOTNS^XMVVITA(XMDUZ)
155 . W !!,$$EZBLD^DIALOG(37309.1) ; You have no Network Signature.
156 . D CRE8NS^XMVVITA
157 N XMMSG
158 D NETSIG^XMXEDIT(XMDUZ,XMZ,.XMINSTR,.XMMSG)
159 W !,XMMSG
160 Q
161P ; Priority msg
162 D FLAGTOGL(.XMINSTR,"P",37311.9,37312.9)
163 Q
164R ; Confirm receipt of msg
165 D FLAGTOGL(.XMINSTR,"R",37313.9,37314.9)
166 Q
167S ; Scramble text
168 I $D(XMINSTR("SCR KEY")) D Q
169 . K XMINSTR("SCR KEY"),XMINSTR("SCR HINT")
170 . W !,$$EZBLD^DIALOG(37316.8) ; Scramble removed
171 N XMKEY,XMHINT,XMABORT
172 S XMABORT=0
173 D CRE8KEY^XMJMCODE(.XMKEY,.XMHINT,.XMABORT)
174 I XMABORT W !,$$EZBLD^DIALOG(37315.8) Q ; Scramble aborted.
175 S XMINSTR("SCR KEY")=XMKEY
176 S XMINSTR("SCR HINT")=XMHINT
177 Q
178T ; Transmit now
179 S XMFINISH=1
180 W $$EZBLD^DIALOG(34217,XMZ) ; Sending [_XMZ_]...
181 D MOVEPART^XMXSEND(XMDUZ,XMZ,.XMINSTR)
182 D SEND^XMKP(XMDUZ,XMZ,.XMINSTR)
183 D CHECK^XMKPL
184 W !,$$EZBLD^DIALOG(34213) ; Sent
185 Q
186V ; Vaporize date
187 I $G(XMINSTR("VAPOR")) D Q
188 . K XMINSTR("VAPOR")
189 . W !,$$EZBLD^DIALOG(37318.9) ; Vaporize Date removed
190 N DIR,X,Y,DIRUT,XMTP1
191 S XMTP1=$$FMADD^XLFDT($$NOW^XLFDT,,1)
192 S DIR(0)="3.9,1.6"
193 S DIR("A")=$$EZBLD^DIALOG(37317.1) ; Enter Vaporize Date
194 S DIR("B")=$$MMDT^XMXUTIL1($$FMADD^XLFDT(DT,30))
195V2 D ^DIR Q:$D(DIRUT)
196 I Y<XMTP1 D G V2
197 . W " ??",$C(7),!,$$EZBLD^DIALOG(37317.2),! ; Must be no earlier than 1 hour from now.
198 S XMINSTR("VAPOR")=Y
199 Q
200X ; Closed msg
201 D FLAGTOGL(.XMINSTR,"X",37319.9,37320.9)
202 Q
203BCAST() ; Is this a broadcast (regular or limited)?
204 N XMTO
205 S XMTO=$O(^TMP("XMY0",$J,"*"))
206 I $E(XMTO)="*" Q 1
207 Q 0
208QVAPOR() ;
209 N DIR
210 W !
211 S DIR(0)="Y"
212 D BLD^DIALOG(37350,"","","DIR(""A"")")
213 D BLD^DIALOG(37351,"","","DIR(""?"")")
214 S DIR("??")="XM-U-M-VAPORIZE DATE SEND"
215 S DIR("B")=$$EZBLD^DIALOG(39054) ; Yes
216 D ^DIR Q:$D(DIRUT) 0
217 Q Y
Note: See TracBrowser for help on using the repository browser.