source: FOIAVistA/trunk/r/ZZREGIONAL-A1C-A5C-CRHD-RGED-RGUT-RGWB-RG/RGUTALR.m@ 1720

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1RGUTALR ;CAIRO/DKM - Send alert to user(s) via kernel or mail;04-Sep-1998 11:26;DKM
2 ;;2.1;RUN TIME LIBRARY;;Mar 22, 1999
3 ;=================================================================
4 ; Send an alert.
5 ; XQAMSG = Message to send
6 ; RGUSR = A semicolon-delimited list of users to receive alert.
7 ;=================================================================
8ALERT(XQAMSG,RGUSR) ;
9 N XQA,XQAOPT,XQAFLG,XQAROU,XQADATA,XQAID
10 S @$$TRAP^RGZOSF("EXIT^RGUTALR"),RGUSR=$G(RGUSR,"*"),XQAMSG=$TR(XQAMSG,U,"~")
11 D ENTRY^RGUTUSR(RGUSR,.XQA),SETUP^XQALERT:$D(XQA)
12EXIT Q
13 ;=================================================================
14 ; Send a mail message
15 ; RGMSG = Message to send (single node or array)
16 ; XMY = A semicolon-delimited list (or array) of users
17 ; XMSUB = Subject line (optional)
18 ; XMDUZ = DUZ of sender (optional)
19 ;=================================================================
20MAIL(RGMSG,XMY,XMSUB,XMDUZ) ;
21 N XMTEXT
22 S:$D(RGMSG)=1 RGMSG(1)=RGMSG
23 S XMTEXT="RGMSG(",@$$TRAP^RGZOSF("EXIT^RGUTALR"),XMY=$G(XMY)
24 S:$G(XMSUB)="" XMSUB=RGMSG
25 S:$G(XMDUZ)="" XMDUZ=$G(DUZ)
26 F Q:'$L(XMY) S X=$P(XMY,";"),XMY=$P(XMY,";",2,999) S:$L(X) XMY(X)=""
27 D ^XMD:$D(XMY)>9
28 Q
Note: See TracBrowser for help on using the repository browser.