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

FSCNMS.m

Go to the documentation of this file.
  1. FSCNMS ;SLC/STAFF NOIS Notification Mail Send ;1/13/98 13:55
  1. ;;1.1;NOIS;;Sep 06, 1998
  1. ;
  1. MAIL(XMSUB) ; from FSCLMPNN
  1. Q:'$D(XMSUB) I XMSUB[U S XMSUB=$$REPLACE^FSCRU(XMSUB,U,"~U~")
  1. N CNT,DIR,LINE,XMTEXT,XMY,Y K DIR,XMY,XMZ,^TMP("FSC MAIL",$J),^TMP("FSC TEXT",$J)
  1. S DIR(0)="YAO",DIR("A")="Do you want to load the list document into the message? ",DIR("B")="NO"
  1. S DIR("?",1)="Enter YES to load the display into the message."
  1. S DIR("?",2)="Enter NO to just send a message without the display."
  1. S DIR("?",3)="When loading the display into the message, you can later edit the message"
  1. S DIR("?",4)="before sending. Be aware that displays may have edited information."
  1. S DIR("?")="^D HELP^FSCU(.DIR)"
  1. S DIR("??")="FSC U1 NOIS"
  1. D ^DIR K DIR
  1. I $D(DIRUT) Q
  1. D
  1. .I Y D Q
  1. ..S ^TMP("FSC MAIL",$J,1,0)=" "
  1. ..S ^TMP("FSC MAIL",$J,2,0)=" *** NOIS INFORMATION ***"
  1. ..S CNT=2 I $G(FSCCALLS)="EVALUES" S ^TMP("FSC MAIL",$J,3,0)=$G(VALMHDR(1)),CNT=3
  1. ..S LINE=0 F S LINE=$O(@VALMAR@(LINE)) Q:LINE<1 S CNT=CNT+1,^TMP("FSC MAIL",$J,CNT,0)=^(LINE,0)
  1. ..D EDITWP^FSCEU("^TMP(""FSC MAIL"",$J)","You may edit this message.")
  1. .D WP^FSCEU("MAIL","Enter your mail message.")
  1. S XMTEXT=""
  1. I $O(^TMP("FSC MAIL",$J,0)) S XMTEXT="^TMP(""FSC MAIL"",$J,"
  1. I $O(^TMP("FSC TEXT",$J,"MAIL",0)) S XMTEXT="^TMP(""FSC TEXT"",$J,""MAIL"","
  1. I '$L(XMTEXT) Q
  1. D EN^XM W !,"This message will be sent to you." S XMY(DUZ)="" D DES^XMA21
  1. I '$D(XMY) Q
  1. N DIR,Y K DIR
  1. S DIR(0)="YAO",DIR("A")="Send notification message: ",DIR("B")="YES"
  1. S DIR("?",1)="Enter YES to send this message."
  1. S DIR("?",2)="Enter NO or '^' to exit without sending the message, '??' for more help."
  1. S DIR("?")="^D HELP^FSCU(.DIR)"
  1. S DIR("??")="FSC U1 NOIS"
  1. D ^DIR K DIR
  1. I $D(DIRUT) Q
  1. I Y'=1 Q
  1. D ^XMD I $G(XMZ) W !,"Message #",XMZ," sent." H 2
  1. D KILL^XM K ^TMP("FSC MAIL",$J),^TMP("FSC TEXT",$J)
  1. Q