source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCLDR.m@ 1724

Last change on this file since 1724 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1FSCLDR ;SLC/STAFF-NOIS List Definition Replace ;9/6/98 20:49
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4RALL ; from FSCLMP
5 I '$$CHECK^FSCLMPM(FSCLNUM,DUZ) W !,"You cannot edit this list.",$C(7) H 2 Q
6 N LISTNAME,LISTNUM,LISTTYPE,NAME,NOTFLAG,OK,OWNER,ZERO
7 S LISTNAME=FSCLNAME,LISTNUM=FSCLNUM
8 S ZERO=^FSC("LIST",LISTNUM,0)
9 S LISTTYPE=$P(ZERO,U,3) I '$L(LISTTYPE) S LISTTYPE="S"
10 I "AMS"'[LISTTYPE W !,"You cannot edit this list.",$C(7) H 2 Q
11 D NAME^FSCMU(LISTNAME,.NAME,.OK) I 'OK Q
12 I NAME="@" D DELETE(LISTNAME,LISTNUM) Q
13 D OWNER^FSCMU(+$P(ZERO,U,2),.OWNER,.OK) I 'OK Q
14 D
15 .N DIR,X,Y K DIR
16 .I LISTTYPE="A" D Q
17 ..S DIR(0)="YAO",DIR("A")="Change type from Active to Manual update? ",DIR("B")="NO"
18 ..S DIR("?",1)="Enter YES to change the list type."
19 ..S DIR("?",2)="Enter NO or '^' to not change the type."
20 ..S DIR("?")="^D HELP^FSCU(.DIR)"
21 ..S DIR("??")="FSC U 1 NOIS"
22 ..D ^DIR K DIR
23 ..I Y=1 S LISTTYPE="M" D DELCALLS(LISTNUM)
24 .I LISTTYPE="M" D Q
25 ..S DIR(0)="YAO",DIR("A")="Change type from Manual to Active update? ",DIR("B")="NO"
26 ..S DIR("?",1)="Enter YES to change the list type."
27 ..S DIR("?",2)="Enter NO or '^' to not change the type."
28 ..S DIR("?")="^D HELP^FSCU(.DIR)"
29 ..S DIR("??")="FSC U 1 NOIS"
30 ..D ^DIR K DIR
31 ..I Y=1 S FSCQEDIT=1,LISTTYPE="A"
32 S NOTFLAG=$S($L($P(ZERO,U,6))&$L($P(ZERO,U,7)):1,1:0)
33 N DA,DIE,DR S DIE="^FSC(""LIST"",",DA=LISTNUM,DR=".01///"_NAME_$S($L(OWNER):";1///"_OWNER,1:"")_";2///"_LISTTYPE_$S(LISTTYPE="A":";5;6;7",1:";5///@;6///@;7///@")_";200"
34 L +^FSC("LIST",LISTNUM):30 I '$T D UNABLE Q
35 D ^DIE
36 L -^FSC("LIST",LISTNUM)
37 I NOTFLAG,'$L($P(^FSC("LIST",LISTNUM,0),U,6))!'$L($P(^(0),U,7)) D DELNOT(LISTNUM)
38 I $D(VALMAR) D ENTRY^FSCLMM,HEADER^FSCLMM
39 S FSCLNAME=NAME,FSCLNUM=LISTNUM
40 Q
41 ;
42DELETE(LISTNAME,LISTNUM) ; from FSCLMPM
43 N DA,DIE,DIK,DR,SPEC
44 D DELCALLS(LISTNUM)
45 S DIE=7105.2,DR="9///@"
46 S SPEC=0 F S SPEC=$O(^FSC("SPEC","AL",LISTNUM,SPEC)) Q:SPEC<1 D
47 .S DA=SPEC
48 .L +^FSC("SPEC",SPEC):30 I '$T D UNABLE Q
49 .D ^DIE
50 .L -^FSC("SPEC",SPEC)
51 .W !,"Deleted default list of ",$$VALUE^FSCGET(SPEC,7105.2,.01)
52 D DELNOT(LISTNUM)
53 D DELMRU(LISTNUM)
54 S DA=LISTNUM,DIK="^FSC(""LIST""," D ^DIK
55 W !,LISTNAME," deleted." H 2
56 S VALMBCK="Q",FSCEXIT=1 ; exit from list manager after deleting a list
57 Q
58 ;
59DELCALLS(LISTNUM) ;
60 N CALL,LISTSNUM
61 W ! S CALL=0 F S CALL=$O(^FSCD("LISTS","ALC",LISTNUM,CALL)) Q:CALL<1 S LISTSNUM=+$O(^(CALL,0)) I LISTSNUM D DELETE^FSCLMPS(LISTSNUM) W "."
62 Q
63 ;
64DELNOT(LISTNUM) ;
65 N DA,DIK,NOTIFY
66 W !,"Deleting notifications for this list."
67 S DIK="^FSCD(""NOTIFY"","
68 S NOTIFY=0 F S NOTIFY=$O(^FSCD("NOTIFY","ALIST",LISTNUM,NOTIFY)) Q:NOTIFY<1 D
69 .W "." S DA=NOTIFY
70 .L +^FSCD("NOTIFY",NOTIFY):30 I '$T D UNABLE Q
71 .D ^DIK
72 .L -^FSCD("NOTIFY",NOTIFY)
73 Q
74 ;
75DELMRU(LISTNUM) ; from FSCRPCLO
76 N NUM
77 S NUM=0 F S NUM=$O(^FSCD("MRU","AL",LISTNUM,NUM)) Q:NUM<1 D DEL^FSCUCD("^FSCD(""MRU"",",NUM)
78 Q
79 ;
80REPLACE(LISTNAME,LISTNUM) ; from FSCLMPE, FSCLMPM
81 ; not scoped
82 W !,"Reenter a query definition for ",LISTNAME,!
83 D ADD^FSCLMPM(0,"ADD")
84 Q
85 ;
86UNABLE ;
87 W !,"Unable to edit."
88 Q
Note: See TracBrowser for help on using the repository browser.