source: FOIAVistA/tag/r/NOIS-FSC/FSCXREFS.m@ 1383

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1FSCXREFS ;SLC/STAFF-NOIS Xrefs Call ;1/11/98 15:27
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4AUDS(OP,FIELD,VALUE,NUM) ; from dd 7103.1
5 N USER,DATE,STATUS
6 I OP="SET" D
7 .I FIELD="USER",VALUE D
8 ..S DATE=$P(^FSCD("SCHEDULE",NUM,0),U),STATUS=$P(^(0),U,3)
9 ..I DATE,$L(STATUS) S ^FSCD("SCHEDULE","AUDS",VALUE,DATE,STATUS,NUM)="" D XTMP(VALUE,DATE)
10 .E I FIELD="DATE",VALUE D
11 ..S USER=$P(^FSCD("SCHEDULE",NUM,0),U,2),STATUS=$P(^(0),U,3)
12 ..I USER,$L(STATUS) S ^FSCD("SCHEDULE","AUDS",USER,VALUE,STATUS,NUM)="" D XTMP(USER,VALUE)
13 .E I FIELD="STATUS",$L(VALUE) D
14 ..S USER=$P(^FSCD("SCHEDULE",NUM,0),U,2),DATE=$P(^(0),U)
15 ..I USER,DATE S ^FSCD("SCHEDULE","AUDS",USER,DATE,VALUE,NUM)="" D XTMP(USER,VALUE)
16 E I OP="KILL" D
17 .I FIELD="USER",VALUE D
18 ..S DATE=$P(^FSCD("SCHEDULE",NUM,0),U),STATUS=$P(^(0),U,3)
19 ..I DATE,$L(STATUS) K ^FSCD("SCHEDULE","AUDS",VALUE,DATE,STATUS,NUM) D XTMP(VALUE,DATE)
20 .E I FIELD="DATE",VALUE D
21 ..S USER=$P(^FSCD("SCHEDULE",NUM,0),U,2),STATUS=$P(^(0),U,3)
22 ..I USER,$L(STATUS) K ^FSCD("SCHEDULE","AUDS",USER,VALUE,STATUS,NUM) D XTMP(USER,VALUE)
23 .E I FIELD="STATUS",$L(VALUE) D
24 ..S USER=$P(^FSCD("SCHEDULE",NUM,0),U,2),DATE=$P(^(0),U)
25 ..I USER,DATE K ^FSCD("SCHEDULE","AUDS",USER,DATE,VALUE,NUM) D XTMP(USER,DATE)
26 Q
27 ;
28XTMP(USER,DATE) ;
29 N WSUSER
30 S WSUSER=$P($G(^FSC("SPEC",+USER,200)),U)
31 I $L(WSUSER) Q ;**** D BUILD^FSCWSP(WSUSER,DATE)
32 Q
Note: See TracBrowser for help on using the repository browser.