BLRALAU ;DAOU/ALA-Set Lab Audit [ 11/18/2002 1:31 PM ]
;;5.2;LR;**1013,1015**;NOV 18, 2002
;
;**PROGRAM DESCRIPTION**
; This program sets an audit trail of users who
; are accessing certain patients' records in the
; Lab module.
;
; Input Parameters
; DUZ = User IEN
; XQY = Menu IEN
; DFN = Patient IEN
;
EN NEW DIC,DLAYGO
;
; Check if Auditing is turned ON
I $$GET1^DIQ(9009027.2,1,.02,"I")<1 Q
;
; Create a new record
S DIC="^BLRALAB(9009027,",DIC(0)="LZX",DLAYGO=9009027
S X=$$NOW^XLFDT()
D FILE^DICN Q:+Y<1
S BLRALDA=+Y
;
; Get accession number
I $G(LRSS)="MI" S BLRAACN=$G(LRACC)
I $G(LRSS)="CH" S BLRAACN=$P($G(LR0),U,6)
;
; Set up record
S BLRALY(9009027,BLRALDA_",",.02)=DUZ
S BLRALY(9009027,BLRALDA_",",.03)=XQY
S BLRALY(9009027,BLRALDA_",",.04)=DFN
S BLRALY(9009027,BLRALDA_",",.05)=$G(BLRAACN)
;
D FILE^DIE("","BLRALY")
;
K BLRALDA,BLRAACN
Q
BLRALAU ;DAOU/ALA-Set Lab Audit [ 11/18/2002 1:31 PM ]
+1 ;;5.2;LR;**1013,1015**;NOV 18, 2002
+2 ;
+3 ;**PROGRAM DESCRIPTION**
+4 ; This program sets an audit trail of users who
+5 ; are accessing certain patients' records in the
+6 ; Lab module.
+7 ;
+8 ; Input Parameters
+9 ; DUZ = User IEN
+10 ; XQY = Menu IEN
+11 ; DFN = Patient IEN
+12 ;
EN NEW DIC,DLAYGO
+1 ;
+2 ; Check if Auditing is turned ON
+3 IF $$GET1^DIQ(9009027.2,1,.02,"I")<1
QUIT
+4 ;
+5 ; Create a new record
+6 SET DIC="^BLRALAB(9009027,"
SET DIC(0)="LZX"
SET DLAYGO=9009027
+7 SET X=$$NOW^XLFDT()
+8 DO FILE^DICN
IF +Y<1
QUIT
+9 SET BLRALDA=+Y
+10 ;
+11 ; Get accession number
+12 IF $GET(LRSS)="MI"
SET BLRAACN=$GET(LRACC)
+13 IF $GET(LRSS)="CH"
SET BLRAACN=$PIECE($GET(LR0),U,6)
+14 ;
+15 ; Set up record
+16 SET BLRALY(9009027,BLRALDA_",",.02)=DUZ
+17 SET BLRALY(9009027,BLRALDA_",",.03)=XQY
+18 SET BLRALY(9009027,BLRALDA_",",.04)=DFN
+19 SET BLRALY(9009027,BLRALDA_",",.05)=$GET(BLRAACN)
+20 ;
+21 DO FILE^DIE("","BLRALY")
+22 ;
+23 KILL BLRALDA,BLRAACN
+24 QUIT