FSCMU ;SLC/STAFF-NOIS Modify Utilities ;1/13/98  13:19
 ;;1.1;NOIS;;Sep 06, 1998
 ;
NAME(OLD,NEW,OK) ; from FSCLD, FSCLDR, FSCLMPS
 N DONE,NAME S (DONE,OK)=0,(NAME,NEW)=""
 F  D  Q:DONE
 .N DIR,Y K DIR
 .S DIR(0)="7107.1,.01AO",DIR("A")="List Name: " I $L(OLD) S DIR("B")=OLD
 .S DIR("?",1)="Enter the name of the list."
 .S DIR("?")="^D HELP^FSCU(.DIR)"
 .S DIR("??")="FSC U1 NOIS"
 .D ^DIR K DIR
 .S NAME=Y
 .I $L(OLD),X="@" S (NAME,NEW)="@" D WARNING(OLD,.OK) S:OK DONE=1 Q
 .I $D(DIRUT) S DONE=1 Q
 .I '$L(OLD),$D(^FSC("LIST","B",NAME)) W !,NAME," already exists.  Enter a new name.",$C(7) Q
 .S NEW=NAME,(DONE,OK)=1
 Q
 ;
WARNING(LISTNAME,OK) ; from FSCLMPM
 N DIR,Y K DIR S OK=0
 S DIR(0)="YAO",DIR("A")="Are you sure you want to delete "_LISTNAME_"? ",DIR("B")="NO"
 S DIR("?",1)="Deleting a list will remove it's use from all users."
 S DIR("?")="^D HELP^FSCU(.DIR)"
 S DIR("??")="FSC U1 NOIS"
 W $C(7) D ^DIR K DIR
 I $D(DIRUT) Q
 I Y=1 D
 .N DIR K DIR
 .S DIR(0)="YAO",DIR("A",1)="Deleting this list will also remove all calls from the list.",DIR("A")="Do you still want to delete "_LISTNAME_"? ",DIR("B")="NO"
 .S DIR("?",1)="Enter YES to delete the list."
 .S DIR("?")="^D HELP^FSCU(.DIR)"
 .S DIR("??")="FSC U1 NOIS"
 .W $C(7) D ^DIR K DIR
 .I $D(DIRUT) Q
 .I Y=1 S OK=1
 Q
 ;
OWNER(OLD,NEW,OK) ; from FSCLD, FSCLDR, FSCLMPS
 S NEW="",OK=0
 I '$P($G(^FSC("SPEC",DUZ,0)),U,7) S NEW=DUZ,OK=1 Q
 N DIR,Y K DIR
 S DIR(0)="PAO^200:EM",DIR("A")="Owner: " I $L(OLD) S DIR("B")=$$VALUE^FSCGET(+OLD,7107.1,1)
 S DIR("?",1)="Enter the owner for this list."
 S DIR("?")="^D HELP^FSCU(.DIR)"
 S DIR("??")="FSC U1 NOIS"
 D ^DIR K DIR
 I $D(DIRUT) Q
 S NEW=+Y,OK=1
 Q
 ;
TYPE(OLD,NEW,OK) ; from FSCLD
 I $L(OLD),'(OLD="A"!(OLD="M")!(OLD="S")) S NEW="",OK=1 Q
 S NEW="",OK=0
 N DIR,Y K DIR
 S DIR(0)="SAM^ACTIVE UPDATE:ACTIVE UPDATE;MANUAL UPDATE:MANUAL UPDATE;STORE ONLY:STORE ONLY",DIR("A")="Select (A)ctive Update (M)anual Update or (S)tore Only: " I $L(OLD) S DIR("B")=$S(OLD="A":"ACTIVE UPDATE",OLD="S":"STORE ONLY",1:"")
 S DIR("?",1)="Enter ACTIVE UPDATE for lists using a query criteria that update whenever."
 S DIR("?",2)="calls are edited (these lists are typically used for alerts)."
 S DIR("?",3)="Enter MANUAL UPDATE for lists using a query criteria that update when used."
 S DIR("?",4)="Enter STORE ONLY for lists used for storing calls (manually stored)."
 S DIR("?")="^D HELP^FSCU(.DIR)"
 S DIR("??")="FSC U1 NOIS"
 D ^DIR K DIR
 I $D(DIRUT) Q
 S NEW=$S(Y="ACTIVE UPDATE":"A",Y="MANUAL UPDATE":"M",Y="STORE ONLY":"S",1:""),OK=1
 Q
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCMU   2613     printed  Sep 23, 2025@19:54:59                                                                                                                                                                                                       Page 2
FSCMU     ;SLC/STAFF-NOIS Modify Utilities ;1/13/98  13:19
 +1       ;;1.1;NOIS;;Sep 06, 1998
 +2       ;
NAME(OLD,NEW,OK) ; from FSCLD, FSCLDR, FSCLMPS
 +1        NEW DONE,NAME
           SET (DONE,OK)=0
           SET (NAME,NEW)=""
 +2        FOR 
               Begin DoDot:1
 +3                NEW DIR,Y
                   KILL DIR
 +4                SET DIR(0)="7107.1,.01AO"
                   SET DIR("A")="List Name: "
                   IF $LENGTH(OLD)
                       SET DIR("B")=OLD
 +5                SET DIR("?",1)="Enter the name of the list."
 +6                SET DIR("?")="^D HELP^FSCU(.DIR)"
 +7                SET DIR("??")="FSC U1 NOIS"
 +8                DO ^DIR
                   KILL DIR
 +9                SET NAME=Y
 +10               IF $LENGTH(OLD)
                       IF X="@"
                           SET (NAME,NEW)="@"
                           DO WARNING(OLD,.OK)
                           if OK
                               SET DONE=1
                           QUIT 
 +11               IF $DATA(DIRUT)
                       SET DONE=1
                       QUIT 
 +12               IF '$LENGTH(OLD)
                       IF $DATA(^FSC("LIST","B",NAME))
                           WRITE !,NAME," already exists.  Enter a new name.",$CHAR(7)
                           QUIT 
 +13               SET NEW=NAME
                   SET (DONE,OK)=1
               End DoDot:1
               if DONE
                   QUIT 
 +14       QUIT 
 +15      ;
WARNING(LISTNAME,OK) ; from FSCLMPM
 +1        NEW DIR,Y
           KILL DIR
           SET OK=0
 +2        SET DIR(0)="YAO"
           SET DIR("A")="Are you sure you want to delete "_LISTNAME_"? "
           SET DIR("B")="NO"
 +3        SET DIR("?",1)="Deleting a list will remove it's use from all users."
 +4        SET DIR("?")="^D HELP^FSCU(.DIR)"
 +5        SET DIR("??")="FSC U1 NOIS"
 +6        WRITE $CHAR(7)
           DO ^DIR
           KILL DIR
 +7        IF $DATA(DIRUT)
               QUIT 
 +8        IF Y=1
               Begin DoDot:1
 +9                NEW DIR
                   KILL DIR
 +10               SET DIR(0)="YAO"
                   SET DIR("A",1)="Deleting this list will also remove all calls from the list."
                   SET DIR("A")="Do you still want to delete "_LISTNAME_"? "
                   SET DIR("B")="NO"
 +11               SET DIR("?",1)="Enter YES to delete the list."
 +12               SET DIR("?")="^D HELP^FSCU(.DIR)"
 +13               SET DIR("??")="FSC U1 NOIS"
 +14               WRITE $CHAR(7)
                   DO ^DIR
                   KILL DIR
 +15               IF $DATA(DIRUT)
                       QUIT 
 +16               IF Y=1
                       SET OK=1
               End DoDot:1
 +17       QUIT 
 +18      ;
OWNER(OLD,NEW,OK) ; from FSCLD, FSCLDR, FSCLMPS
 +1        SET NEW=""
           SET OK=0
 +2        IF '$PIECE($GET(^FSC("SPEC",DUZ,0)),U,7)
               SET NEW=DUZ
               SET OK=1
               QUIT 
 +3        NEW DIR,Y
           KILL DIR
 +4        SET DIR(0)="PAO^200:EM"
           SET DIR("A")="Owner: "
           IF $LENGTH(OLD)
               SET DIR("B")=$$VALUE^FSCGET(+OLD,7107.1,1)
 +5        SET DIR("?",1)="Enter the owner for this list."
 +6        SET DIR("?")="^D HELP^FSCU(.DIR)"
 +7        SET DIR("??")="FSC U1 NOIS"
 +8        DO ^DIR
           KILL DIR
 +9        IF $DATA(DIRUT)
               QUIT 
 +10       SET NEW=+Y
           SET OK=1
 +11       QUIT 
 +12      ;
TYPE(OLD,NEW,OK) ; from FSCLD
 +1        IF $LENGTH(OLD)
               IF '(OLD="A"!(OLD="M")!(OLD="S"))
                   SET NEW=""
                   SET OK=1
                   QUIT 
 +2        SET NEW=""
           SET OK=0
 +3        NEW DIR,Y
           KILL DIR
 +4        SET DIR(0)="SAM^ACTIVE UPDATE:ACTIVE UPDATE;MANUAL UPDATE:MANUAL UPDATE;STORE ONLY:STORE ONLY"
           SET DIR("A")="Select (A)ctive Update (M)anual Update or (S)tore Only: "
           IF $LENGTH(OLD)
               SET DIR("B")=$SELECT(OLD="A":"ACTIVE UPDATE",OLD="S":"STORE ONLY",1:"")
 +5        SET DIR("?",1)="Enter ACTIVE UPDATE for lists using a query criteria that update whenever."
 +6        SET DIR("?",2)="calls are edited (these lists are typically used for alerts)."
 +7        SET DIR("?",3)="Enter MANUAL UPDATE for lists using a query criteria that update when used."
 +8        SET DIR("?",4)="Enter STORE ONLY for lists used for storing calls (manually stored)."
 +9        SET DIR("?")="^D HELP^FSCU(.DIR)"
 +10       SET DIR("??")="FSC U1 NOIS"
 +11       DO ^DIR
           KILL DIR
 +12       IF $DATA(DIRUT)
               QUIT 
 +13       SET NEW=$SELECT(Y="ACTIVE UPDATE":"A",Y="MANUAL UPDATE":"M",Y="STORE ONLY":"S",1:"")
           SET OK=1
 +14       QUIT