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

FSCLMPNB.m

Go to the documentation of this file.
  1. FSCLMPNB ;SLC/STAFF NOIS List Manager Protocol Notification Be Notified ;1/13/98 12:58
  1. ;;1.1;NOIS;;Sep 06, 1998
  1. ;
  1. NOTIFY ; from FSCLMPN
  1. N CALL,CALLS,CHOICE,DIR,EVENT,LISTNUM,METHOD,OK,Y K CALLS,DIR,^TMP("FSC SELECT",$J,"NVALUES")
  1. S DIR(0)="SAMO^EDITED:EDITED;STATUS CHANGED:STATUS CHANGED",DIR("A")="Notify when calls are (E)dited or (S)tatus changes: ",DIR("B")="EDITED"
  1. S DIR("?",1)="Enter the event that will trigger your notification."
  1. S DIR("?",2)="Enter EDITED to be notified whenever the calls are edited."
  1. S DIR("?",3)="Enter STATUS CHANGED to be notified when the calls have a status changed."
  1. S DIR("?",4)="Enter '^' to exit without scheduling notification or '??' 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. S EVENT=Y
  1. N DIR,Y K DIR
  1. S DIR(0)="SAMO^MAIL:MAIL;ALERT:ALERT",DIR("A")="Notify by (M)ail or (A)lert: ",DIR("B")="ALERT"
  1. S DIR("?",1)="Enter the method you wish to be notified."
  1. S DIR("?",2)="Enter MAIL to receive an email message."
  1. S DIR("?",3)="Enter ALERT to be notified by a menu alert."
  1. S DIR("?",4)="Note: scheduled notifications will appear as a single alert, as opposed"
  1. S DIR("?",5)="to alerts sent by others, which appear as separate alerts."
  1. S DIR("?",6)="Enter '^' to exit without scheduling notification, '??' 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. S METHOD=Y
  1. D
  1. .I $D(^TMP("FSC SELECT",$J,"EVALUES")) S CHOICE=FSCCNT_"-"_FSCCNT Q
  1. .I $D(^TMP("FSC SELECT",$J,"VVALUES")) S CHOICE=^("VVALUES") Q
  1. .S CHOICE="1-"_+@VALMAR
  1. D SELECT^FSCUL(CHOICE,"",CHOICE,"NVALUES",.OK)
  1. I OK D
  1. .S LISTNUM=0 F S LISTNUM=$O(^TMP("FSC SELECT",$J,"NVALUES",LISTNUM)) Q:LISTNUM<1 S CALL=$$CALL^FSCLMPE1(LISTNUM),CALLS(CALL)=""
  1. .D BENOTIFY(DUZ,.CALLS,METHOD,EVENT)
  1. Q
  1. ;
  1. BENOTIFY(USER,CALLS,METHOD,EVENT) ; from FSCELSNS
  1. N CALL,NUM
  1. S CALL=0 F S CALL=$O(CALLS(CALL)) Q:CALL<1 D
  1. .I $D(^FSCD("NOTIFY","ACUSER",CALL,USER)) S NUM=+^(USER) D Q
  1. ..S $P(^FSCD("NOTIFY",NUM,0),U,5,7)=METHOD_U_EVENT_U_1
  1. .D SETUP^FSCNOT(CALL,,,USER_U_1,METHOD,EVENT)
  1. Q