source: FOIAVistA/trunk/r/NOIS-FSC/FSCAUDIT.m@ 905

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1FSCAUDIT ;SLC/STAFF-NOIS Audit ;9/6/98 20:28
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4AUDIT(CALL,OLDV,NEWV) ; from FSCLMPE1, FSCRPCEB, FSCRPCEC, FSCRPCW
5 ; Call is the internal entry number from 7100
6 ; OLDV will be a subscripted variable OLDV(DATENAME)=VALUE
7 ; NEWV will be a subscripted variable NEWV(DATENAME)=VALUE
8 ;
9 I '$G(CALL) Q
10 N ABBREV,CNT,LASTLINE,OK,STR K STR
11 S CNT=0,ABBREV="" F S ABBREV=$O(OLDV(ABBREV)) Q:ABBREV="" D
12 .I OLDV(ABBREV)'=NEWV(ABBREV) D
13 ..I 'CNT S CNT=CNT+1,STR(CNT)="*** "_$$FMTE^XLFDT($$NOW^XLFDT)_" "_$$VALUE^FSCGET(DUZ,7100,5)
14 ..S CNT=CNT+1
15 ..I ABBREV="SUBJECT" S STR(CNT)=$P($G(^FSC("FLD",+$O(^FSC("FLD","AC",ABBREV,0)),0)),U)_": changed from "_OLDV(ABBREV)_" to "_NEWV(ABBREV) Q ; treated separate because no 2nd piece since '^' is allowed in value
16 ..S STR(CNT)=$P($G(^FSC("FLD",+$O(^FSC("FLD","AC",ABBREV,0)),0)),U)_": changed from "
17 ..I $L(STR(CNT))+$L($P(OLDV(ABBREV),U,2))+4<245 S STR(CNT)=STR(CNT)_$P(OLDV(ABBREV),U,2)_" to "
18 ..E S CNT=CNT+1,STR(CNT)=$P(OLDV(ABBREV),U,2)_" to "
19 ..I $L(STR(CNT))+$L($P(NEWV(ABBREV),U,2))<245 S STR(CNT)=STR(CNT)_$P(NEWV(ABBREV),U,2)
20 ..E S CNT=CNT+1,STR(CNT)=$P(NEWV(ABBREV),U,2)
21 I CNT D I 'OK Q
22 .S OK=1
23 .S CNT=CNT+1,STR(CNT)="" ; add an extra line
24 .L +^FSCD("CALL",CALL):30 I '$T S OK=0 Q
25 .S LASTLINE=+$O(^FSCD("CALL",CALL,100,"A"),-1)
26 .S CNT=0 F S CNT=$O(STR(CNT)) Q:CNT<1 D
27 ..S LASTLINE=LASTLINE+1
28 ..S ^FSCD("CALL",CALL,100,LASTLINE,0)=STR(CNT)
29 .S ^FSCD("CALL",CALL,100,0)="^^"_LASTLINE_U_LASTLINE_U_DT_U
30 .L -^FSCD("CALL",CALL)
31 D UPDATE(CALL)
32 K STR
33 Q
34 ;
35DESC(CALL,OLDV,NEWV) ; from FSCLMPE1, FSCRPCEC, FSCRPCEF
36 I '$G(CALL) Q
37 N ABBREV,CNT,LASTLINE,OK,STR K STR
38 S CNT=0,ABBREV="" F S ABBREV=$O(OLDV(ABBREV)) Q:ABBREV="" D
39 .I OLDV(ABBREV)'=NEWV(ABBREV) D
40 ..I 'CNT S CNT=CNT+1,STR(CNT)="*** "_$$FMTE^XLFDT($$NOW^XLFDT)_" "_$$VALUE^FSCGET(DUZ,7100,5)
41 ..S CNT=CNT+1
42 ..S STR(CNT)=$P($G(^FSC("FLD",+$O(^FSC("FLD","AC",ABBREV,0)),0)),U)_": edited."
43 I CNT D I 'OK Q
44 .S OK=1
45 .S CNT=CNT+1,STR(CNT)="" ; add an extra line
46 .L +^FSCD("CALL",CALL):30 I '$T S OK=0 Q
47 .S LASTLINE=+$O(^FSCD("CALL",CALL,100,"A"),-1)
48 .S CNT=0 F S CNT=$O(STR(CNT)) Q:CNT<1 D
49 ..S LASTLINE=LASTLINE+1
50 ..S ^FSCD("CALL",CALL,100,LASTLINE,0)=STR(CNT)
51 .S ^FSCD("CALL",CALL,100,0)="^^"_LASTLINE_U_LASTLINE_U_DT_U
52 .L -^FSCD("CALL",CALL)
53 D UPDATE(CALL)
54 K STR
55 Q
56 ;
57UPDATE(DA) ; from FSCEB, FSCEU, FSCRPCEB, FSCRPCEC, FSCRPCEN, FSCRPCF
58 N DIE,DR
59 S DIE="^FSCD(""CALL"",",DR="123///NOW;124///`"_DUZ
60 L +^FSCD("CALL",CALL):30 I '$T Q ; *** needs ok
61 D ^DIE
62 L -^FSCD("CALL",CALL)
63 Q
Note: See TracBrowser for help on using the repository browser.