source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SCAPMSG.m@ 1361

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1SCAPMSG ;ALB/SCK - PCMM MESSAGE GENERATOR ; 22 SEP 95
2 ;;5.3;Scheduling;**41**;AUG 13, 1993
3 ;;1
4 Q
5 ; mailman message generator for the primary care management
6 ; module.
7 ;
8PARSE(SC) ;
9 ; -- array parsing for messages
10 ; SCDUZ - DUZ of user triggering the message
11 ; SCIENS - The Internal entry number of the team, position, or
12 ; patient, etc.
13 ; SCDATE - The date and/or time of the change or incident that
14 ; triggered the notification in external format.
15 ; SCSUBJ - The subject for the message
16 ; SCMSG - The message type
17 ; SCTEXT - text line to be added to the message
18 ;
19 S SCDUZ=$G(SC("DUZ"))
20 S SCIENS=$G(SC("IENS"))
21 S SCDATE=$G(SC("DATE"))
22 S SCSUBJ=$G(SC("SUBJECT"))
23 S SCMSG=$G(SC("MESSAGE"))
24 S SCTEXT=$G(SC("TEXT"))
25 Q
26 ;
27MAILC(SCOK,SCROOT) ;
28 ;
29 N SCTEXT,SCSUBJ,SCDUZ
30 D CHK^SCUTBK
31 D TMP^SCUTBK
32 ;
33 S SCOK=0
34 ;
35 D BLDMSG(.SCROOT,.SCSUBJ,.SCDUZ)
36 ;
37 S XMDUZ=$S($G(SCDUZ)]"":SCDUZ,1:"PRIMARY CARE MANAGEMENT")
38 S XMSUB=$S($G(SCSUBJ)]"":SCSUBJ,1:"PCMM NOTIFICATION")
39 D XMZ^XMA2
40 G:XMZ<1 MAILQ
41 S XMTEXT="SCTEXT("
42 S XMY("G.PCM MESSAGING@DEVFEX.ISC-ALBANY.VA.GOV")=""
43 ;
44 D ^XMD
45 S SCOK=XMZ
46MAILQ Q
47 ;
48BLDMSG(SCROOT,SCSUBJ,SCDUZ) ;
49 ;
50 N I
51 S SCDUZ=$P($G(SCROOT(1,0)),U,1)
52 S SCSUBJ=$P($G(SCROOT(1,0)),U,2)
53 ;
54 S I=0
55 F S I=$O(SCROOT(1,I)) Q:'I S SCTEXT(I)=SCROOT(1,I)
56 Q
Note: See TracBrowser for help on using the repository browser.