BUSAACVR ;GDIT/HS/BEE-IHS USER SECURITY AUDIT Access Program ; 31 Jan 2013 9:53 AM
;;1.0;IHS USER SECURITY AUDIT;;Nov 05, 2013;Build 65
;
Q
;
CHECKAV(BUSAAV) ;EP - Authenticate AC/VC and Return DUZ
;
; Input: BUSAAV - ACCESS CODE_";"_VERIFY CODE
; Output: DUZ value
;
N BUSADUZ,XUF
;
S:$G(U)="" U="^"
S:$G(DT)="" DT=$$DT^XLFDT
;
S XUF=0
S BUSADUZ=$$CHECKAV^XUS(BUSAAV)
I BUSADUZ=0 Q 0
;
;Return DUZ if user inactive
I (+$P($G(^VA(200,BUSADUZ,0)),U,11)'>0)!(+$P($G(^VA(200,BUSADUZ,0)),U,11)'<DT) Q BUSADUZ
Q 0
;
AUTH(BUSADUZ) ;EP - Authenticate User for BUSA REPORT Access
;
; Input: BUSADUZ - User's DUZ value
; Output: 0 - No Authorized/1 - Authorized
;
N BUSAKEY,EXEC,GL
;
S:$G(U)="" U="^"
;
I $G(BUSADUZ)<1 Q 0
S BUSAKEY=$O(^DIC(19.1,"B","BUSAZRPT","")) I BUSAKEY="" Q 0
I '$D(^VA(200,"AB",BUSAKEY,BUSADUZ,BUSAKEY)) Q 0
;
;Now check if user defined in Cache User Access class
S EXEC="S GL=$NA(^BUSA.UsersI(""StatusUserIdx"",""A""))" X EXEC
I '$D(@GL@(" "_BUSADUZ)) Q 0
;
Q 1
BUSAACVR ;GDIT/HS/BEE-IHS USER SECURITY AUDIT Access Program ; 31 Jan 2013 9:53 AM
+1 ;;1.0;IHS USER SECURITY AUDIT;;Nov 05, 2013;Build 65
+2 ;
+3 QUIT
+4 ;
CHECKAV(BUSAAV) ;EP - Authenticate AC/VC and Return DUZ
+1 ;
+2 ; Input: BUSAAV - ACCESS CODE_";"_VERIFY CODE
+3 ; Output: DUZ value
+4 ;
+5 NEW BUSADUZ,XUF
+6 ;
+7 IF $GET(U)=""
SET U="^"
+8 IF $GET(DT)=""
SET DT=$$DT^XLFDT
+9 ;
+10 SET XUF=0
+11 SET BUSADUZ=$$CHECKAV^XUS(BUSAAV)
+12 IF BUSADUZ=0
QUIT 0
+13 ;
+14 ;Return DUZ if user inactive
+15 IF (+$PIECE($GET(^VA(200,BUSADUZ,0)),U,11)'>0)!(+$PIECE($GET(^VA(200,BUSADUZ,0)),U,11)'<DT)
QUIT BUSADUZ
+16 QUIT 0
+17 ;
AUTH(BUSADUZ) ;EP - Authenticate User for BUSA REPORT Access
+1 ;
+2 ; Input: BUSADUZ - User's DUZ value
+3 ; Output: 0 - No Authorized/1 - Authorized
+4 ;
+5 NEW BUSAKEY,EXEC,GL
+6 ;
+7 IF $GET(U)=""
SET U="^"
+8 ;
+9 IF $GET(BUSADUZ)<1
QUIT 0
+10 SET BUSAKEY=$ORDER(^DIC(19.1,"B","BUSAZRPT",""))
IF BUSAKEY=""
QUIT 0
+11 IF '$DATA(^VA(200,"AB",BUSAKEY,BUSADUZ,BUSAKEY))
QUIT 0
+12 ;
+13 ;Now check if user defined in Cache User Access class
+14 SET EXEC="S GL=$NA(^BUSA.UsersI(""StatusUserIdx"",""A""))"
XECUTE EXEC
+15 IF '$DATA(@GL@(" "_BUSADUZ))
QUIT 0
+16 ;
+17 QUIT 1