FSCXREFS ;SLC/STAFF-NOIS Xrefs Call ;1/11/98 15:27
;;1.1;NOIS;;Sep 06, 1998
;
AUDS(OP,FIELD,VALUE,NUM) ; from dd 7103.1
N USER,DATE,STATUS
I OP="SET" D
.I FIELD="USER",VALUE D
..S DATE=$P(^FSCD("SCHEDULE",NUM,0),U),STATUS=$P(^(0),U,3)
..I DATE,$L(STATUS) S ^FSCD("SCHEDULE","AUDS",VALUE,DATE,STATUS,NUM)="" D XTMP(VALUE,DATE)
.E I FIELD="DATE",VALUE D
..S USER=$P(^FSCD("SCHEDULE",NUM,0),U,2),STATUS=$P(^(0),U,3)
..I USER,$L(STATUS) S ^FSCD("SCHEDULE","AUDS",USER,VALUE,STATUS,NUM)="" D XTMP(USER,VALUE)
.E I FIELD="STATUS",$L(VALUE) D
..S USER=$P(^FSCD("SCHEDULE",NUM,0),U,2),DATE=$P(^(0),U)
..I USER,DATE S ^FSCD("SCHEDULE","AUDS",USER,DATE,VALUE,NUM)="" D XTMP(USER,VALUE)
E I OP="KILL" D
.I FIELD="USER",VALUE D
..S DATE=$P(^FSCD("SCHEDULE",NUM,0),U),STATUS=$P(^(0),U,3)
..I DATE,$L(STATUS) K ^FSCD("SCHEDULE","AUDS",VALUE,DATE,STATUS,NUM) D XTMP(VALUE,DATE)
.E I FIELD="DATE",VALUE D
..S USER=$P(^FSCD("SCHEDULE",NUM,0),U,2),STATUS=$P(^(0),U,3)
..I USER,$L(STATUS) K ^FSCD("SCHEDULE","AUDS",USER,VALUE,STATUS,NUM) D XTMP(USER,VALUE)
.E I FIELD="STATUS",$L(VALUE) D
..S USER=$P(^FSCD("SCHEDULE",NUM,0),U,2),DATE=$P(^(0),U)
..I USER,DATE K ^FSCD("SCHEDULE","AUDS",USER,DATE,VALUE,NUM) D XTMP(USER,DATE)
Q
;
XTMP(USER,DATE) ;
N WSUSER
S WSUSER=$P($G(^FSC("SPEC",+USER,200)),U)
I $L(WSUSER) Q ;**** D BUILD^FSCWSP(WSUSER,DATE)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCXREFS 1398 printed Nov 22, 2024@17:30:45 Page 2
FSCXREFS ;SLC/STAFF-NOIS Xrefs Call ;1/11/98 15:27
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
AUDS(OP,FIELD,VALUE,NUM) ; from dd 7103.1
+1 NEW USER,DATE,STATUS
+2 IF OP="SET"
Begin DoDot:1
+3 IF FIELD="USER"
IF VALUE
Begin DoDot:2
+4 SET DATE=$PIECE(^FSCD("SCHEDULE",NUM,0),U)
SET STATUS=$PIECE(^(0),U,3)
+5 IF DATE
IF $LENGTH(STATUS)
SET ^FSCD("SCHEDULE","AUDS",VALUE,DATE,STATUS,NUM)=""
DO XTMP(VALUE,DATE)
End DoDot:2
+6 IF '$TEST
IF FIELD="DATE"
IF VALUE
Begin DoDot:2
+7 SET USER=$PIECE(^FSCD("SCHEDULE",NUM,0),U,2)
SET STATUS=$PIECE(^(0),U,3)
+8 IF USER
IF $LENGTH(STATUS)
SET ^FSCD("SCHEDULE","AUDS",USER,VALUE,STATUS,NUM)=""
DO XTMP(USER,VALUE)
End DoDot:2
+9 IF '$TEST
IF FIELD="STATUS"
IF $LENGTH(VALUE)
Begin DoDot:2
+10 SET USER=$PIECE(^FSCD("SCHEDULE",NUM,0),U,2)
SET DATE=$PIECE(^(0),U)
+11 IF USER
IF DATE
SET ^FSCD("SCHEDULE","AUDS",USER,DATE,VALUE,NUM)=""
DO XTMP(USER,VALUE)
End DoDot:2
End DoDot:1
+12 IF '$TEST
IF OP="KILL"
Begin DoDot:1
+13 IF FIELD="USER"
IF VALUE
Begin DoDot:2
+14 SET DATE=$PIECE(^FSCD("SCHEDULE",NUM,0),U)
SET STATUS=$PIECE(^(0),U,3)
+15 IF DATE
IF $LENGTH(STATUS)
KILL ^FSCD("SCHEDULE","AUDS",VALUE,DATE,STATUS,NUM)
DO XTMP(VALUE,DATE)
End DoDot:2
+16 IF '$TEST
IF FIELD="DATE"
IF VALUE
Begin DoDot:2
+17 SET USER=$PIECE(^FSCD("SCHEDULE",NUM,0),U,2)
SET STATUS=$PIECE(^(0),U,3)
+18 IF USER
IF $LENGTH(STATUS)
KILL ^FSCD("SCHEDULE","AUDS",USER,VALUE,STATUS,NUM)
DO XTMP(USER,VALUE)
End DoDot:2
+19 IF '$TEST
IF FIELD="STATUS"
IF $LENGTH(VALUE)
Begin DoDot:2
+20 SET USER=$PIECE(^FSCD("SCHEDULE",NUM,0),U,2)
SET DATE=$PIECE(^(0),U)
+21 IF USER
IF DATE
KILL ^FSCD("SCHEDULE","AUDS",USER,DATE,VALUE,NUM)
DO XTMP(USER,DATE)
End DoDot:2
End DoDot:1
+22 QUIT
+23 ;
XTMP(USER,DATE) ;
+1 NEW WSUSER
+2 SET WSUSER=$PIECE($GET(^FSC("SPEC",+USER,200)),U)
+3 ;**** D BUILD^FSCWSP(WSUSER,DATE)
IF $LENGTH(WSUSER)
QUIT
+4 QUIT