source: FOIAVistA/trunk/r/MAILMAN-XM/XMHIU.m@ 1535

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

initial load of FOIAVistA 6/30/08 version

File size: 4.6 KB
Line 
1XMHIU ;ISC-SF/GMB-User Info ;04/17/2002 09:52
2 ;;8.0;MailMan;;Jun 28, 2002
3 ; Replaces UHELP^XMA7 (ISC-WASH/RJ/THM/CAP)
4 ; Entry points used by MailMan options (not covered by DBIA):
5 ; HELP XMHELPUSER - Get user info
6HELP ; User Info
7 N DIC,Y,D,XMHDUZ
8 D CHECK^XMVVITAE
9 S DIC=200,DIC(0)="AEQMZN",DIC("A")=$$EZBLD^DIALOG(38009) ;User name:
10 S DIC("S")="I $S('$D(^VA(200,Y,0)):0,Y<1:1,$L($P(^(0),U,3)):1,1:0)"
11 S DIC("W")="D USERINFO^XMXADDR1(Y)"
12 S D="B^BB^C^D" ; name^alias^initial^nickname
13 F W ! D MIX^DIC1 Q:Y<0 D
14 . S XMHDUZ=+Y
15 . W @IOF,$$NAME^XMXUTIL(XMHDUZ,1)
16 . D DISPUSER(XMHDUZ)
17 . S DIC("W")="D USERINFO^XMXADDR1(Y)"
18 Q
19DISPUSER(XMUSER) ;
20 N XMABORT
21 S XMABORT=0
22 D GENERAL(XMUSER,.XMABORT) Q:XMABORT ; General info
23 D GROUPS(XMUSER,.XMABORT) Q:XMABORT ; Groups in which this user is a member
24 D SURRBEU(XMUSER,.XMABORT) Q:XMABORT ; Surrogates who may be this user
25 D UBESURR(XMUSER,.XMABORT) ; Users for whom this user may be surrogate
26 Q
27GENERAL(XMUSER,XMABORT) ;
28 N X,XMREC
29 I '$D(^XMB(3.7,XMUSER)) W !,$$EZBLD^DIALOG(38010) Q ;No Mailbox for this user!
30 S XMREC=$G(^XMB(3.7,XMUSER,0))
31 Q:XMREC=""&'$D(^XMB(3.8,"AB",XMUSER))
32 S X=$G(^XMB(3.7,XMUSER,"B")) W:$L(X) !,$$EZBLD^DIALOG(38011),X ;Current Banner:
33 S X=$P($G(^XMB(3.7,XMUSER,"L")),U) W:$L(X) !,$$EZBLD^DIALOG(38012),X ;Last used MailMan:
34 S X=$P(XMREC,U,6) I X D
35 . N XMPARM S XMPARM(1)=X,XMPARM(2)=+$P(^XMB(3.7,XMUSER,2,1,0),U,2)
36 . W !,$$EZBLD^DIALOG(38019,.XMPARM) ;NEW messages: |1| (|2| in the IN basket)
37 S X=$P(XMREC,U,2) I $L(X) W !,$$EZBLD^DIALOG(38004),X,$$EZBLD^DIALOG($S($P(XMREC,U,8):38005,1:38006)) ; Forwarding Address: / Local Delivery is ON / OFF
38 S XMREC=$G(^VA(200,XMUSER,.13))
39 S X=$P(XMREC,U,2) I X'="" W !!,$$EZBLD^DIALOG(38013),X ;Office phone:
40 S X=$P(XMREC,U,6) I X'="" W !,$$EZBLD^DIALOG(38014),X ;Fax:
41 S X=$P(XMREC,U,7) I X'="" W !,$$EZBLD^DIALOG(38015),X ;Voice pager:
42 S X=$P(XMREC,U,8) I X'="" W !,$$EZBLD^DIALOG(38016),X ;Digital pager:
43 S X=$P(XMREC,U,3) I X'="" W !,$$EZBLD^DIALOG(38017),X ;Add'l phone:
44 S X=$P(XMREC,U,4) I X'="" W !,$$EZBLD^DIALOG(38017),X ;Add'l phone:
45 S XMREC=$G(^VA(200,XMUSER,.11),"^^")
46 I $P(^XMB(1,1,0),U,10),$P(XMREC,U,1,3)'="^^" D ; Don't show address unless site OKs it.
47 . W !!,$$EZBLD^DIALOG(38018) ;Address:
48 . F X=1:1:3 I $P(XMREC,U,X)'="" W !," ",$P(XMREC,U,X)
49 . S X=$P(XMREC,U,4) I X'="" W !," ",X
50 . S X=$P(XMREC,U,5) I X W ", ",$P($G(^DIC(5,X,0)),U,2)
51 . S X=$P(XMREC,U,6) I X'="" W " ",X
52 I $D(^XMB(3.7,XMUSER,1,0)) D Q:XMABORT
53 . N XMI,XMLINE
54 . I $Y+5>IOSL D PAGE(.XMABORT) Q:XMABORT
55 . W !!,$$EZBLD^DIALOG(38050) ;Introduction:
56 . S XMI=0
57 . F S XMI=$O(^XMB(3.7,XMUSER,1,XMI)) Q:XMI'>0 S XMLINE=^(XMI,0) D Q:XMABORT
58 . . I $Y+4>IOSL D PAGE(.XMABORT) Q:XMABORT
59 . . W !," ",XMLINE
60 Q
61GROUPS(XMUSER,XMABORT) ;
62 N XMGIEN,XMREC,XMTYPE
63 Q:'$D(^XMB(3.8,"AB",XMUSER))
64 I $Y+6>IOSL D PAGE(.XMABORT) Q:XMABORT
65 W !!,$$EZBLD^DIALOG(38040) ;Mail Groups:
66 S XMGIEN=""
67 F S XMGIEN=$O(^XMB(3.8,"AB",XMUSER,XMGIEN)) Q:XMGIEN="" D Q:XMABORT
68 . S XMREC=$G(^XMB(3.8,XMGIEN,0)) Q:XMREC=""
69 . S XMTYPE=$P(XMREC,U,2)
70 . ; Don't show private group membership, unless user is a member, too.
71 . I XMTYPE="PR",'$D(^XMB(3.8,"AB",DUZ,XMGIEN)) Q
72 . I $Y+4>IOSL D PAGE(.XMABORT) Q:XMABORT
73 . W !?2,$P(XMREC,U)
74 . W:$G(^XMB(3.8,XMGIEN,3))=XMUSER $$EZBLD^DIALOG(38041) ;(Organizer)
75 . W ?45,$$EZBLD^DIALOG($S(XMTYPE="PR":38042,1:38043)) ;(Private) / (Public)
76 Q
77SURRBEU(XMUSER,XMABORT) ; List surrogates for this user
78 N XMSIEN
79 Q:'$O(^XMB(3.7,XMUSER,9,0))
80 I $Y+6>IOSL D PAGE(.XMABORT) Q:XMABORT
81 W !!,$$EZBLD^DIALOG(38044) ;This user's surrogates are:
82 S XMSIEN=0
83 F S XMSIEN=$O(^XMB(3.7,XMUSER,9,XMSIEN)) Q:XMSIEN="" D Q:XMABORT
84 . D DISPSURR(2,XMUSER,XMSIEN,.XMABORT)
85 Q
86UBESURR(XMSURR,XMABORT) ; List users for whom this user may act as surrogate
87 N XMUSER,XMSIEN
88 Q:'$O(^XMB(3.7,"AB",XMSURR,0))
89 I $Y+6>IOSL D PAGE(.XMABORT) Q:XMABORT
90 W !!,$$EZBLD^DIALOG(38045) ;This user may act as a surrogate for:
91 S XMUSER=""
92 F S XMUSER=$O(^XMB(3.7,"AB",XMSURR,XMUSER)) Q:XMUSER="" D Q:XMABORT
93 . S XMSIEN=$O(^XMB(3.7,"AB",XMSURR,XMUSER,""))
94 . D DISPSURR(1,XMUSER,XMSIEN,.XMABORT)
95 Q
96DISPSURR(XMFLAG,XMUSER,XMSIEN,XMABORT) ;
97 N XMPRIV,XMREC,XMNIEN
98 I $Y+4>IOSL D PAGE(.XMABORT) Q:XMABORT
99 S XMREC=$S(XMUSER=.6:".6^y^y",1:$G(^XMB(3.7,XMUSER,9,XMSIEN,0)))
100 S XMNIEN=$S(XMFLAG=1:XMUSER,1:$P(XMREC,U,1))
101 Q:'XMNIEN Q:'$D(^VA(200,XMNIEN,0))
102 W !,?2,$$NAME^XMXUTIL(XMNIEN)
103 S XMPRIV=$P(XMREC,U,2,3)
104 I XMPRIV'["y" W ?45,$$EZBLD^DIALOG(38046) Q ;No Privileges
105 I $L(XMPRIV,"y")>2 W ?45,$$EZBLD^DIALOG(38047) Q ;Read and Write Privileges
106 W ?45,$$EZBLD^DIALOG($S($P(XMPRIV,U)["y":38048,1:38049)) ;Read Privilege / Write Privilege
107 Q
108PAGE(XMABORT) ;
109 D PAGE^XMXUTIL(.XMABORT) Q:XMABORT
110 W @IOF
111 Q
Note: See TracBrowser for help on using the repository browser.