CIAVIN1 ;MSC/IND/DKM - RPC Registration ;04-May-2006 08:19;DKM
;;1.1V2;VUECENTRIC FRAMEWORK;;Mar 20, 2007
;;Copyright 2000-2006, Medsphere Systems Corporation
;=================================================================
; Perform various registration actions
REGISTER N X,CTX
S CTX=$$GETOPT^CIAURPC("CIAV VUECENTRIC")
Q:'CTX
F X="CIAV","CIAU","DG","DDR","RGUT","BEH" D REGNMSP^CIAURPC(X,CTX)
F X="OR CPRS GUI CHART" D DOREG(X)
D REGPROT^CIAURPC("XU USER TERMINATE","CIAV USER TERMINATE")
Q
; Add an option as a subcontext to VueCentric
; Remove any redundant RPC's
DOREG(OPT) ;
N RPC,CNT1,CNT2,STAT,IEN
S IEN=$$GETOPT^CIAURPC(OPT)
Q:'IEN
W !!,"Registering ",OPT," as a subcontext under CIAV VUECENTRIC...",!
I $$REGCTX^CIAURPC(IEN,CTX)
W "Removing redundant RPC references...",!
S (CNT1,CNT2)=0
F RPC=0:0 S RPC=$O(^DIC(19,IEN,"RPC","B",RPC)) Q:'RPC D
.S STAT=$$REGRPC^CIAURPC(RPC,CTX,1)
.Q:STAT=-1
.W $$GET1^DIQ(8994,RPC,.01)_" - "
.I STAT=1 W "Removed",! S CNT1=CNT1+1
.E I 'STAT W "Not removed",! S CNT2=CNT2+1
W !,CNT1," remote procedure(s) removed",!
W:CNT2 CNT2," remote procedure(s) could not be removed",!!
Q
CIAVIN1 ;MSC/IND/DKM - RPC Registration ;04-May-2006 08:19;DKM
+1 ;;1.1V2;VUECENTRIC FRAMEWORK;;Mar 20, 2007
+2 ;;Copyright 2000-2006, Medsphere Systems Corporation
+3 ;=================================================================
+4 ; Perform various registration actions
REGISTER NEW X,CTX
+1 SET CTX=$$GETOPT^CIAURPC("CIAV VUECENTRIC")
+2 IF 'CTX
QUIT
+3 FOR X="CIAV","CIAU","DG","DDR","RGUT","BEH"
DO REGNMSP^CIAURPC(X,CTX)
+4 FOR X="OR CPRS GUI CHART"
DO DOREG(X)
+5 DO REGPROT^CIAURPC("XU USER TERMINATE","CIAV USER TERMINATE")
+6 QUIT
+7 ; Add an option as a subcontext to VueCentric
+8 ; Remove any redundant RPC's
DOREG(OPT) ;
+1 NEW RPC,CNT1,CNT2,STAT,IEN
+2 SET IEN=$$GETOPT^CIAURPC(OPT)
+3 IF 'IEN
QUIT
+4 WRITE !!,"Registering ",OPT," as a subcontext under CIAV VUECENTRIC...",!
+5 IF $$REGCTX^CIAURPC(IEN,CTX)
+6 WRITE "Removing redundant RPC references...",!
+7 SET (CNT1,CNT2)=0
+8 FOR RPC=0:0
SET RPC=$ORDER(^DIC(19,IEN,"RPC","B",RPC))
IF 'RPC
QUIT
Begin DoDot:1
+9 SET STAT=$$REGRPC^CIAURPC(RPC,CTX,1)
+10 IF STAT=-1
QUIT
+11 WRITE $$GET1^DIQ(8994,RPC,.01)_" - "
+12 IF STAT=1
WRITE "Removed",!
SET CNT1=CNT1+1
+13 IF '$TEST
IF 'STAT
WRITE "Not removed",!
SET CNT2=CNT2+1
End DoDot:1
+14 WRITE !,CNT1," remote procedure(s) removed",!
+15 IF CNT2
WRITE CNT2," remote procedure(s) could not be removed",!!
+16 QUIT