Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FSCXREFS

FSCXREFS.m

Go to the documentation of this file.
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