SDESCLINICUTIL ;ALB/MGD - VISTA SCHEDULING CLINIC UTILITIES ;NOV 12, 2021
;;5.3;Scheduling;**801**;Aug 13, 1993;Build 13
;;Per VHA Directive 6402, this routine should not be modified
;
PRIVUSR(CLINIC,USER) ;Does the user have access to the Restricted clinic
; It is assumed that all validation has been done prior to calling this utility
N RETURN,I
S RETURN=0
I $G(^SC(CLINIC,"SDPROT"))'="Y" S RETURN=1
E D
.S I=0
.F S I=$O(^SC(CLINIC,"SDPRIV",I)) Q:I="" D Q:RETURN
..I +$G(^SC(CLINIC,"SDPRIV",I,0))=USER S RETURN=1
Q RETURN
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDESCLINICUTIL 555 printed Dec 13, 2024@02:56:14 Page 2
SDESCLINICUTIL ;ALB/MGD - VISTA SCHEDULING CLINIC UTILITIES ;NOV 12, 2021
+1 ;;5.3;Scheduling;**801**;Aug 13, 1993;Build 13
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;
PRIVUSR(CLINIC,USER) ;Does the user have access to the Restricted clinic
+1 ; It is assumed that all validation has been done prior to calling this utility
+2 NEW RETURN,I
+3 SET RETURN=0
+4 IF $GET(^SC(CLINIC,"SDPROT"))'="Y"
SET RETURN=1
+5 IF '$TEST
Begin DoDot:1
+6 SET I=0
+7 FOR
SET I=$ORDER(^SC(CLINIC,"SDPRIV",I))
if I=""
QUIT
Begin DoDot:2
+8 IF +$GET(^SC(CLINIC,"SDPRIV",I,0))=USER
SET RETURN=1
End DoDot:2
if RETURN
QUIT
End DoDot:1
+9 QUIT RETURN