source: FOIAVistA/trunk/r/MAILMAN-XM/XMJBM1.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1XMJBM1 ;ISC-SF/GMB-Manage Mail in Mailbox (cont.) ;07/19/2000 14:13
2 ;;8.0;MailMan;;Jun 28, 2002
3INIT(XMDUZ,XMRDR,XMABORT) ;
4 D CHECK^XMVVITAE
5 I XMDUZ'=DUZ,'$$RPRIV^XMXSEC D Q
6 . S XMABORT=1
7 . D SHOW^XMJERR
8 D RDR(.XMRDR,.XMABORT)
9 Q
10RDR(XMRDR,XMABORT) ;
11 S XMRDR=XMV("RDR DEF")
12 Q:XMV("RDR ASK")="N"
13 N XMRDRTXT,XMOPT,XMOX,XMDIR
14 D SET^XMXSEC1("C",34036,.XMOPT,.XMOX) ; C:Classic
15 D SET^XMXSEC1("D",34037,.XMOPT,.XMOX) ; D:Detailed Full Screen
16 D SET^XMXSEC1("S",34038,.XMOPT,.XMOX) ; S:Summary Full Screen
17 I XMRDR="" S XMRDR="C"
18 S XMRDRTXT=XMOPT(XMRDR)
19 S XMDIR("A")=$$EZBLD^DIALOG(34047) ; Select message reader:
20 S XMDIR("B")=XMOX("O",XMRDR)_":"_XMRDRTXT
21 S XMDIR("??")="D QRDR^XMJBM1"
22 D XMDIR^XMJDIR(.XMDIR,.XMOPT,.XMOX,.XMRDR,.XMABORT)
23 Q
24QRDR ;
25 N XMTEXT
26 ;The Classic reader is the one that has been around forever.
27 ;The Full Screen reader has two flavors:
28 ;Detailed Full Screen contains a detailed message list.
29 ;Summary Full Screen contains a summary message list.
30 D BLD^DIALOG(34039,"","","XMTEXT","F")
31 I $P($G(^XMB(3.7,DUZ,0)),U,16)="" D
32 . ;You may choose a default MESSAGE READER under
33 . ;'Personal Preferences|User Options Edit'.
34 . ;Until you do, the Classic reader will be your default.
35 . D BLD^DIALOG(34040,"","","XMTEXT","F")
36 E D
37 . ;Your default MESSAGE READER is the _XMRDRTXT_ reader.
38 . ;You may change your default MESSAGE READER under
39 . ;'Personal Preferences|User Options Edit'.
40 . D BLD^DIALOG(34041,XMRDRTXT,"","XMTEXT","F")
41 ;If you don't want to be asked this question again, and wish to use the
42 ;XMRDRTXT_ reader exclusively, set the MESSAGE READER PROMPT to
43 ;"No, don't ask" under 'Personal Preferences|User Options Edit'.
44 D BLD^DIALOG(34042,XMRDRTXT,"","XMTEXT","F")
45 D MSG^DIALOG("WH","","","","XMTEXT")
46 Q
47ASKBSKT(XMDUZ,XMRDR,XMK,XMKN,XMABORT) ;
48 N XMKNUM
49 F D ASKBSKT^XMJBN(XMDUZ,0,.XMK,.XMKN,.XMABORT) Q:XMABORT D Q:XMKNUM
50 . S XMKNUM=+$P($G(^XMB(3.7,XMDUZ,2,XMK,1,0)),U,4)
51 . D:'XMKNUM NOMSGS(XMDUZ,XMK,XMKN)
52 Q:XMABORT
53 Q:'XMKNUM
54 Q:XMRDR'="C"
55 N XMPARM,XMTEXT
56 S XMPARM(1)=$O(^XMB(3.7,XMDUZ,2,XMK,1,"C",""),-1)
57 S XMPARM(2)=XMKNUM
58 S XMPARM(3)=$P(^XMB(3.7,XMDUZ,2,XMK,0),U,2)
59 ;Last message number: |1| Messages in basket: |2| (|3| new)
60 ;Enter ??? for help.
61 D BLD^DIALOG($S(XMPARM(3):34043.1,1:34043),.XMPARM,"","XMTEXT","F")
62 D MSG^DIALOG("WM","","","","XMTEXT")
63 Q
64NOMSGS(XMDUZ,XMK,XMKN) ;
65 W !,$$EZBLD^DIALOG(34044,XMKN) ; No messages in '|1|' basket.
66 Q:XMK<2
67 I XMDUZ'=DUZ,$G(XMV("PRIV"))'["R",$G(XMV("PRIV"))'["W" Q
68 W !
69 N DIR,DIRUT,X,Y
70 S DIR(0)="Y"
71 ;Since the '_XMKN_' basket is empty,
72 ;do you want to delete it
73 D BLD^DIALOG(34045,XMKN,"","DIR(""A"")")
74 S DIR("B")=$$EZBLD^DIALOG(39054) ; Yes
75 D ^DIR Q:'Y
76 D DELBSKT^XMXBSKT(XMDUZ,XMK)
77 W !,$$EZBLD^DIALOG(34046) ; Basket deleted.
78 Q
Note: See TracBrowser for help on using the repository browser.