Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRCNMESG

PRCNMESG.m

Go to the documentation of this file.
  1. PRCNMESG ;SSI/ALA-Build Mail Messages ;[ 03/28/96 11:24 AM ]
  1. ;;1.0;Equipment/Turn-In Request;;Sep 13, 1996
  1. CON ; Get the selected concurring officials to send message to
  1. S CFL=0 Q:'$D(^PRCN(413,DA,5))
  1. S N=0 F S N=$O(^PRCN(413,DA,5,N)) Q:'N D
  1. . S CFL=1,NUM=^PRCN(413,DA,5,N,0)
  1. . S XMY(+^PRCN(413.3,+NUM,0))=""
  1. Q
  1. FND ; Find holders
  1. S PDZ="" F S PDZ=$O(^XUSEC(KEY,PDZ)) Q:PDZ="" S XMY(PDZ)=""
  1. K KEY,PDZ
  1. Q
  1. MES ; Send mail message to requestor and CMR Official
  1. S PRCNCMR=$P(^PRCN(413,IN,0),U,6),PRCNRQS=$P(^(0),U,2)
  1. S XMB(1)=$P(^PRCN(413,IN,0),U) S:$G(MSGN)=53 XMB(2)=$P(^PRCN(413,IN,0),U,18)
  1. S XMDUZ=DUZ,XMY(PRCNCMR)="",XMY(PRCNRQS)=""
  1. S XMB=$S(MSGN=39:"PRCNEQC1",MSGN=40:"PRCNEQC2",MSGN=43:"PRCNEQC3",MSGN=44:"PRCNEQC4",MSGN=53:"PRCNEQFN",1:$G(XMB))
  1. I $G(NOD)="" G MS
  1. ; Append the explanation text to end of this mail message
  1. S NL=$P($G(^PRCN(413,IN,NOD,0)),U,3)
  1. I NL'="" F II=1:1:NL S MSG(II)=$G(^PRCN(413,IN,NOD,II,0))
  1. MS S XMTEXT="MSG(" D ^XMB
  1. K NL,MSGN,II,MSG,NOD,XMY,XMDUZ,PRCNCMR,PRCNRQS,XMB
  1. Q