FSCLMPNB ;SLC/STAFF NOIS List Manager Protocol Notification Be Notified ;1/13/98 12:58
;;1.1;NOIS;;Sep 06, 1998
;
NOTIFY ; from FSCLMPN
N CALL,CALLS,CHOICE,DIR,EVENT,LISTNUM,METHOD,OK,Y K CALLS,DIR,^TMP("FSC SELECT",$J,"NVALUES")
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"
S DIR("?",1)="Enter the event that will trigger your notification."
S DIR("?",2)="Enter EDITED to be notified whenever the calls are edited."
S DIR("?",3)="Enter STATUS CHANGED to be notified when the calls have a status changed."
S DIR("?",4)="Enter '^' to exit without scheduling notification or '??' for more help."
S DIR("?")="^D HELP^FSCU(.DIR)"
S DIR("??")="FSC U1 NOIS"
D ^DIR K DIR
I $D(DIRUT) Q
S EVENT=Y
N DIR,Y K DIR
S DIR(0)="SAMO^MAIL:MAIL;ALERT:ALERT",DIR("A")="Notify by (M)ail or (A)lert: ",DIR("B")="ALERT"
S DIR("?",1)="Enter the method you wish to be notified."
S DIR("?",2)="Enter MAIL to receive an email message."
S DIR("?",3)="Enter ALERT to be notified by a menu alert."
S DIR("?",4)="Note: scheduled notifications will appear as a single alert, as opposed"
S DIR("?",5)="to alerts sent by others, which appear as separate alerts."
S DIR("?",6)="Enter '^' to exit without scheduling notification, '??' for more help."
S DIR("?")="^D HELP^FSCU(.DIR)"
S DIR("??")="FSC U1 NOIS"
D ^DIR K DIR
I $D(DIRUT) Q
S METHOD=Y
D
.I $D(^TMP("FSC SELECT",$J,"EVALUES")) S CHOICE=FSCCNT_"-"_FSCCNT Q
.I $D(^TMP("FSC SELECT",$J,"VVALUES")) S CHOICE=^("VVALUES") Q
.S CHOICE="1-"_+@VALMAR
D SELECT^FSCUL(CHOICE,"",CHOICE,"NVALUES",.OK)
I OK D
.S LISTNUM=0 F S LISTNUM=$O(^TMP("FSC SELECT",$J,"NVALUES",LISTNUM)) Q:LISTNUM<1 S CALL=$$CALL^FSCLMPE1(LISTNUM),CALLS(CALL)=""
.D BENOTIFY(DUZ,.CALLS,METHOD,EVENT)
Q
;
BENOTIFY(USER,CALLS,METHOD,EVENT) ; from FSCELSNS
N CALL,NUM
S CALL=0 F S CALL=$O(CALLS(CALL)) Q:CALL<1 D
.I $D(^FSCD("NOTIFY","ACUSER",CALL,USER)) S NUM=+^(USER) D Q
..S $P(^FSCD("NOTIFY",NUM,0),U,5,7)=METHOD_U_EVENT_U_1
.D SETUP^FSCNOT(CALL,,,USER_U_1,METHOD,EVENT)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCLMPNB 2153 printed Oct 16, 2024@18:18:59 Page 2
FSCLMPNB ;SLC/STAFF NOIS List Manager Protocol Notification Be Notified ;1/13/98 12:58
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
NOTIFY ; from FSCLMPN
+1 NEW CALL,CALLS,CHOICE,DIR,EVENT,LISTNUM,METHOD,OK,Y
KILL CALLS,DIR,^TMP("FSC SELECT",$JOB,"NVALUES")
+2 SET DIR(0)="SAMO^EDITED:EDITED;STATUS CHANGED:STATUS CHANGED"
SET DIR("A")="Notify when calls are (E)dited or (S)tatus changes: "
SET DIR("B")="EDITED"
+3 SET DIR("?",1)="Enter the event that will trigger your notification."
+4 SET DIR("?",2)="Enter EDITED to be notified whenever the calls are edited."
+5 SET DIR("?",3)="Enter STATUS CHANGED to be notified when the calls have a status changed."
+6 SET DIR("?",4)="Enter '^' to exit without scheduling notification or '??' for more help."
+7 SET DIR("?")="^D HELP^FSCU(.DIR)"
+8 SET DIR("??")="FSC U1 NOIS"
+9 DO ^DIR
KILL DIR
+10 IF $DATA(DIRUT)
QUIT
+11 SET EVENT=Y
+12 NEW DIR,Y
KILL DIR
+13 SET DIR(0)="SAMO^MAIL:MAIL;ALERT:ALERT"
SET DIR("A")="Notify by (M)ail or (A)lert: "
SET DIR("B")="ALERT"
+14 SET DIR("?",1)="Enter the method you wish to be notified."
+15 SET DIR("?",2)="Enter MAIL to receive an email message."
+16 SET DIR("?",3)="Enter ALERT to be notified by a menu alert."
+17 SET DIR("?",4)="Note: scheduled notifications will appear as a single alert, as opposed"
+18 SET DIR("?",5)="to alerts sent by others, which appear as separate alerts."
+19 SET DIR("?",6)="Enter '^' to exit without scheduling notification, '??' for more help."
+20 SET DIR("?")="^D HELP^FSCU(.DIR)"
+21 SET DIR("??")="FSC U1 NOIS"
+22 DO ^DIR
KILL DIR
+23 IF $DATA(DIRUT)
QUIT
+24 SET METHOD=Y
+25 Begin DoDot:1
+26 IF $DATA(^TMP("FSC SELECT",$JOB,"EVALUES"))
SET CHOICE=FSCCNT_"-"_FSCCNT
QUIT
+27 IF $DATA(^TMP("FSC SELECT",$JOB,"VVALUES"))
SET CHOICE=^("VVALUES")
QUIT
+28 SET CHOICE="1-"_+@VALMAR
End DoDot:1
+29 DO SELECT^FSCUL(CHOICE,"",CHOICE,"NVALUES",.OK)
+30 IF OK
Begin DoDot:1
+31 SET LISTNUM=0
FOR
SET LISTNUM=$ORDER(^TMP("FSC SELECT",$JOB,"NVALUES",LISTNUM))
if LISTNUM<1
QUIT
SET CALL=$$CALL^FSCLMPE1(LISTNUM)
SET CALLS(CALL)=""
+32 DO BENOTIFY(DUZ,.CALLS,METHOD,EVENT)
End DoDot:1
+33 QUIT
+34 ;
BENOTIFY(USER,CALLS,METHOD,EVENT) ; from FSCELSNS
+1 NEW CALL,NUM
+2 SET CALL=0
FOR
SET CALL=$ORDER(CALLS(CALL))
if CALL<1
QUIT
Begin DoDot:1
+3 IF $DATA(^FSCD("NOTIFY","ACUSER",CALL,USER))
SET NUM=+^(USER)
Begin DoDot:2
+4 SET $PIECE(^FSCD("NOTIFY",NUM,0),U,5,7)=METHOD_U_EVENT_U_1
End DoDot:2
QUIT
+5 DO SETUP^FSCNOT(CALL,,,USER_U_1,METHOD,EVENT)
End DoDot:1
+6 QUIT