source: FOIAVistA/trunk/r/MAILMAN-XM/XMXPARM1.m@ 1674

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1XMXPARM1 ;ISC-SF/GMB-Parameter check (cont.) ;04/19/2002 12:14
2 ;;8.0;MailMan;**36**;Jun 28, 2002
3CHKUSER(XMDUZ,XMNOMBOX) ; Ascertain/verify user's DUZ, and make sure authorized to use MailMan
4 ; XMNOMBOX Is it possible that this user does not have a mailbox?
5 ; 0=no (default); 1=yes
6 N XMSCREEN,XMUSER,XMADDR
7 S XMADDR=XMDUZ
8 S XMADDR=$$UP^XLFSTR(XMADDR)
9 ;S:'$G(XMNOMBOX) XMSCREEN="I $L($P(^(0),U,3)),$D(^XMB(3.7,+Y,2))" ; User must have an access code & mailbox
10 I '$G(XMNOMBOX),'$$USERTYPE^XUSAP(XMDUZ,"APPLICATION PROXY") S XMSCREEN="I $L($P(^(0),U,3)),$D(^XMB(3.7,+Y,2))" ; User must have an access code & mailbox
11 ; "B^BB^C^D" = name^alias^initial^nickname
12 S XMDUZ=$$FIND1^DIC(200,"","O",$S(+XMADDR=XMADDR:"`"_XMADDR,1:XMADDR),"B^BB^C^D",.XMSCREEN)
13 Q:XMDUZ
14 S XMDUZ=XMADDR
15 D ERRSET^XMXUTIL($S($D(DIERR):39432,1:39433),XMDUZ) ; User '|1|' ambiguous / not found.
16 Q
17XMATTACH(XMATTACH) ; Validate attachments
18 Q
19XMBN(XMBN) ; Check bulletin name
20 I $G(XMBN)="" D ERRSET^XMXUTIL(39430) Q ; Bulletin name must be supplied.
21 Q:$D(^XMB(3.6,"B",XMBN))
22 D ERRSET^XMXUTIL(39431,XMBN) ; Bulletin '|1|' not found.
23 Q
24XMBODY(XMBODY,XMOPTNL) ; Check the body of the message (just make sure there is a body)
25 I $G(XMBODY)="" D Q
26 . I '$G(XMOPTNL) D ERRSET^XMXUTIL(39405) ;Message must have a body.
27 I $E(XMBODY,1,6)="XMBODY" D Q
28 . D ERRSET^XMXUTIL(39406) ;Message body may not be called XMBODY.
29 I $D(@XMBODY)'>9 D Q
30 . D ERRSET^XMXUTIL(39407,XMBODY) ;Message body '|1|' has no data.
31 Q
32XMCODE(XMPARM,XMCODE,XMSET) ;
33 Q:XMSET[(U_XMCODE_U)
34 N XMP
35 S XMP("PARAM","ID")=XMPARM
36 S XMP("PARAM","VALUE")=XMCODE
37 ;S XMP("PARAM","FILE")=3.901,XMP("PARAM","FIELD")=1.8
38 S XMP(1)=XMSET
39 D ERRSET^XMXUTIL(39438,.XMP) ; Must be one of |1|.
40 Q
41XMHINT(XMHINT) ; Validate a scramble hint
42 I $G(XMHINT)="" Q
43 ;I $G(XMHINT)="" D ERRSET^XMXUTIL(39436) Q ; Scramble hint must be supplied
44 ;D CHK^DIE(3.9,1.8,"H",XMHINT)
45 I $L(XMHINT)>0,$L(XMHINT)<41,XMHINT'[U Q
46 N XMP
47 S XMP("PARAM","ID")="XMINSTR(""SCR HINT"")"
48 S XMP("PARAM","VALUE")=XMHINT
49 ;S XMP("PARAM","FILE")=3.901,XMP("PARAM","FIELD")=1.8
50 S XMP(1)=1,XMP(2)=40
51 D ERRSET^XMXUTIL(39437,.XMP) ; Must be |1|-|2| characters, no ^.
52 Q
53XMKEY(XMKEY) ; Validate a scramble key
54 I $G(XMKEY)="" D ERRSET^XMXUTIL(39435) Q ; Scramble key must be supplied.
55 ;D CHK^DIE(3.9,1.85,"H",XMKEY)
56 I $L(XMKEY)>2,$L(XMKEY)<21 Q
57 N XMP
58 S XMP("PARAM","ID")="XMINSTR(""SCR KEY"")"
59 S XMP("PARAM","VALUE")=XMKEY
60 ;S XMP("PARAM","FILE")=3.9,XMP("PARAM","FIELD")=1.85
61 S XMP(1)=3,XMP(2)=20
62 D ERRSET^XMXUTIL(39434,.XMP) ; Must be |1|-|2| characters.
63 Q
64XMKZ(XMK,XMKZ) ;
65 I $G(XMKZ),$D(^XMB(3.7,XMDUZ,2,XMK,1,"C",XMKZ)) Q
66 N XMP S XMP(1)=XMKZ,XMP(2)=XMK
67 D ERRSET^XMXUTIL(34351,.XMP) ; message not found in basket
68 Q
69XMKZA(XMKZA) ; Check the message numbers (just make sure there is at least one)
70 Q:$D(XMKZA)
71 D ERRSET^XMXUTIL(39418) ;No message numbers.
72 Q
73XMROOT(XMPARM,XMROOT) ; Validate root
74 Q
75XMSTRIP(XMSTRIP) ; Validate a message strip string
76 I $L(XMSTRIP)>0,$L(XMSTRIP)<21 Q
77 N XMP
78 S XMP("PARAM","ID")="XMINSTR(""STRIP"")"
79 S XMP("PARAM","VALUE")=XMSTRIP
80 S XMP(1)=1,XMP(2)=20
81 D ERRSET^XMXUTIL(39434,.XMP) ; Must be |1|-|2| characters.
82 Q
83XMTO(XMTO,XMOPTNL) ; Check the addressees (just make sure there is at least one)
84 Q:$D(XMTO)
85 I $G(XMOPTNL),$$GOTADDR^XMXADDR Q
86 D ERRSET^XMXUTIL(39408) ;No recipients
87 Q
Note: See TracBrowser for help on using the repository browser.