FSCLD ;SLC/STAFF-NOIS List Definition ;1/17/98 17:06
;;1.1;NOIS;;Sep 06, 1998
;
DEFINE ; from FSCLMP
N DESC,EVENT,METHOD,NAME,NOTIFY,NUM,OK,OWNER,TYPE K DESC
S NOTIFY=""
W !!,"Please use the following conventions for personal lists:"
W !,"Manual or Active update lists should begin with your LASTNAME and then"
W !,"something descriptive (separate your name and description with a '-')"
W !,"Storage-Only lists should be TEMP-LASTNAME"
W !,"If the list is to be used by your office or site, use your NOIS location"
W !,"abbreviation instead of your last name."
W !,"Examples: SMITH-SUPPORT, SMITH-DEV, or TEMP-SMITH, ISL-OLD CALLS",!
D NAME^FSCMU("",.NAME,.OK) I 'OK Q
D OWNER^FSCMU(DUZ,.OWNER,.OK) I 'OK Q
D DESC^FSCMU1(0,.DESC,.OK) I OK="" Q
D TYPE^FSCMU("",.TYPE,.OK) I 'OK Q
I TYPE="A"!(TYPE="M") D I 'OK Q
.I TYPE="A" D METHOD^FSCMU1("",.METHOD,.OK) I 'OK Q
.I TYPE="A",$L(METHOD) D EVENT^FSCMU1("",.EVENT,.OK) I 'OK Q
.I TYPE="A",$L(METHOD),$L(EVENT) S NOTIFY=METHOD_U_EVENT
.W ! D DEF(NAME,0,.OK) I 'OK Q
W ! D ASK(.OK) I 'OK Q
S NUM=0 D SAVE^FSCLDS(NAME,.NUM,OWNER,.DESC,TYPE,NOTIFY)
S FSCLNAME=NAME,FSCLNUM=NUM
Q
;
DEF(FSCLNAME,FSCLNUM,OK) ; from FSCLDR
N FSCQUERY
S FSCLNUM=+$G(FSCLNUM),FSCQUERY=1,OK=1 K ^TMP("FSC DEFINE",$J)
W !,"Query Definition:"
D BROWSE^FSCQB("",FSCLNAME,0,.OK,"Add","^TMP(""FSC DEFINE"",$J)")
I $D(DTOUT) S OK=""
Q
;
ASK(OK) ; from FSCLMPS
N DIR,Y K DIR S OK=0
S DIR(0)="YAO",DIR("A")="Save this list definition: ",DIR("B")="YES"
S DIR("?",1)="Enter YES to save this list definition."
S DIR("?",2)="Enter NO or '^' to exit without saving the list, '??' for more help."
S DIR("?")="^D HELP^FSCU(.DIR)"
S DIR("??")="FSC U1 NOIS"
D ^DIR K DIR
I $D(DIRUT) Q
I Y'=1 W !,"List Definition was NOT Saved." H 2 Q
S OK=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCLD 1840 printed Oct 16, 2024@18:18:36 Page 2
FSCLD ;SLC/STAFF-NOIS List Definition ;1/17/98 17:06
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
DEFINE ; from FSCLMP
+1 NEW DESC,EVENT,METHOD,NAME,NOTIFY,NUM,OK,OWNER,TYPE
KILL DESC
+2 SET NOTIFY=""
+3 WRITE !!,"Please use the following conventions for personal lists:"
+4 WRITE !,"Manual or Active update lists should begin with your LASTNAME and then"
+5 WRITE !,"something descriptive (separate your name and description with a '-')"
+6 WRITE !,"Storage-Only lists should be TEMP-LASTNAME"
+7 WRITE !,"If the list is to be used by your office or site, use your NOIS location"
+8 WRITE !,"abbreviation instead of your last name."
+9 WRITE !,"Examples: SMITH-SUPPORT, SMITH-DEV, or TEMP-SMITH, ISL-OLD CALLS",!
+10 DO NAME^FSCMU("",.NAME,.OK)
IF 'OK
QUIT
+11 DO OWNER^FSCMU(DUZ,.OWNER,.OK)
IF 'OK
QUIT
+12 DO DESC^FSCMU1(0,.DESC,.OK)
IF OK=""
QUIT
+13 DO TYPE^FSCMU("",.TYPE,.OK)
IF 'OK
QUIT
+14 IF TYPE="A"!(TYPE="M")
Begin DoDot:1
+15 IF TYPE="A"
DO METHOD^FSCMU1("",.METHOD,.OK)
IF 'OK
QUIT
+16 IF TYPE="A"
IF $LENGTH(METHOD)
DO EVENT^FSCMU1("",.EVENT,.OK)
IF 'OK
QUIT
+17 IF TYPE="A"
IF $LENGTH(METHOD)
IF $LENGTH(EVENT)
SET NOTIFY=METHOD_U_EVENT
+18 WRITE !
DO DEF(NAME,0,.OK)
IF 'OK
QUIT
End DoDot:1
IF 'OK
QUIT
+19 WRITE !
DO ASK(.OK)
IF 'OK
QUIT
+20 SET NUM=0
DO SAVE^FSCLDS(NAME,.NUM,OWNER,.DESC,TYPE,NOTIFY)
+21 SET FSCLNAME=NAME
SET FSCLNUM=NUM
+22 QUIT
+23 ;
DEF(FSCLNAME,FSCLNUM,OK) ; from FSCLDR
+1 NEW FSCQUERY
+2 SET FSCLNUM=+$GET(FSCLNUM)
SET FSCQUERY=1
SET OK=1
KILL ^TMP("FSC DEFINE",$JOB)
+3 WRITE !,"Query Definition:"
+4 DO BROWSE^FSCQB("",FSCLNAME,0,.OK,"Add","^TMP(""FSC DEFINE"",$J)")
+5 IF $DATA(DTOUT)
SET OK=""
+6 QUIT
+7 ;
ASK(OK) ; from FSCLMPS
+1 NEW DIR,Y
KILL DIR
SET OK=0
+2 SET DIR(0)="YAO"
SET DIR("A")="Save this list definition: "
SET DIR("B")="YES"
+3 SET DIR("?",1)="Enter YES to save this list definition."
+4 SET DIR("?",2)="Enter NO or '^' to exit without saving the list, '??' for more help."
+5 SET DIR("?")="^D HELP^FSCU(.DIR)"
+6 SET DIR("??")="FSC U1 NOIS"
+7 DO ^DIR
KILL DIR
+8 IF $DATA(DIRUT)
QUIT
+9 IF Y'=1
WRITE !,"List Definition was NOT Saved."
HANG 2
QUIT
+10 SET OK=1
+11 QUIT