source: WorldVistAEHR/trunk/r/MAILMAN-XM/XMJMF1.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: 4.7 KB
Line 
1XMJMF1 ;ISC-SF/GMB-XMJMF (cont.) ;07/12/2002 11:08
2 ;;8.0;MailMan;;Jun 28, 2002
3FIND(XMDUZ,XMK,XMKCHOOS,XMKN) ; Search mailbox or message file
4 ; XMK !=Search the message file
5 ; *=Search the user's mailbox
6 ; n=Search user's basket number n
7 ; XMKCHOOS 1=user may choose which basket
8 ; 0=user is locked into current basket
9 ; U=user is doing a Postmaster Super Search
10 N XMDIR,XMOPT,XMOX,XMY,XMF,XMABORT,XMFFRN,XMFBSKTN,XMFTDTX,XMFFDTX,XMFRFRN,XMSRCHED,XMHDR
11 S (XMABORT,XMSRCHED)=0
12 I XMK="!" D Q:XMABORT
13 . I $G(XMKCHOOS)="U" D Q:XMABORT
14 . . I '$$SSPRIV^XMXSEC1 D Q
15 . . . D SHOW^XMJERR
16 . . . D WAIT^XMXUTIL
17 . . . S XMABORT=1
18 . . S XMF("FLAGS")="U"
19 . . S XMHDR=$$EZBLD^DIALOG(34435.5) ; Current 'All Messages Super Search' search criteria:
20 . E S XMHDR=$$EZBLD^DIALOG(34435) ; Current 'All Messages' search criteria:
21 . S XMF("FDATE")=$$FMADD^XLFDT(DT,-30) ; Search period is last 30 days.
22 . S XMF("TDATE")=DT
23 . S XMFFDTX=$$MMDT^XMXUTIL1(XMF("FDATE"))
24 . S XMFTDTX=$$MMDT^XMXUTIL1(XMF("TDATE"))
25 E D
26 . S XMHDR=$$EZBLD^DIALOG(34436) ; Current 'Mailbox' search criteria:
27 . S XMF("BSKT")=XMK
28 . I XMK S XMFBSKTN=$G(XMKN,$$BSKTNAME^XMXUTIL(XMDUZ,XMK))
29 F D Q:XMABORT
30 . W @IOF,XMHDR
31 . S XMDIR("A")=$$EZBLD^DIALOG(34420) ; Select search action
32 . I XMK'="!" D
33 . . I +XMF("BSKT")=XMF("BSKT") D
34 . . . W !,$$EZBLD^DIALOG(34437),":",?30,XMFBSKTN ; Search basket
35 . . . Q:'XMKCHOOS
36 . . . D SET^XMXSEC1("B",34421.1,.XMOPT,.XMOX) ; Change Search basket
37 . . . D SET^XMXSEC1("BA",34421.2,.XMOPT,.XMOX) ; Search all baskets
38 . . E D
39 . . . W !,$$EZBLD^DIALOG(34437),":",?30,$$EZBLD^DIALOG(34437.1) ; Search basket / All baskets
40 . . . D SET^XMXSEC1("B",34421,.XMOPT,.XMOX) ; Search one basket
41 . I $D(XMF("SUBJ")) D
42 . . W !,$$EZBLD^DIALOG(34438),":",?30,XMF("SUBJ") ; Subject contains
43 . . D SET^XMXSEC1("S",34422.1,.XMOPT,.XMOX) ; Change 'Subject contains' string
44 . E D SET^XMXSEC1("S",34422,.XMOPT,.XMOX) ; Enter 'Subject contains' string
45 . I $D(XMF("FROM")) D
46 . . W !,$$EZBLD^DIALOG(34440),":",?30,XMFFRN ; Message from
47 . . D SET^XMXSEC1("F",34423.1,.XMOPT,.XMOX) ; Change 'Message from' person
48 . E D SET^XMXSEC1("F",34423,.XMOPT,.XMOX) ; Enter 'Message from' person
49 . I $D(XMF("TO")) D
50 . . W !,$$EZBLD^DIALOG(34440.2),":",?30,XMF("TO") ; Message to
51 . . D SET^XMXSEC1("T",34424.1,.XMOPT,.XMOX) ; Change 'Message to' addressee
52 . E D SET^XMXSEC1("T",34424,.XMOPT,.XMOX) ; Enter 'Message to' addressee
53 . I $D(XMF("FDATE")) D
54 . . W !,$$EZBLD^DIALOG(34444),":",?30,XMFFDTX ; Message sent on or after
55 . . D SET^XMXSEC1("DA",34426.1,.XMOPT,.XMOX) ; Change 'Message sent on or after' date
56 . E D SET^XMXSEC1("DA",34426,.XMOPT,.XMOX) ; Enter 'Message sent on or after' date
57 . I $D(XMF("TDATE")) D
58 . . W !,$$EZBLD^DIALOG(34445),":",?30,XMFTDTX ; Message sent on or before
59 . . D SET^XMXSEC1("DB",34427.1,.XMOPT,.XMOX) ; Change 'Message sent on or before' date
60 . E D SET^XMXSEC1("DB",34427,.XMOPT,.XMOX) ; Enter 'Message sent on or before' date
61 . I $D(XMF("FLINE")) D
62 . . W !,$$EZBLD^DIALOG(34449),":",?30,XMF("FLINE") ; Lines of text, minimum
63 . . D SET^XMXSEC1("LM",34430.1,.XMOPT,.XMOX) ; Change 'Minimum Lines of text' number
64 . E D SET^XMXSEC1("LM",34430,.XMOPT,.XMOX) ; Enter 'Minimum Lines of text' number
65 . ;I $D(XMF("TLINE")) D
66 . ;. W !,$$EZBLD^DIALOG(34450),":",?30,XMF("TLINE") ; Lines of text, maximum
67 . ;. D SET^XMXSEC1("LX",34431.1,.XMOPT,.XMOX) ; Change 'Maximum Lines of text' number
68 . ;E D SET^XMXSEC1("LX",34431,.XMOPT,.XMOX) ; Enter 'Maximum Lines of text' number
69 . I $D(XMF("RFROM")) D
70 . . W !,$$EZBLD^DIALOG(34440.1),":",?30,XMFRFRN ; Response from
71 . . D SET^XMXSEC1("R",34428.1,.XMOPT,.XMOX) ; Change 'Response from' person
72 . E D SET^XMXSEC1("R",34428,.XMOPT,.XMOX) ; Enter 'Response from' person
73 . I $D(XMF("TEXT")) D
74 . . ; x.1:Message / x.2:Message or Response / x.3:Response contains
75 . . W !,$$EZBLD^DIALOG(34446+(XMF("TEXT","L")/10)),":",?30,XMF("TEXT")
76 . . D SET^XMXSEC1("X",34429.1,.XMOPT,.XMOX) ; Change 'Message contains' string
77 . E D SET^XMXSEC1("X",34429,.XMOPT,.XMOX) ; Enter 'Message contains' string
78 . D SET^XMXSEC1("Q",34420.1,.XMOPT,.XMOX) ; Quit
79 . I $D(XMF("SUBJ"))!$D(XMF("FROM"))!$D(XMF("FDATE"))!$D(XMF("TDATE"))!$D(XMF("TO"))!$D(XMF("RFROM"))!$D(XMF("TEXT"))!$D(XMF("FLINE"))!$D(XMF("TLINE")) D
80 . . D SET^XMXSEC1("G",34420.2,.XMOPT,.XMOX) ; Go search
81 . . S XMDIR("B")=$S(XMSRCHED:34420.1,1:34420.2) ; Q:Quit / G:Go search
82 . E D
83 . . S XMDIR("B")=34422 ; S:Enter 'Subject contains' string
84 . S XMDIR("??")="XM-U-Q-SEARCH CRITERIA"
85 . S XMDIR(0)="SC" ; show choices/split into columns, if necessary
86 . D XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMY,.XMABORT) Q:XMABORT
87 . S XMSRCHED=(XMY="G")
88 . K XMOPT,XMOX,XMDIR
89 . D @XMY^XMJMF2
90 Q
Note: See TracBrowser for help on using the repository browser.