FSCUCD ;SLC/STAFF-NOIS Utilities Call Delete ;9/6/98 22:18
;;1.1;NOIS;;Sep 06, 1998
;
DELETE(CALL) ; from FSCTASKA, FSCUM
L +^FSCD("CALL",CALL):5 I '$T Q
D NOTIFY(CALL)
D SEND(CALL)
D ALERT(CALL)
D LIST(CALL)
D WKLD(CALL)
D MRE(CALL)
D MRA(CALL)
D PRIMARY(CALL)
D PFIELDS(CALL)
D CALL(CALL)
D STATHIST(CALL)
L -^FSCD("CALL",CALL)
Q
;
NOTIFY(CALL) ;
N NUM
S NUM=0 F S NUM=$O(^FSCD("NOTIFY","B",CALL,NUM)) Q:NUM<1 D DEL("^FSCD(""NOTIFY"",",NUM)
Q
;
SEND(CALL) ;
N NUM
S NUM=0 F S NUM=$O(^FSCD("SEND","AC",CALL,NUM)) Q:NUM<1 D DEL("^FSCD(""SEND"",",NUM)
Q
;
ALERT(CALL) ;
N NUM
S NUM=0 F S NUM=$O(^FSCD("ALERT",NUM)) Q:NUM<1 I $P(^(NUM,0),U,2)=CALL D DEL("^FSCD(""ALERT"",",NUM)
Q
;
LIST(CALL) ;
N NUM
S NUM=0 F S NUM=$O(^FSCD("LISTS","B",CALL,NUM)) Q:NUM<1 D DEL("^FSCD(""LISTS"",",NUM)
Q
;
WKLD(CALL) ;
N NUM
S NUM=0 F S NUM=$O(^FSCD("WKLD","B",CALL,NUM)) Q:NUM<1 D DEL("^FSCD(""WKLD"",",NUM)
Q
;
MRE(CALL) ;
N NUM
S NUM=0 F S NUM=$O(^FSCD("MRE","AC",CALL,NUM)) Q:NUM<1 D DEL("^FSCD(""MRE"",",NUM)
Q
;
MRA(CALL) ;
N NUM
S NUM=0 F S NUM=$O(^FSCD("MRA","AC",CALL,NUM)) Q:NUM<1 D DEL("^FSCD(""MRA"",",NUM)
Q
;
STATHIST(CALL) ;
N NUM
S NUM=0 F S NUM=$O(^FSCD("STATUS HIST","B",CALL,NUM)) Q:NUM<1 D DEL("^FSCD(""STATUS HIST"",",NUM)
Q
;
PRIMARY(CALL) ;
N SECOND
S SECOND=0 F S SECOND=$O(^FSCD("CALL","APRIMARY",CALL,SECOND)) Q:SECOND<1 D
.D ASSOC^FSCLMPEA(SECOND,SECOND)
Q
;
PFIELDS(CALL) ;
N NUM
S NUM=0 F S NUM=$O(^FSCD("CALL USER","B",CALL,NUM)) Q:NUM<1 D DEL("^FSCD(""CALL USER"",",NUM)
Q
;
CALL(CALL) ;
D DEL("^FSCD(""CALL"",",CALL)
Q
;
DEL(DIK,DA) ; from FSCAFFIL, FSCLDR, FSCLMPE1, FSCMRK, FSCRPCEB, FSCRPCPF, FSCRPCUF, FSCRPCUR, FSCRPCWS
D ^DIK
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCUCD 1810 printed Dec 13, 2024@02:20:23 Page 2
FSCUCD ;SLC/STAFF-NOIS Utilities Call Delete ;9/6/98 22:18
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
DELETE(CALL) ; from FSCTASKA, FSCUM
+1 LOCK +^FSCD("CALL",CALL):5
IF '$TEST
QUIT
+2 DO NOTIFY(CALL)
+3 DO SEND(CALL)
+4 DO ALERT(CALL)
+5 DO LIST(CALL)
+6 DO WKLD(CALL)
+7 DO MRE(CALL)
+8 DO MRA(CALL)
+9 DO PRIMARY(CALL)
+10 DO PFIELDS(CALL)
+11 DO CALL(CALL)
+12 DO STATHIST(CALL)
+13 LOCK -^FSCD("CALL",CALL)
+14 QUIT
+15 ;
NOTIFY(CALL) ;
+1 NEW NUM
+2 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("NOTIFY","B",CALL,NUM))
if NUM<1
QUIT
DO DEL("^FSCD(""NOTIFY"",",NUM)
+3 QUIT
+4 ;
SEND(CALL) ;
+1 NEW NUM
+2 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("SEND","AC",CALL,NUM))
if NUM<1
QUIT
DO DEL("^FSCD(""SEND"",",NUM)
+3 QUIT
+4 ;
ALERT(CALL) ;
+1 NEW NUM
+2 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("ALERT",NUM))
if NUM<1
QUIT
IF $PIECE(^(NUM,0),U,2)=CALL
DO DEL("^FSCD(""ALERT"",",NUM)
+3 QUIT
+4 ;
LIST(CALL) ;
+1 NEW NUM
+2 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("LISTS","B",CALL,NUM))
if NUM<1
QUIT
DO DEL("^FSCD(""LISTS"",",NUM)
+3 QUIT
+4 ;
WKLD(CALL) ;
+1 NEW NUM
+2 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("WKLD","B",CALL,NUM))
if NUM<1
QUIT
DO DEL("^FSCD(""WKLD"",",NUM)
+3 QUIT
+4 ;
MRE(CALL) ;
+1 NEW NUM
+2 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("MRE","AC",CALL,NUM))
if NUM<1
QUIT
DO DEL("^FSCD(""MRE"",",NUM)
+3 QUIT
+4 ;
MRA(CALL) ;
+1 NEW NUM
+2 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("MRA","AC",CALL,NUM))
if NUM<1
QUIT
DO DEL("^FSCD(""MRA"",",NUM)
+3 QUIT
+4 ;
STATHIST(CALL) ;
+1 NEW NUM
+2 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("STATUS HIST","B",CALL,NUM))
if NUM<1
QUIT
DO DEL("^FSCD(""STATUS HIST"",",NUM)
+3 QUIT
+4 ;
PRIMARY(CALL) ;
+1 NEW SECOND
+2 SET SECOND=0
FOR
SET SECOND=$ORDER(^FSCD("CALL","APRIMARY",CALL,SECOND))
if SECOND<1
QUIT
Begin DoDot:1
+3 DO ASSOC^FSCLMPEA(SECOND,SECOND)
End DoDot:1
+4 QUIT
+5 ;
PFIELDS(CALL) ;
+1 NEW NUM
+2 SET NUM=0
FOR
SET NUM=$ORDER(^FSCD("CALL USER","B",CALL,NUM))
if NUM<1
QUIT
DO DEL("^FSCD(""CALL USER"",",NUM)
+3 QUIT
+4 ;
CALL(CALL) ;
+1 DO DEL("^FSCD(""CALL"",",CALL)
+2 QUIT
+3 ;
DEL(DIK,DA) ; from FSCAFFIL, FSCLDR, FSCLMPE1, FSCMRK, FSCRPCEB, FSCRPCPF, FSCRPCUF, FSCRPCUR, FSCRPCWS
+1 DO ^DIK
+2 QUIT