VIAB1P23 ;ALB/MBJ;DRP - VIA RPCs ;04/05/2016
;;1.0;VISTA INTEGRATION ADAPTER;**23**;28-OCT-2020;Build 11
;Per VA Directive 6402, this routine should not be modified.
;
;DBIA# Supported Reference
;----- --------------------------------
;6678 YTQ ALL ANSWERS
;6673 YTQ CHOICES
;6674 YTQ GET SCALES
;6675 YTQ GET REPORT
;6669 YTQ QUESTALL
;6671 YTQ RULES
;6827 YTQ SAVE ADMIN
;6679 YTQ SCORE ADMIN
;6680 YTQ SCORE SAVE
;6670 YTQ SECTION
;6677 YTQ SET ANSWER ALL
;6672 YTQ SKIP
;6668 YTQ TSLIST1
;6667 YTQ USERQ
;7260 YTQRRPC SELECT
;6681 YTQ PN CREATE
;7067 SDEC CHECKIN
;7069 SDEC CHECKOUT
;7073 SDEC CANCKOUT
Q
EN ; Post install to add new RPC to VIAB WEB Services option
N DIC,DIE,X,Y,DA,DR,VIAOPT,VIARPC,VALUE
N X,I,RPCI,RPCIEN
S X=""
D EN^DDIOL("Preparing to update VIAB WEB SERVICE option with new RPC's")
S VALUE="VIAB WEB SERVICES OPTION" S VIAOPT=$$FIND1^DIC(19,,"X",.VALUE) ;get the IEN for the option
I '$G(VIAOPT) D EN^DDIOL("Could not find the VIAB WEB SERVICE option, Update Aborted!") Q
;
F RPCI=1:1 S VIARPC=$P($T(RPC+RPCI),";;",2) Q:(VIARPC="END")!(VIARPC="") D
. S RPCIEN=$O(^XWB(8994,"B",VIARPC,""))
. I RPCIEN="" D EN^DDIOL("Could not find the Remote Procedure "_VIARPC_". Not Added!") Q
.;Don't add if already there
. Q:$O(^DIC(19,VIAOPT,"RPC","B",RPCIEN,""))
. D EN^DDIOL("Adding "_VIARPC_" remote procedure to the VIAB WEB SERVICES OPTION.")
. ;add the RPC to the option
. K DIC,X,Y,DA
. S DA(1)=VIAOPT
. S DIC="^DIC(19,"_DA(1)_",""RPC"","
. S DIC(0)="XL",X=VIARPC
. D ^DIC
.Q
D EN^DDIOL("Update complete")
Q
RPC ;;
;;YTQ ALL ANSWERS;; Modified
;;YTQ CHOICES;; Modified
;;YTQ GET SCALES;; Modified
;;YTQ GET REPORT;; Modified
;;YTQ QUESTALL;; Modified
;;YTQ RULES;; Modified
;;YTQ SAVE ADMIN;; New
;;YTQ SCORE ADMIN;; Modified
;;YTQ SCORE SAVE;; Modified
;;YTQ SECTION;; Modified
;;YTQ SET ANSWER ALL;; Modified
;;YTQ SKIP;; Modified
;;YTQ TSLIST1;; Modified
;;YTQ USERQ;; Modified
;;YTQRRPC SELECT;; Modified
;;YTQ PN CREATE;; Modified
;;SDEC CHECKOUT;;.............................Modified
;;SDEC CHECKIN;; Modified
;;SDEC CANCKOUT;; Modified
;;END;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVIAB1P23 2742 printed Dec 13, 2024@02:45:12 Page 2
VIAB1P23 ;ALB/MBJ;DRP - VIA RPCs ;04/05/2016
+1 ;;1.0;VISTA INTEGRATION ADAPTER;**23**;28-OCT-2020;Build 11
+2 ;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ;DBIA# Supported Reference
+5 ;----- --------------------------------
+6 ;6678 YTQ ALL ANSWERS
+7 ;6673 YTQ CHOICES
+8 ;6674 YTQ GET SCALES
+9 ;6675 YTQ GET REPORT
+10 ;6669 YTQ QUESTALL
+11 ;6671 YTQ RULES
+12 ;6827 YTQ SAVE ADMIN
+13 ;6679 YTQ SCORE ADMIN
+14 ;6680 YTQ SCORE SAVE
+15 ;6670 YTQ SECTION
+16 ;6677 YTQ SET ANSWER ALL
+17 ;6672 YTQ SKIP
+18 ;6668 YTQ TSLIST1
+19 ;6667 YTQ USERQ
+20 ;7260 YTQRRPC SELECT
+21 ;6681 YTQ PN CREATE
+22 ;7067 SDEC CHECKIN
+23 ;7069 SDEC CHECKOUT
+24 ;7073 SDEC CANCKOUT
+25 QUIT
EN ; Post install to add new RPC to VIAB WEB Services option
+1 NEW DIC,DIE,X,Y,DA,DR,VIAOPT,VIARPC,VALUE
+2 NEW X,I,RPCI,RPCIEN
+3 SET X=""
+4 DO EN^DDIOL("Preparing to update VIAB WEB SERVICE option with new RPC's")
+5 ;get the IEN for the option
SET VALUE="VIAB WEB SERVICES OPTION"
SET VIAOPT=$$FIND1^DIC(19,,"X",.VALUE)
+6 IF '$GET(VIAOPT)
DO EN^DDIOL("Could not find the VIAB WEB SERVICE option, Update Aborted!")
QUIT
+7 ;
+8 FOR RPCI=1:1
SET VIARPC=$PIECE($TEXT(RPC+RPCI),";;",2)
if (VIARPC="END")!(VIARPC="")
QUIT
Begin DoDot:1
+9 SET RPCIEN=$ORDER(^XWB(8994,"B",VIARPC,""))
+10 IF RPCIEN=""
DO EN^DDIOL("Could not find the Remote Procedure "_VIARPC_". Not Added!")
QUIT
+11 ;Don't add if already there
+12 if $ORDER(^DIC(19,VIAOPT,"RPC","B",RPCIEN,""))
QUIT
+13 DO EN^DDIOL("Adding "_VIARPC_" remote procedure to the VIAB WEB SERVICES OPTION.")
+14 ;add the RPC to the option
+15 KILL DIC,X,Y,DA
+16 SET DA(1)=VIAOPT
+17 SET DIC="^DIC(19,"_DA(1)_",""RPC"","
+18 SET DIC(0)="XL"
SET X=VIARPC
+19 DO ^DIC
+20 QUIT
End DoDot:1
+21 DO EN^DDIOL("Update complete")
+22 QUIT
RPC ;;
+1 ;;YTQ ALL ANSWERS;; Modified
+2 ;;YTQ CHOICES;; Modified
+3 ;;YTQ GET SCALES;; Modified
+4 ;;YTQ GET REPORT;; Modified
+5 ;;YTQ QUESTALL;; Modified
+6 ;;YTQ RULES;; Modified
+7 ;;YTQ SAVE ADMIN;; New
+8 ;;YTQ SCORE ADMIN;; Modified
+9 ;;YTQ SCORE SAVE;; Modified
+10 ;;YTQ SECTION;; Modified
+11 ;;YTQ SET ANSWER ALL;; Modified
+12 ;;YTQ SKIP;; Modified
+13 ;;YTQ TSLIST1;; Modified
+14 ;;YTQ USERQ;; Modified
+15 ;;YTQRRPC SELECT;; Modified
+16 ;;YTQ PN CREATE;; Modified
+17 ;;SDEC CHECKOUT;;.............................Modified
+18 ;;SDEC CHECKIN;; Modified
+19 ;;SDEC CANCKOUT;; Modified
+20 ;;END;;