- FSCMU1 ;SLC/STAFF-NOIS Modify Utilities continued ;4/22/94 11:44
- ;;1.1;NOIS;;Sep 06, 1998
- ;
- METHOD(OLD,NEW,OK) ; from FSCLD
- I $L(OLD),'(OLD="MAIL"!(OLD="ALERT")) S NEW="",OK=1 Q
- S NEW="",OK=1
- N DIR,Y K DIR
- S DIR(0)="SAMO^MAIL:MAIL;ALERT:ALERT",DIR("A")="Select (M)ail or (A)lert: " I $L(OLD) S DIR("B")=$S(OLD="MAIL":"MAIL",OLD="ALERT":"ALERT",1:"")
- S DIR("?",1)="Enter MAIL for notification to be sent by mail."
- S DIR("?",2)="Enter ALERT for notification to be sent by menu alert."
- S DIR("?")="^D HELP^FSCU(.DIR)"
- S DIR("??")="FSC U1 NOIS"
- W !,"Notification Method"
- D ^DIR K DIR
- I $D(DIRUT) S:$D(DTOUT) OK=0 Q
- S NEW=Y
- Q
- ;
- EVENT(OLD,NEW,OK) ; from FSCLD
- I $L(OLD),'(OLD="EDITED"!(OLD="STATUS CHANGED")!(OLD="ADDED")) S NEW="",OK=1 Q
- S NEW="",OK=1
- N DIR,Y K DIR
- S DIR(0)="SAMO^EDITED:EDITED;STATUS CHANGED:STATUS CHANGED;ADDED:ADDED",DIR("A")="Select when (E)dited, (S)tatus Changed, or (A)dded to list: "
- I $L(OLD) S DIR("B")=$S(OLD="EDITED":OLD,OLD="STATUS CHANGED":OLD,OLD="ADDED":OLD,1:"")
- S DIR("?",1)="Enter EDITED for notification to occur when the call is edited."
- S DIR("?",2)="Enter STATUS CHANGED for notification to occur when the status changes."
- S DIR("?",3)="Enter ADDED for notification to only occur when added to the list."
- S DIR("?")="^D HELP^FSCU(.DIR)"
- S DIR("??")="FSC U1 NOIS"
- W !,"Notification Event"
- D ^DIR K DIR
- I $D(DIRUT) S:$D(DTOUT) OK=1 Q
- S NEW=Y
- Q
- ;
- DESC(LISTNUM,NEW,OK) ; from FSCLD
- N CNT,OLD K OLD,NEW S OK=0
- S CNT=0 F S CNT=$O(^FSC("LIST",+LISTNUM,2,CNT)) Q:CNT<1 S (NEW(CNT,0),OLD(CNT,0))=^(CNT,0)
- D EDITWP^FSCEU("NEW","List Description:")
- I $D(DTOUT) S OK="" Q
- I $O(OLD(0)),'$O(NEW(0)) S NEW=0 ; wp entry was deleted
- S CNT=0 F S CNT=$O(NEW(CNT)) Q:CNT<1 I NEW(CNT,0)'=$G(OLD(CNT,0)) S OK=1 Q
- I $O(NEW("A"),-1)'=$O(OLD("A"),-1) S OK=1 Q
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCMU1 1862 printed Feb 18, 2025@23:45:10 Page 2
- FSCMU1 ;SLC/STAFF-NOIS Modify Utilities continued ;4/22/94 11:44
- +1 ;;1.1;NOIS;;Sep 06, 1998
- +2 ;
- METHOD(OLD,NEW,OK) ; from FSCLD
- +1 IF $LENGTH(OLD)
- IF '(OLD="MAIL"!(OLD="ALERT"))
- SET NEW=""
- SET OK=1
- QUIT
- +2 SET NEW=""
- SET OK=1
- +3 NEW DIR,Y
- KILL DIR
- +4 SET DIR(0)="SAMO^MAIL:MAIL;ALERT:ALERT"
- SET DIR("A")="Select (M)ail or (A)lert: "
- IF $LENGTH(OLD)
- SET DIR("B")=$SELECT(OLD="MAIL":"MAIL",OLD="ALERT":"ALERT",1:"")
- +5 SET DIR("?",1)="Enter MAIL for notification to be sent by mail."
- +6 SET DIR("?",2)="Enter ALERT for notification to be sent by menu alert."
- +7 SET DIR("?")="^D HELP^FSCU(.DIR)"
- +8 SET DIR("??")="FSC U1 NOIS"
- +9 WRITE !,"Notification Method"
- +10 DO ^DIR
- KILL DIR
- +11 IF $DATA(DIRUT)
- if $DATA(DTOUT)
- SET OK=0
- QUIT
- +12 SET NEW=Y
- +13 QUIT
- +14 ;
- EVENT(OLD,NEW,OK) ; from FSCLD
- +1 IF $LENGTH(OLD)
- IF '(OLD="EDITED"!(OLD="STATUS CHANGED")!(OLD="ADDED"))
- SET NEW=""
- SET OK=1
- QUIT
- +2 SET NEW=""
- SET OK=1
- +3 NEW DIR,Y
- KILL DIR
- +4 SET DIR(0)="SAMO^EDITED:EDITED;STATUS CHANGED:STATUS CHANGED;ADDED:ADDED"
- SET DIR("A")="Select when (E)dited, (S)tatus Changed, or (A)dded to list: "
- +5 IF $LENGTH(OLD)
- SET DIR("B")=$SELECT(OLD="EDITED":OLD,OLD="STATUS CHANGED":OLD,OLD="ADDED":OLD,1:"")
- +6 SET DIR("?",1)="Enter EDITED for notification to occur when the call is edited."
- +7 SET DIR("?",2)="Enter STATUS CHANGED for notification to occur when the status changes."
- +8 SET DIR("?",3)="Enter ADDED for notification to only occur when added to the list."
- +9 SET DIR("?")="^D HELP^FSCU(.DIR)"
- +10 SET DIR("??")="FSC U1 NOIS"
- +11 WRITE !,"Notification Event"
- +12 DO ^DIR
- KILL DIR
- +13 IF $DATA(DIRUT)
- if $DATA(DTOUT)
- SET OK=1
- QUIT
- +14 SET NEW=Y
- +15 QUIT
- +16 ;
- DESC(LISTNUM,NEW,OK) ; from FSCLD
- +1 NEW CNT,OLD
- KILL OLD,NEW
- SET OK=0
- +2 SET CNT=0
- FOR
- SET CNT=$ORDER(^FSC("LIST",+LISTNUM,2,CNT))
- if CNT<1
- QUIT
- SET (NEW(CNT,0),OLD(CNT,0))=^(CNT,0)
- +3 DO EDITWP^FSCEU("NEW","List Description:")
- +4 IF $DATA(DTOUT)
- SET OK=""
- QUIT
- +5 ; wp entry was deleted
- IF $ORDER(OLD(0))
- IF '$ORDER(NEW(0))
- SET NEW=0
- +6 SET CNT=0
- FOR
- SET CNT=$ORDER(NEW(CNT))
- if CNT<1
- QUIT
- IF NEW(CNT,0)'=$GET(OLD(CNT,0))
- SET OK=1
- QUIT
- +7 IF $ORDER(NEW("A"),-1)'=$ORDER(OLD("A"),-1)
- SET OK=1
- QUIT
- +8 QUIT