STANDARD DATA DICTIONARY #1.1 -- AUDIT FILE                                                                       3/24/25    PAGE 1
STORED IN ^DIA(   SITE: WWW.BMIRWIN.COM   UCI: VISTA,VISTA                                                        (VERSION 22.2)   

DATA          NAME                  GLOBAL        DATA
ELEMENT       TITLE                 LOCATION      TYPE
-----------------------------------------------------------------------------------------------------------------------------------
This file stores an audit trail of changes made to data fields.  


              DD ACCESS: ^
              WR ACCESS: ^
             DEL ACCESS: ^
           LAYGO ACCESS: ^
IDENTIFIED BY: 
      "WRITE": N % S %=$P(^(0),U,2) D EN^DDIOL("   "_$$NAKED^DIUTL("$$DATE^DIUTL(%)"),"","?0")

CROSS
REFERENCED BY: INTERNAL ENTRY NUMBER(B), DATE/TIME RECORDED(C), USER(D)

    LAST MODIFIED: JUL 8,2019@09:46:15

1.1,.001      NUMBER                     NUMBER

              INPUT TRANSFORM:  K:+X'=X!(X<1)!(X?.E1"."1N.N) X
              HELP-PROMPT:      A whole number greater than 1. 

1.1,.01       INTERNAL ENTRY NUMBER  0;1 FREE TEXT (Required)

              The Internal Number of the Entry that has been audited.   
              INPUT TRANSFORM:  K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>16!($L(X)<1)!'(X'?1P.E) X
              CROSS-REFERENCE:  1.1^B 
                                1)= S ^DIA(DIA,"B",$E(X,1,30),DA)=""
                                2)= K ^DIA(DIA,"B",$E(X,1,30),DA)


1.1,.02       DATE/TIME RECORDED     0;2 DATE (Required)

              INPUT TRANSFORM:  S %DT="ETXR" D ^%DT S X=Y K:Y<1 X
              CROSS-REFERENCE:  1.1^C 
                                1)= S ^DIA(DIA,"C",$E(X,1,30),DA)=""
                                2)= K ^DIA(DIA,"C",$E(X,1,30),DA)


1.1,.03       FIELD NUMBER           0;3 FREE TEXT (Required)

              INPUT TRANSFORM:  K:$L(X)>10!$L(X)<1) X
              HELP-PROMPT:      The number of the field that was audited. 

1.1,.04       USER                   0;4 POINTER TO NEW PERSON FILE (#200) (Required)

              CROSS-REFERENCE:  1.1^D 
                                1)= S ^DIA(DIA,"D",$E(X,1,30),DA)=""
                                2)= K ^DIA(DIA,"D",$E(X,1,30),DA)


1.1,.05       RECORD ADDED           0;5 SET

                                'A' FOR Added Record; 
              DESCRIPTION:      When a new recorded is added to a file (sub-file) and the .01 field is being audited, then this
                                field will be set to an 'A'.  


1.1,.06       ACCESSED               0;6 SET

                                'i' FOR INQUIRED TO ENTRY; 
              HELP-PROMPT:      This field should only have a value if the audit event represents an inquiry that DID NOT CHANGE 
                                DATA 
              DESCRIPTION:      This flag (settable by ACCESSED^DIET) is designed to record that a user LOOKED UP the Entry,
                                without necessarily changing it.  Such an audit might be set by the POST-SELECTION ACTION of a
                                File, e.g. for HIPAA.  


1.1,1         ENTRY NAME              ;  COMPUTED

              MUMPS CODE:       N C,Y S Y=^DIC(DIA,0,"GL"),X=^DIA(DIA,D0,0),Y=$P($G(@(Y_+X_",0)")),U),C=$P($G(^DD(DIA,.01,0)),U,2) 
                                D Y^DIQ:C]"" S X=Y
              DESCRIPTION:      The value of the .01 field of the entry in which the audited change occurred is retrieved from the
                                Audit Log and output.  


1.1,1.1       FIELD NAME              ;  COMPUTED

              MUMPS CODE:       S Y(1.1,1.1)=$S($D(^DIA(DIA,D0,0)):$P(^(0),U,3),1:""),X="" Q:$P($G(^(0)),U,6)="i"  X ^DD(1.1,1.1,9.
                                2) K Y(1.1) S X=$E(X,1,$L(X)-1)
                                9.2 = X ^DD(1.1,1.1,9.3) S X="" F %=1:1:%-1 S X=X_Y(1.1,%)_","
                                9.3 = S X1=DIA F %=1:1 S X=$P(Y(1.1,1.1),",",%) Q:X=""  S Y(1.1,%)=$S($D(^DD(X1,X,0)):$P(^(0),U,1,2
                                ),1:"????"),X1=+$P(Y(1.1,%),U,2),Y(1.1,%)=$P(Y(1.1,%),U,1)
              DESCRIPTION:
                                The Field NAME of the Field for which the audited change was made is output.  

              NOTES:            XXXX--CAN'T BE ALTERED EXCEPT BY PROGRAMMER


1.1,2         OLD VALUE               ;  COMPUTED

              MUMPS CODE:       S X=$G(^DIA(DIA,D0,2)),X=$S(X]"":X,($P($G(^(0)),U,6)="i"!$D(^(2.14))):"",1:"")
              DESCRIPTION:      The value that was changed by an audited edit is retrieved from the Audit Log and output.  If no
                                value existed  is output.  


1.1,2.1       OLD INTERNAL VALUE     2.1;1 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>30 X

1.1,2.14      OLD W-P TEXT            ;  COMPUTED MULTIPLE

              MUMPS CODE:       X "N I,X F I=0:0 S I=$O(^DIA(DIA,D0,2.14,I)) Q:'I  S X=$G(^(I,0)) X DICMX"
              DESCRIPTION:
                                Tells what the entire multi-line text field looked like BEFORE it was changed by the audited event.  


1.1,2.2       DATATYPE OF OLD VALUE  2.1;2 SET

                                'S' FOR SET; 
                                'P' FOR POINTER; 
                                'V' FOR VARIABLE POINTER; 

1.1,2.9       PATIENT                 ;  COMPUTED POINTER TO PATIENT FILE (#2)

              MUMPS CODE:       N A,% S %=$G(^DIC(DIA,0,"GL")),A=+$G(^DIA(DIA,D0,0)) X ^DD(1.1,2.9,9.2)
                                9.2 = S X="",X=$S(DIA=2:A,DIA=9000001:A,1:"") X ^DD(1.1,2.9,9.3):'X
                                9.3 = N I,GL S I=$S($O(^DD(2,0,"PT",DIA,0)):+$O(^(0)),1:$O(^DD(9000001,0,"PT",DIA,0))) I I S GL=$P(
                                $G(^DD(DIA,I,0)),U,4) I GL'="" X ^DD(1.1,2.9,9.5)
                                9.4 = S X=$S(X[";DPT(":+X,X[";AUPNPAT(":+X,1:"")
                                9.5 = S X=$P(GL,";"),X=$S($D(@(%_+A_","""_X_""")")):$P(^(X),U,+$P(GL,";",2)),1:"") X:X[";" ^DD(1.1,
                                2.9,9.4)
              ALGORITHM:        N A,% S %=$G(^DIC(DIA,0,"GL")),A=+$G(^DIA(DIA,D0,0)) X ^DD(1.1,2.9,9.2)
              DESCRIPTION:      If the audited File is #2 or #9000001, or if there is a pointer back to either of these Files from
                                the audited File, then this field shows which particular Patient is involved in the audited data.  


1.1,3         NEW VALUE               ;  COMPUTED

              MUMPS CODE:       S X=$G(^DIA(DIA,D0,3)),X=$S(X]"":X,$G(^(2))]"":"",1:"")
              DESCRIPTION:      The value that was entered by an audited edit is retrieved from the Audit Log and output.  If the
                                existing value was removed and not replaced,  is output.  


1.1,3.1       NEW INTERNAL VALUE     3.1;1 FREE TEXT

              INPUT TRANSFORM:  K:$L(X)>30 X

1.1,3.2       DATATYPE OF NEW VALUE  3.1;2 SET

                                'S' FOR SET; 
                                'P' FOR POINTER; 
                                'V' FOR VARIABLE POINTER; 

1.1,4.1       MENU OPTION USED       4.1;1 POINTER TO OPTION FILE (#19)

              DESCRIPTION:
                                This is the Option that the Kernel menu system used to change the audited data.  

              TECHNICAL DESCR:
                                This field contains the value of +XQY and is a direct pointer to the OPTION FILE (#19).  


1.1,4.2       PROTOCOL or OPTION USED 4.1;2       VARIABLE POINTER

              FILE  ORDER  PREFIX    LAYGO  MESSAGE
                 19   1    O            n   What Option was used? 
                 101  2    P            n   What Protocol was used? 
                                         
              HELP-PROMPT:      Answer must be 1-63 characters in length. 
              DESCRIPTION:
                                This is the Protocol or Option (type Protocol) that was used when the audit took place.  

              TECHNICAL DESCR:  This is a Variable Pointer field whose value is obtained from the local variable XQORNOD, which is
                                in the form ien;global root.  It can either point to the Option file or to the Protocol file.  



      FILES POINTED TO                      FIELDS

NEW PERSON (#200)                 USER (#.04)

OPTION (#19)                      MENU OPTION USED (#4.1)
                                  PROTOCOL or OPTION USED (#4.2)

PATIENT (#2)                      PATIENT (#2.9)

PROTOCOL (#101)                   PROTOCOL or OPTION USED (#4.2)



INPUT TEMPLATE(S):

PRINT TEMPLATE(S):
CAPTIONED                                         USER #0    
LRJ SYS DISPLAY FILE 60 CHANGENOV 16, 2011@10:48  USER #0                                                LABORATORY TEST AUDIT LIST
     This print template generates a listing of all the fields in the 
     LABORATORY TEST (#60) file that have been marked for auditing.  The
     following fields are included in the print template report:
       INTERNAL ENTRY NUMBER (#.01), DATE/TIME  RECORDED (#.02), USER (#.04),
       FIELD NAME, (#1.1), OLD VALUE (#2) and NEW VALUE (#3).
     The print template will then execute SETTMP^LRJSAU60() to 
     add the cross reference entry in ^TMP("LRDATA",$J,"NEW" for any new entry 
     or for any existing entry where the change was less than two hours after 
     the initial record was created.  The report is produced by reading
     through/formatting the indexed entries found in the ^TMP("LRDATA",$J global.
LRJ SYS GET INDIRECT AUDIT    OCT 25, 2010@13:07  USER #0                                                LABORATORY TEST AUDIT LIST
     This print template generates a listing of the entries in the
     WARD LOCATION file (#42), HOSPITAL LOCATION file (#44), and the ROOM-BED 
     file (#405.4) where changes have occurred to fields that have been marked
     for auditing by the Lab software and includes the following AUDIT
     fields if available: NUMBER (#.001), INTERNAL ENTRY NUMBER (#.01),
     DATE/TIME RECORDED (#.02), FIELD NUMBER (#.03), USER (#.04), RECORD ADDED
     (#.05), ENTRY NAME (#1), FIELD NAME (#1.1), OLD VALUE (#2), OLD INTERNAL
     VALUE (#2.1), DATATYPE OF OLD VALUE (#2.2), NEW VALUE (#3), NEW INTERNAL
     VALUE (#3.1), DATATYPE OF NEW VALUE (#3.2), MENU OPTION USED (#4.1) and
     PROTOCOL OR OPTION USED (#4.2).
XUSEC TERMINATION REPORT      APR 23, 2004@10:56  USER #0                                       New Person Termination Audit Report
XUSEC UPARROW TERM REPORT     APR 23, 2004@07:36  USER #0                                                                         @

SORT TEMPLATE(S):
LRJ SYS DISPLAY FILE 60 CHANGEJUL 12, 2010@13:51  USER #0    
SORT BY: @DATE/TIME RECORDED//    (User is asked range)
  WITHIN DATE/TIME RECORDED, SORT BY: @INTERNAL ENTRY NUMBER// (INTERNAL ENTRY NUMBER not null)
     This sort template is used by the Display File 60 Changes [LRJ SYS MAP 
     AUD DISPLAY FILE 60 CHANGES] protocol of the Audit Manager subsystem to 
     display audit information based on changes to LABORATORY TEST file (#60). 
     (Routine: AUDISP^LRJSAU60)
      
     This sort template is also used by the Display New Person File Changes 
     [LRJ SYS MAP AUD DISPLAY NEW PERSON FILE CHANGES] protocol of the Audit 
     Manager subsystem to display audit information based on changes to NEW 
     PERSON file (#200). (Routine: AUDISP^LRJSAUNP)

XUSEC TERMINATION REPORT      APR 22, 2004@08:08  USER #0    
SORT BY: @ENTRY NAME// (ENTRY NAME not null)
  WITHIN ENTRY NAME, SORT BY: @FIELD NUMBER// (FIELD NUMBER equals 9.2)
    WITHIN FIELD NUMBER, SORT BY: @DATE/TIME RECORDED//    (User is asked range)

XUSEC TERMINATION REPORT Q    AUG 09, 2004@13:25  USER #0    
SORT BY: @ENTRY NAME// (ENTRY NAME not null)
  WITHIN ENTRY NAME, SORT BY: @FIELD NUMBER// (FIELD NUMBER equals 9.2)
    WITHIN FIELD NUMBER, SORT BY: ((DATE(#.02)>(TODAY-9))&(DATE(#.02)(TODAY-9))&(DATE(#.02)