source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMJMR.m@ 1806

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

initial load of WorldVistAEHR

File size: 5.0 KB
Line 
1XMJMR ;ISC-SF/GMB-Interactive Reply ;04/24/2002 10:28
2 ;;8.0;MailMan;;Jun 28, 2002
3 ; Replaces REPLY^XMA11,^XMA2,^XMA20,^XMAH1 (ISC-WASH/CAP/THM)
4REPLY(XMDUZ,XMK,XMKN,XMZO,XMZOSUBJ,XMZOFROM,XMINSTR,XMPTR,XMRESPSO,XMINCL,XMRESP) ;
5 N XMABORT,XMZ,XMID,XMWHICH,XMZI
6 S XMABORT=0
7 D INIT^XMJMR1(XMDUZ,.XMK,.XMKN,XMZO,XMZOSUBJ,XMZOFROM,.XMINSTR,XMINCL,.XMZI,.XMWHICH,.XMABORT) Q:XMABORT
8 D CRE8XMZ^XMXSEND("R"_XMZO,.XMZ,1) I XMZ<1 S XMABORT=1 Q
9 S XMID=$S(XMDUZ=.6:DUZ,1:XMDUZ)
10 D EDITON^XMJMS(XMID,XMZ,XMZO)
11 D PROCESS(XMID,XMK,XMKN,XMZO,XMZOSUBJ,XMZOFROM,XMZ,.XMINSTR,XMPTR,XMRESPSO,.XMRESP,.XMZI,.XMWHICH,.XMABORT)
12 I XMABORT=DTIME D HALT^XMJMS($$EZBLD^DIALOG(34220)) ; replying to
13 D EDITOFF^XMJMS(XMID)
14 D:XMABORT KILLMSG^XMXUTIL(XMZ)
15 Q
16PROCESS(XMDUZ,XMK,XMKN,XMZO,XMZOSUBJ,XMZOFROM,XMZ,XMINSTR,XMPTR,XMRESPSO,XMRESP,XMZI,XMWHICH,XMABORT) ;
17 N XMRESTR
18 S XMRESTR("REPLYTO")=XMZO
19 D:$D(XMWHICH) COPYTEXT^XMJMR1(XMZI,XMZ,XMWHICH,(XMZI'=XMZO))
20 D BODY^XMJMS(XMDUZ,XMZ,XMZOSUBJ,.XMRESTR,.XMABORT) Q:XMABORT
21 D REPLYMSG^XMJMRO(XMDUZ,XMK,XMKN,XMZO,XMZ,XMZOSUBJ,.XMRESTR,XMPTR,XMRESPSO,.XMRESP,.XMABORT) Q:XMABORT
22 I XMZOFROM["@",$$UP^XLFSTR(XMZOFROM)'["POSTMASTER" D REMOTE(XMDUZ,XMZO,XMZOSUBJ,XMZ,.XMINSTR)
23 Q
24REMOTE(XMDUZ,XMZO,XMZOSUBJ,XMZ,XMINSTR) ;
25 N DIR,Y,XMSUBJ,XMTO,XMABORT
26 S XMABORT=0
27 S DIR("A")=$$EZBLD^DIALOG(34206) ; Do you wish to send this reply across the network?
28 S DIR(0)="Y",DIR("B")=$$EZBLD^DIALOG(39053) ; No
29 D BLD^DIALOG(34207,"","","DIR(""?"")") ; Enter YES if you wish your response ...
30 S DIR("??")="^D RHELP^XMJMR"
31 D ^DIR Q:'Y!$D(DIRUT)
32 S XMRE=$$EZBLD^DIALOG(37006) ; Re:
33 S XMSUBJ=$S($$UP^XLFSTR($E(XMZOSUBJ,1,$L(XMRE)))=$$UP^XLFSTR(XMRE):XMZOSUBJ,1:$E(XMRE_XMZOSUBJ,1,65))
34 D SUBJ^XMJMS(.XMSUBJ,.XMABORT) Q:XMABORT
35 D REPLYTO(XMZO,.XMTO,.XMABORT) Q:XMABORT
36 W !,$$EZBLD^DIALOG(34211,XMTO) ; Addressing the reply to: |1|
37 D INIT^XMXADDR
38 S XMINSTR("EXACT")=1 ; Match on exact domain name
39 D ADDR^XMXADDR(XMDUZ,XMTO,.XMINSTR)
40 K XMINSTR("EXACT")
41 ;S:XMTO[".VA.GOV" XMTO=$TR($P(XMTO,"@"),"._+",", .")_"@"_$P(XMTO,"@",2)
42 I $$GOTADDR^XMXADDR D
43 . W !,$$EZBLD^DIALOG(34212) ; Sending network reply...
44 . D NETREPLY^XMXREPLY(XMDUZ,XMZO,XMZ,XMSUBJ,.XMINSTR)
45 . W $$EZBLD^DIALOG(34213) ; Sent
46 D CLEANUP^XMXADDR
47 Q
48RHELP ;
49 N XMTEXT
50 D BLD^DIALOG(34208,"","","XMTEXT","F") ; A network response will go to all message ... (explains network reply)
51 D MSG^DIALOG("WH","","","","XMTEXT")
52 Q
53REPLYTO(XMZ,XMFROM,XMABORT) ;
54 N XMREPLTO,XMF,XMR
55 D REPLYTO^XMXREPLY(XMZ,.XMFROM,.XMREPLTO)
56 S XMF=XMFROM
57 S XMFROM=$$REMADDR^XMXADDR3(XMFROM)
58 Q:$G(XMREPLTO)=""
59 S XMR=XMREPLTO
60 S XMREPLTO=$$REMADDR^XMXADDR3(XMREPLTO)
61 Q:$$UP^XLFSTR(XMREPLTO)=$$UP^XLFSTR(XMFROM)
62 N DIR,Y
63 S DIR(0)="S^"
64 S DIR(0)=DIR(0)_"F:'FROM' "_XMF
65 S DIR(0)=DIR(0)_";R:'REPLY-TO' "_XMR
66 S DIR("B")="R"
67 D BLD^DIALOG(34214,"","","DIR(""A"")") ; This message has a 'reply-to' address ... (use which address?)
68 D BLD^DIALOG(34215,"","","DIR(""?"")") ; Generally, we recommend that you use ...
69 D ^DIR I $D(DIRUT) S XMABORT=1 Q
70 S:Y="R" XMFROM=XMREPLTO
71 Q
72RECOVER(XMDUZ,XMZ,XMZO) ;
73 I XMDUZ'=DUZ,$$ZCONFID^XMXSEC(XMZO) D Q
74 . ; If user is surrogate & msg is confidential, delete unsent reply.
75 . D EDITOFF^XMJMS(XMDUZ)
76 . D KILLMSG^XMXUTIL(XMZ)
77 N XMSUBJ,DIR,Y,XMTEXT
78 S XMSUBJ=$P(^XMB(3.9,XMZO,0),U,1)
79 S:XMSUBJ["~U~" XMSUBJ=$$DECODEUP^XMXUTIL1(XMSUBJ)
80 W $C(7),!
81 ;You have / |1| has an unsent response in your buffer.
82 D BLD^DIALOG($S(XMDUZ=DUZ:34222,1:34222.1),XMV("NAME"),"","XMTEXT","F")
83 ;Subj: _XMSUBJ
84 D BLD^DIALOG(34536,XMSUBJ,"","XMTEXT","FS")
85 D MSG^DIALOG("WM","",79,"","XMTEXT")
86 W !
87 ;You may continue to reply, or delete the remaining text.
88 ;Shall we delete the unsent response?
89 D BLD^DIALOG(34222.3,"","","DIR(""A"")")
90 S DIR(0)="Y"
91 S DIR("B")=$$EZBLD^DIALOG(39053) ; No
92 D BLD^DIALOG(34223,"","","DIR(""?"")") ; Enter YES to delete the unsent response...
93 D ^DIR
94 I $D(DTOUT) D HALT^XMJMS($$EZBLD^DIALOG(34221)) ; recovering
95 I Y=1!$D(DUOUT) D Q
96 . D EDITOFF^XMJMS(XMDUZ)
97 . D KILLMSG^XMXUTIL(XMZ)
98 N XMK,XMKN,XMZOSUBJ,XMZOFROM,XMINSTR,XMABORT,XMSECURE,XMPAKMAN,XMWHICH,XMPTR,XMRESPSO,XMRESP
99 S XMABORT=0
100 D RECINIT(XMDUZ,XMZO,.XMK,.XMKN,.XMZOSUBJ,.XMZOFROM,.XMINSTR,.XMPTR,.XMRESPSO,.XMRESP)
101 D WAIT^XMXUTIL
102 D INIT^XMJMR1(XMDUZ,.XMK,.XMKN,XMZO,XMZOSUBJ,XMZOFROM,.XMINSTR,0,"",.XMWHICH,.XMABORT) Q:XMV("NOSEND")
103 I XMABORT D HALT^XMJMS($$EZBLD^DIALOG(34221)) ; recovering
104 D PROCESS(XMDUZ,XMK,XMKN,XMZO,XMZOSUBJ,XMZOFROM,XMZ,.XMINSTR,XMPTR,XMRESPSO,.XMRESP,"",.XMWHICH,.XMABORT)
105 I XMABORT=DTIME D HALT^XMJMS($$EZBLD^DIALOG(34220)) ; replying to
106 D EDITOFF^XMJMS(XMDUZ)
107 D:XMABORT KILLMSG^XMXUTIL(XMZ)
108 Q
109RECINIT(XMDUZ,XMZO,XMK,XMKN,XMZOSUBJ,XMZOFROM,XMINSTR,XMPTR,XMRESPSO,XMRESP) ;
110 N XMSECBAD,XMIM,XMIU
111 S XMK=+$O(^XMB(3.7,"M",XMZO,XMDUZ,""))
112 S XMKN=$P($G(^XMB(3.7,XMDUZ,2,XMK,0)),U,1)
113 D DISPMSG^XMJMP(XMDUZ,XMK,XMKN,XMZO,.XMSECBAD,1)
114 I $G(XMSECBAD) D HALT^XMJMS($$EZBLD^DIALOG(34221)) ; recovering
115 D INMSG^XMXUTIL2(XMDUZ,0,XMZO,"","I",.XMIM,.XMINSTR,.XMIU)
116 S XMZOSUBJ=XMIM("SUBJ")
117 S XMZOFROM=XMIM("FROM")
118 S XMRESPSO=XMIM("RESPS")
119 S XMPTR=XMIU("IEN")
120 S XMRESP=XMIU("RESP")
121 Q
Note: See TracBrowser for help on using the repository browser.