XMJMRO ;ISC-SF/GMB-Options at 'reply' transmit prompt ;12/05/2001 15:40
;;8.0;MailMan;;Jun 28, 2002
; Replaces ^XMA22 (ISC-WASH/CAP/THM)
REPLYMSG(XMDUZ,XMK,XMKN,XMZO,XMZ,XMSUBJ,XMRESTR,XMPTR,XMRESPSO,XMRESP,XMABORT) ;
N XMFINISH,XMLINE,XMDIR,XMY,XMOPT,XMOX
S XMFINISH=0
F D Q:XMFINISH!XMABORT
. N XMNAME
. I XMPTR D CHKRESP^XMJMP(XMDUZ,XMZO,XMRESPSO,XMRESP)
. D REPLYSET(XMDUZ,.XMOPT,.XMOX,.XMDIR)
. D XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMY,.XMABORT) Q:XMABORT
. K XMDIR,XMOPT,XMOX
. D @XMY
Q
REPLYSET(XMDUZ,XMOPT,XMOX,XMDIR) ;
D SET^XMXSEC2("B",37331,.XMOPT,.XMOX) ; Backup to review message
D SET^XMXSEC2("E",37341,.XMOPT,.XMOX) ; Edit Reply
D SET^XMXSEC2("I",37342,.XMOPT,.XMOX) ; Include previous responses in reply
D SET^XMXSEC2("Q",37417,.XMOPT,.XMOX) ; Query
D SET^XMXSEC2("Q xxx",37420.1,.XMOPT,.XMOX) ; Query recipient(s) xxx
D SET^XMXSEC2("QD",37418,.XMOPT,.XMOX) ; Query Detailed
D SET^XMXSEC2("QN",37419,.XMOPT,.XMOX) ; Query Network
D SET^XMXSEC2("QC",37431,.XMOPT,.XMOX) ; Query Current
D SET^XMXSEC2("QNC",37432,.XMOPT,.XMOX) ; Query Not Current
D SET^XMXSEC2("QT",37433,.XMOPT,.XMOX) ; Query Terminated
D SET^XMXSEC2("T",37334,.XMOPT,.XMOX) ; Transmit now
S XMDIR("A")=$$EZBLD^DIALOG(34067) ; Select Message option:
S XMDIR("B")=XMOX("O","T")_":"_XMOPT("T")
S XMDIR("PRE")="I XMX?1(1"""_XMOX("O","Q")_" "",1"""_$$LOW^XLFSTR(XMOX("O","Q"))_" "",1"""_XMOX("O","QD")_" "",1"""_$$LOW^XLFSTR(XMOX("O","QD"))_" "").E S XMNAME=$P(XMX,"" "",2,99),XMX="""_XMOX("O","QD")_""""
S XMDIR("??")="XM-U-MO-REPLY"
Q
B ; Backup to review message
D BACKUP^XMJMP(XMDUZ,XMK,XMKN,XMZO)
S XMRESP=$P($G(^XMB(3.9,XMZO,1,XMPTR,0)),U,2)
Q
E ; Edit msg
D BODY^XMJMS(XMDUZ,XMZ,XMSUBJ,.XMRESTR,.XMABORT)
Q
I ; Include responses from this or another message in reply
D INCL(XMDUZ,XMZO,XMZ,XMSUBJ,.XMRESTR,1,.XMABORT)
Q
INCL(XMDUZ,XMZO,XMZ,XMSUBJ,XMRESTR,XMINCL,XMABORT) ; Include responses in a message
N XMWHICH,XMNONE,XMZI
S XMNONE=0
D WHICH^XMJMR1(XMDUZ,XMZO,XMINCL,.XMZI,.XMWHICH,.XMNONE) Q:XMNONE
Q:'$D(XMWHICH)
D COPYTEXT^XMJMR1(XMZI,XMZ,XMWHICH,(XMZI'=XMZO))
D BODY^XMJMS(XMDUZ,XMZ,XMSUBJ,.XMRESTR,.XMABORT)
Q
Q ; Query
D Q^XMJMQ(XMDUZ,XMK,XMKN,XMZO)
Q
QC ; Query Current
D QX^XMJMQ(XMDUZ,XMK,XMKN,XMZO,"QC")
Q
QD ; Query Detailed
I $D(XMNAME) D QNAMEX^XMJMQ(XMDUZ,XMK,XMKN,XMZO,XMNAME) Q
D QD^XMJMQ(XMDUZ,XMK,XMKN,XMZO)
Q
QN ; Query Network
D QN^XMJMQ(XMDUZ,XMK,XMKN,XMZO)
Q
QNC ; Query Not Current
D QX^XMJMQ(XMDUZ,XMK,XMKN,XMZO,"QNC")
Q
QT ; Query Terminated
D QX^XMJMQ(XMDUZ,XMK,XMKN,XMZO,"QT")
Q
T ; Transmit now
N XMIA
S (XMFINISH,XMIA)=1
W $$EZBLD^DIALOG(34216) ; Sending local reply...
D DOREPLY^XMXREPLY(XMDUZ,XMZO,XMZ)
W !,$$EZBLD^DIALOG(34213) ; Sent
Q
XMJMRO ;ISC-SF/GMB-Options at 'reply' transmit prompt ;12/05/2001 15:40
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; Replaces ^XMA22 (ISC-WASH/CAP/THM)
REPLYMSG(XMDUZ,XMK,XMKN,XMZO,XMZ,XMSUBJ,XMRESTR,XMPTR,XMRESPSO,XMRESP,XMABORT) ;
+1 NEW XMFINISH,XMLINE,XMDIR,XMY,XMOPT,XMOX
+2 SET XMFINISH=0
+3 FOR
Begin DoDot:1
+4 NEW XMNAME
+5 IF XMPTR
DO CHKRESP^XMJMP(XMDUZ,XMZO,XMRESPSO,XMRESP)
+6 DO REPLYSET(XMDUZ,.XMOPT,.XMOX,.XMDIR)
+7 DO XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMY,.XMABORT)
IF XMABORT
QUIT
+8 KILL XMDIR,XMOPT,XMOX
+9 DO @XMY
End DoDot:1
IF XMFINISH!XMABORT
QUIT
+10 QUIT
REPLYSET(XMDUZ,XMOPT,XMOX,XMDIR) ;
+1 ; Backup to review message
DO SET^XMXSEC2("B",37331,.XMOPT,.XMOX)
+2 ; Edit Reply
DO SET^XMXSEC2("E",37341,.XMOPT,.XMOX)
+3 ; Include previous responses in reply
DO SET^XMXSEC2("I",37342,.XMOPT,.XMOX)
+4 ; Query
DO SET^XMXSEC2("Q",37417,.XMOPT,.XMOX)
+5 ; Query recipient(s) xxx
DO SET^XMXSEC2("Q xxx",37420.1,.XMOPT,.XMOX)
+6 ; Query Detailed
DO SET^XMXSEC2("QD",37418,.XMOPT,.XMOX)
+7 ; Query Network
DO SET^XMXSEC2("QN",37419,.XMOPT,.XMOX)
+8 ; Query Current
DO SET^XMXSEC2("QC",37431,.XMOPT,.XMOX)
+9 ; Query Not Current
DO SET^XMXSEC2("QNC",37432,.XMOPT,.XMOX)
+10 ; Query Terminated
DO SET^XMXSEC2("QT",37433,.XMOPT,.XMOX)
+11 ; Transmit now
DO SET^XMXSEC2("T",37334,.XMOPT,.XMOX)
+12 ; Select Message option:
SET XMDIR("A")=$$EZBLD^DIALOG(34067)
+13 SET XMDIR("B")=XMOX("O","T")_":"_XMOPT("T")
+14 SET XMDIR("PRE")="I XMX?1(1"""_XMOX("O","Q")_" "",1"""_$$LOW^XLFSTR(XMOX("O","Q"))_" "",1"""_XMOX("O","QD")_" "",1"""_$$LOW^XLFSTR(XMOX("O","QD"))_" "").E S XMNAME=$P(XMX,"" "",2,99),XMX="""_XMOX("O","QD")_""""
+15 SET XMDIR("??")="XM-U-MO-REPLY"
+16 QUIT
B ; Backup to review message
+1 DO BACKUP^XMJMP(XMDUZ,XMK,XMKN,XMZO)
+2 SET XMRESP=$PIECE($GET(^XMB(3.9,XMZO,1,XMPTR,0)),U,2)
+3 QUIT
E ; Edit msg
+1 DO BODY^XMJMS(XMDUZ,XMZ,XMSUBJ,.XMRESTR,.XMABORT)
+2 QUIT
I ; Include responses from this or another message in reply
+1 DO INCL(XMDUZ,XMZO,XMZ,XMSUBJ,.XMRESTR,1,.XMABORT)
+2 QUIT
INCL(XMDUZ,XMZO,XMZ,XMSUBJ,XMRESTR,XMINCL,XMABORT) ; Include responses in a message
+1 NEW XMWHICH,XMNONE,XMZI
+2 SET XMNONE=0
+3 DO WHICH^XMJMR1(XMDUZ,XMZO,XMINCL,.XMZI,.XMWHICH,.XMNONE)
IF XMNONE
QUIT
+4 IF '$DATA(XMWHICH)
QUIT
+5 DO COPYTEXT^XMJMR1(XMZI,XMZ,XMWHICH,(XMZI'=XMZO))
+6 DO BODY^XMJMS(XMDUZ,XMZ,XMSUBJ,.XMRESTR,.XMABORT)
+7 QUIT
Q ; Query
+1 DO Q^XMJMQ(XMDUZ,XMK,XMKN,XMZO)
+2 QUIT
QC ; Query Current
+1 DO QX^XMJMQ(XMDUZ,XMK,XMKN,XMZO,"QC")
+2 QUIT
QD ; Query Detailed
+1 IF $DATA(XMNAME)
DO QNAMEX^XMJMQ(XMDUZ,XMK,XMKN,XMZO,XMNAME)
QUIT
+2 DO QD^XMJMQ(XMDUZ,XMK,XMKN,XMZO)
+3 QUIT
QN ; Query Network
+1 DO QN^XMJMQ(XMDUZ,XMK,XMKN,XMZO)
+2 QUIT
QNC ; Query Not Current
+1 DO QX^XMJMQ(XMDUZ,XMK,XMKN,XMZO,"QNC")
+2 QUIT
QT ; Query Terminated
+1 DO QX^XMJMQ(XMDUZ,XMK,XMKN,XMZO,"QT")
+2 QUIT
T ; Transmit now
+1 NEW XMIA
+2 SET (XMFINISH,XMIA)=1
+3 ; Sending local reply...
WRITE $$EZBLD^DIALOG(34216)
+4 DO DOREPLY^XMXREPLY(XMDUZ,XMZO,XMZ)
+5 ; Sent
WRITE !,$$EZBLD^DIALOG(34213)
+6 QUIT