source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMXPRT.m@ 1003

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1XMXPRT ;ISC-SF/GMB-Print messages ;12/04/2002 13:52
2 ;;8.0;MailMan;**10**;Jun 28, 2002
3 ; For messages printed to the P-MESSAGE device,
4 ; XMAPSUBJ = message subject
5 ; XMY = message addressees
6PRINT1(XMDUZ,XMZ,XMPRTTO,XMINSTR,ZTSK,XMAPSUBJ,XMY) ; Print one message
7 N XMWHICH,XMRECIPS,XMPRTHDR,ZTSAVE,ZTRTN,ZTDESC,ZTIO,ZTDTH,ZTUCI
8 D PINIT(.XMINSTR,.XMPRTHDR,.XMRECIPS,.XMWHICH,.ZTDTH)
9 F I="XMV(","DUZ","XMDUZ","XMZ","XMWHICH","XMRECIPS","XMPRTHDR","XMAPSUBJ","XMY(" S ZTSAVE(I)=""
10 ;S:$D(XMSECURE) (ZTSAVE("XMSECURE"),ZTSAVE("XMSECURE("))=""
11 S ZTIO=XMPRTTO
12 S ZTDESC=$$EZBLD^DIALOG(34501) ; MailMan: Print
13 S ZTRTN="XPMSG^XMXPRT"
14 D ^%ZTLOAD
15 Q
16PRINTM(XMDUZ,XMPRTTO,XMINSTR,ZTSK,XMAPSUBJ,XMY) ; Print more than one message
17 N XMWHICH,XMRECIPS,XMPRTHDR,ZTSAVE,ZTRTN,ZTDESC,ZTIO,ZTDTH,ZTUCI
18 D PINIT(.XMINSTR,.XMPRTHDR,.XMRECIPS,.XMWHICH,.ZTDTH)
19 I "^0^*^"'[(U_XMWHICH_U) S XMWHICH="*"
20 F I="XMV(","DUZ","XMDUZ","XMZ","XMWHICH","XMRECIPS","XMPRTHDR","^TMP(""XM"",$J,""XMZ"",","XMAPSUBJ","XMY(" S ZTSAVE(I)=""
21 ;S:$D(XMSECURE) (ZTSAVE("XMSECURE"),ZTSAVE("XMSECURE("))=""
22 S ZTIO=XMPRTTO
23 S ZTDESC=$$EZBLD^DIALOG(34501) ; MailMan: Print
24 S ZTRTN="XPRANGE^XMXPRT"
25 D ^%ZTLOAD
26 Q
27PINIT(XMINSTR,XMPRTHDR,XMRECIPS,XMWHICH,XMWHEN) ;
28 ; XMPRTHDR 1=Print header (default)
29 ; 0=don't (headerless print)
30 ; XMRECIPS 0=Don't print recipients (default)
31 ; 1=Print summary recipients
32 ; 2=Print detail recipients
33 S XMPRTHDR=+$G(XMINSTR("HDR"),1)
34 S XMRECIPS=+$G(XMINSTR("RECIPS"))
35 S XMWHICH=$G(XMINSTR("RESPS"),"*")
36 S XMWHEN=$G(XMINSTR("WHEN"),"NOW")
37 S XMWHEN=$S(XMWHEN="NOW":$H,1:$$FMTH^XLFDT(XMWHEN))
38 Q
39PMSG(XMDUZ,XMZ,XMWHICH,XMRECIPS,XMPRTHDR,XMFIRST) ;
40XPMSG ;
41 N XMK,XMKN,XMZREC,XMRESPS,XMPTR
42 S ZTREQ="@"
43 S XMK=+$O(^XMB(3.7,"M",XMZ,XMDUZ,""))
44 S XMKN=$S(XMK:$P(^XMB(3.7,XMDUZ,2,XMK,0),U,1),1:$$EZBLD^DIALOG(34014)) ; * N/A *
45 D RESPONSE^XMJMP(XMDUZ,XMZ,.XMRESPS,.XMPTR)
46 S:XMWHICH="*" XMWHICH=$S(XMRESPS:"0-"_XMRESPS,1:0)
47 S XMZREC=^XMB(3.9,XMZ,0)
48 I $E(IOST,1,2)="C-"!'$G(XMFIRST,1) W @IOF
49 D:XMPRTHDR IDHDR^XMJMP(XMDUZ)
50 D PRINTIT^XMJMP1(XMDUZ,XMK,XMKN,XMZ,XMZREC,XMRESPS,XMPTR,XMWHICH,XMRECIPS,0,XMPRTHDR)
51 Q
52PRANGE(XMDUZ,XMWHICH,XMRECIPS,XMPRTHDR) ;
53XPRANGE ; Print a range of messages.
54 N XMZ,XMFIRST
55 S XMZ=""
56 S XMFIRST=1
57 F S XMZ=$O(^TMP("XM",$J,"XMZ",XMZ)) Q:'XMZ D
58 . Q:'$D(^XMB(3.9,XMZ,0))
59 . D PMSG(XMDUZ,XMZ,XMWHICH,XMRECIPS,XMPRTHDR,.XMFIRST)
60 . S XMFIRST=0
61 Q
Note: See TracBrowser for help on using the repository browser.