RORUTL11 ;HCIOFO/SG - ACCESS AND SECURITY UTILITIES ; 03 Dec 2015 1:56 PM
;;1.5;CLINICAL CASE REGISTRIES;**13,14,15,17,18,20,19,21,22,24,27,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42**;Feb 17, 2006;Build 9
;
;******************************************************************************
;******************************************************************************
; --- ROUTINE MODIFICATION LOG ---
;
;PKG/PATCH DATE DEVELOPER MODIFICATION
;----------- ---------- ----------- ----------------------------------------
;ROR*1.5*13 DEC 2010 A SAUNDERS Added tag VERSRV to return an associated
; version to the GUI during RPC call ROR
; GET M VERSION
;ROR*1.5*14 APR 2011 A SAUNDERS Updated version in tag VERSRV
;ROR*1.5*15 JUN 2011 C RAY Updated version
;ROR*1.5*17 DEC 2011 C RAY Updated version
;ROR*1.5*18 MAY 2012 C RAY Updated version
;ROR*1.5*20 DEC 2012 C RAY Updated version
;ROR*1.5*19 APR 2012 K GUPTA Updated version
;ROR*1.5*21 AUG 2013 T KOPP Updated version
;ROR*1.5*22 FEB 2014 T KOPP Updated version
;ROR*1.5*24 DEC 2014 T KOPP Updated version
;ROR*1.5*27 FEB 2015 T KOPP Updated version
;ROR*1.5*25 MAR 2015 T KOPP Updated version
;ROR*1.5*26 MAY 2015 T KOPP Updated version
;ROR*1.5*28 APR 2016 T KOPP Updated version
;ROR*1.5*29 AUG 2016 T KOPP Updated version
;ROR*1.5*30 MAR 2017 M FERRARESE Updated version
;ROR*1.5*31 JUL 2017 S ALSAHHAR Updated version
;ROR*1.5*32 JUL 2017 S ALSAHHAR Updated version
;ROR*1.5*33 MAY 2018 M FERRARESE Updated version
;ROR*1.5*34 JAN 2019 M FERRARESE Updated version
;ROR*1.5*35 AUG 2019 M FERRARESE Updated version
;ROR*1.5*36 APR 2020 M FERRARESE Updated version
;ROR*1.5*37 SEP 2020 M FERRARESE Updated version
;ROR*1.5*38 APR 2021 F TRAXLER Updated version
;ROR*1.5*39 AUG 2021 M FERRARESE Updated version
;ROR*1.5*40 JUL 2022 F TRAXLER Updated version
;ROR*1.5*41 JAN 2023 F TRAXLER Updated version
;ROR*1.5*42 FEB 2024 F TRAXLER Updated version
;******************************************************************************
; This routine uses the following IAs:
;
; #2055 $$ROOT^DILFD (supported)
; #10013 ENALL^DIK (supported)
;
;******************************************************************************
Q
;
;***** REBUILDS THE "ACL" CROSS-REFERENCE (USER ACCESS)
;
; Return Values:
; <0 Error code
; 0 Ok
;
RNDXACL() ;
N DA,DIK,REGIEN,ROOT
S ROOT=$$ROOT^DILFD(798.1,,1) K @ROOT@("ACL")
S REGIEN=0
F S REGIEN=$O(@ROOT@(REGIEN)) Q:'REGIEN D
. S DIK=$$ROOT^DILFD(798.118,","_REGIEN_","),DIK(1)=".01^ACL"
. S DA(1)=REGIEN D ENALL^DIK
Q 0
;
;***** CHECKS IF THE RPC CAN BE CALLED BY THE CURRENT USER
;
; RPCNAME Name of the RPC
;
; [REGIEN] Registry IEN
;
; [FLAGS] Flags that control the execution (can be combined):
; A Administrator Only
; I IRM Only
;
; Return Values:
; <0 Error code
; 0 Ok
; >0 Access denied
;
RPCHECK(RPCNAME,REGIEN,FLAGS) ;
N ACCESS,KEY,RC
Q:$G(DUZ)'>0 $$ERROR^RORERR(-40,,,,"DUZ")
S FLAGS=$G(FLAGS),REGIEN=+$G(REGIEN)
;---
S (ACCESS,RC)=0
D Q:ACCESS 0
. I REGIEN Q:$D(^ROR(798.1,"ACL",DUZ,REGIEN))<10
. E Q:$D(^ROR(798.1,"ACL",DUZ))<10
. I FLAGS["I" Q:'$D(^XUSEC("ROR VA IRM",DUZ))
. I FLAGS["A" S RC=1,KEY="" D Q:RC
. . F S KEY=$O(^ROR(798.1,"ACL",DUZ,REGIEN,KEY)) Q:KEY="" D Q:'RC
. . . I KEY?1"ROR"1.E S:KEY["ADMIN" RC=0
. S ACCESS=1
;---
D ACVIOLTN^RORLOG(-91,$G(REGIEN),RPCNAME)
Q 1
;
;***** RETURNS SERVER VERSION
;REMOTE PROCEDURE: ROR GET M VERSION
;
;The purpose of this RPC is to catch when the GUI executable has been
;upgraded AND REQUIRES an associated M patch, but the M patch has not
;been installed yet.
;
; VAL n.n.n represents the CCR package version and the m patch number that
; contains the associated M changes that the GUI is expecting.
;
;NOTE TO CCR MAINTENANCE TEAM: For M changes made by the maintenance team,
;the server version below should not be modified. The only time the server
;version should be modified is if the GUI was changed AND there were
;associated M changes needed for it.
;
VERSRV(VAL) ;
S VAL="1.5.42"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRORUTL11 4658 printed Dec 13, 2024@01:44:04 Page 2
RORUTL11 ;HCIOFO/SG - ACCESS AND SECURITY UTILITIES ; 03 Dec 2015 1:56 PM
+1 ;;1.5;CLINICAL CASE REGISTRIES;**13,14,15,17,18,20,19,21,22,24,27,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42**;Feb 17, 2006;Build 9
+2 ;
+3 ;******************************************************************************
+4 ;******************************************************************************
+5 ; --- ROUTINE MODIFICATION LOG ---
+6 ;
+7 ;PKG/PATCH DATE DEVELOPER MODIFICATION
+8 ;----------- ---------- ----------- ----------------------------------------
+9 ;ROR*1.5*13 DEC 2010 A SAUNDERS Added tag VERSRV to return an associated
+10 ; version to the GUI during RPC call ROR
+11 ; GET M VERSION
+12 ;ROR*1.5*14 APR 2011 A SAUNDERS Updated version in tag VERSRV
+13 ;ROR*1.5*15 JUN 2011 C RAY Updated version
+14 ;ROR*1.5*17 DEC 2011 C RAY Updated version
+15 ;ROR*1.5*18 MAY 2012 C RAY Updated version
+16 ;ROR*1.5*20 DEC 2012 C RAY Updated version
+17 ;ROR*1.5*19 APR 2012 K GUPTA Updated version
+18 ;ROR*1.5*21 AUG 2013 T KOPP Updated version
+19 ;ROR*1.5*22 FEB 2014 T KOPP Updated version
+20 ;ROR*1.5*24 DEC 2014 T KOPP Updated version
+21 ;ROR*1.5*27 FEB 2015 T KOPP Updated version
+22 ;ROR*1.5*25 MAR 2015 T KOPP Updated version
+23 ;ROR*1.5*26 MAY 2015 T KOPP Updated version
+24 ;ROR*1.5*28 APR 2016 T KOPP Updated version
+25 ;ROR*1.5*29 AUG 2016 T KOPP Updated version
+26 ;ROR*1.5*30 MAR 2017 M FERRARESE Updated version
+27 ;ROR*1.5*31 JUL 2017 S ALSAHHAR Updated version
+28 ;ROR*1.5*32 JUL 2017 S ALSAHHAR Updated version
+29 ;ROR*1.5*33 MAY 2018 M FERRARESE Updated version
+30 ;ROR*1.5*34 JAN 2019 M FERRARESE Updated version
+31 ;ROR*1.5*35 AUG 2019 M FERRARESE Updated version
+32 ;ROR*1.5*36 APR 2020 M FERRARESE Updated version
+33 ;ROR*1.5*37 SEP 2020 M FERRARESE Updated version
+34 ;ROR*1.5*38 APR 2021 F TRAXLER Updated version
+35 ;ROR*1.5*39 AUG 2021 M FERRARESE Updated version
+36 ;ROR*1.5*40 JUL 2022 F TRAXLER Updated version
+37 ;ROR*1.5*41 JAN 2023 F TRAXLER Updated version
+38 ;ROR*1.5*42 FEB 2024 F TRAXLER Updated version
+39 ;******************************************************************************
+40 ; This routine uses the following IAs:
+41 ;
+42 ; #2055 $$ROOT^DILFD (supported)
+43 ; #10013 ENALL^DIK (supported)
+44 ;
+45 ;******************************************************************************
+46 QUIT
+47 ;
+48 ;***** REBUILDS THE "ACL" CROSS-REFERENCE (USER ACCESS)
+49 ;
+50 ; Return Values:
+51 ; <0 Error code
+52 ; 0 Ok
+53 ;
RNDXACL() ;
+1 NEW DA,DIK,REGIEN,ROOT
+2 SET ROOT=$$ROOT^DILFD(798.1,,1)
KILL @ROOT@("ACL")
+3 SET REGIEN=0
+4 FOR
SET REGIEN=$ORDER(@ROOT@(REGIEN))
if 'REGIEN
QUIT
Begin DoDot:1
+5 SET DIK=$$ROOT^DILFD(798.118,","_REGIEN_",")
SET DIK(1)=".01^ACL"
+6 SET DA(1)=REGIEN
DO ENALL^DIK
End DoDot:1
+7 QUIT 0
+8 ;
+9 ;***** CHECKS IF THE RPC CAN BE CALLED BY THE CURRENT USER
+10 ;
+11 ; RPCNAME Name of the RPC
+12 ;
+13 ; [REGIEN] Registry IEN
+14 ;
+15 ; [FLAGS] Flags that control the execution (can be combined):
+16 ; A Administrator Only
+17 ; I IRM Only
+18 ;
+19 ; Return Values:
+20 ; <0 Error code
+21 ; 0 Ok
+22 ; >0 Access denied
+23 ;
RPCHECK(RPCNAME,REGIEN,FLAGS) ;
+1 NEW ACCESS,KEY,RC
+2 if $GET(DUZ)'>0
QUIT $$ERROR^RORERR(-40,,,,"DUZ")
+3 SET FLAGS=$GET(FLAGS)
SET REGIEN=+$GET(REGIEN)
+4 ;---
+5 SET (ACCESS,RC)=0
+6 Begin DoDot:1
+7 IF REGIEN
if $DATA(^ROR(798.1,"ACL",DUZ,REGIEN))<10
QUIT
+8 IF '$TEST
if $DATA(^ROR(798.1,"ACL",DUZ))<10
QUIT
+9 IF FLAGS["I"
if '$DATA(^XUSEC("ROR VA IRM",DUZ))
QUIT
+10 IF FLAGS["A"
SET RC=1
SET KEY=""
Begin DoDot:2
+11 FOR
SET KEY=$ORDER(^ROR(798.1,"ACL",DUZ,REGIEN,KEY))
if KEY=""
QUIT
Begin DoDot:3
+12 IF KEY?1"ROR"1.E
if KEY["ADMIN"
SET RC=0
End DoDot:3
if 'RC
QUIT
End DoDot:2
if RC
QUIT
+13 SET ACCESS=1
End DoDot:1
if ACCESS
QUIT 0
+14 ;---
+15 DO ACVIOLTN^RORLOG(-91,$GET(REGIEN),RPCNAME)
+16 QUIT 1
+17 ;
+18 ;***** RETURNS SERVER VERSION
+19 ;REMOTE PROCEDURE: ROR GET M VERSION
+20 ;
+21 ;The purpose of this RPC is to catch when the GUI executable has been
+22 ;upgraded AND REQUIRES an associated M patch, but the M patch has not
+23 ;been installed yet.
+24 ;
+25 ; VAL n.n.n represents the CCR package version and the m patch number that
+26 ; contains the associated M changes that the GUI is expecting.
+27 ;
+28 ;NOTE TO CCR MAINTENANCE TEAM: For M changes made by the maintenance team,
+29 ;the server version below should not be modified. The only time the server
+30 ;version should be modified is if the GUI was changed AND there were
+31 ;associated M changes needed for it.
+32 ;
VERSRV(VAL) ;
+1 SET VAL="1.5.42"
+2 QUIT