Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: VIAA1P3

VIAA1P3.m

Go to the documentation of this file.
  1. VIAA1P3 ;ALB/CR - POST INIT FOR PATCH 3 OF RTLS ;5/4/16 9:55am
  1. ;;1.0;RTLS;**3**;April 22, 2013;Build 20
  1. Q
  1. POST ; Add the TABLE of remote procedure calls to common RTLS menu in VistA.
  1. ; Check the setup for a server and service for RTLS. If they exist,
  1. ; get out and pass the information to the installation log.
  1. ; Otherwise add the web server and service to call Mule in RTLS.
  1. ;
  1. D BMES^XPDUTL(" POST-INIT: Starting Post-Install of Patch VIAA*1.0*3...")
  1. D REGRPC
  1. D BMES^XPDUTL(" ...Menu option 'VIAA01 RTLS RPC MENU' is now set up with new entries.")
  1. ;
  1. D BMES^XPDUTL("")
  1. I $D(^XOB(18.02,"B","VIAA VISTA TRIGGER SERVICE")) D BMES^XPDUTL(" ...found a trigger service, checking for a trigger server....") D POST1 Q
  1. E D BMES^XPDUTL(" Adding a new web service, please wait...")
  1. ;
  1. N CONTEXT,CURRDT,DA,DIC,DLAYGO,FDA
  1. N SVCNAME,SERVER,PORT,SSL,STATUS,TYPE,X,Y
  1. S CURRDT=$$NOW^XLFDT
  1. S DIC(0)="L",DLAYGO=18.02,DIC="^XOB(18.02,"
  1. S SVCNAME="VIAA VISTA TRIGGER SERVICE",TYPE=2
  1. S CONTEXT="esb/assettrax/services/vistatrigger"
  1. S X=SVCNAME
  1. D FILE^DICN
  1. S DA=+Y
  1. L +^XOB(18.02,DA):5 I '$T D BMES^XPDUTL(" ...cannot lock file #18.02 - try later.") Q
  1. S FDA(18.02,DA_",",.02)=TYPE
  1. S FDA(18.02,DA_",",200)=CONTEXT
  1. S FDA(18.02,DA_",",.03)=CURRDT
  1. D UPDATE^DIE("","FDA","ERR")
  1. L -^XOB(18.02,DA)
  1. D CLEAN^DILF
  1. D BMES^XPDUTL(" ...new web service "_SVCNAME_" added.")
  1. D POST1
  1. Q
  1. ;
  1. POST1 ;
  1. I $D(^XOB(18.12,"B","VIAA VISTA TRIGGER SERVER")) D BMES^XPDUTL(" ...found a trigger server - nothing else to do, quitting!") Q
  1. N DEFHTTPT,LOGIN,MULT,SVCPTR,SSL,SSLCFIG
  1. D BMES^XPDUTL(" Adding a new web server, please wait...")
  1. S DIC(0)="L",DLAYGO=18.12,DIC="^XOB(18.12,"
  1. S SERVER="VIAA VISTA TRIGGER SERVER",PORT=443
  1. S SVCPTR=+$O(^XOB(18.02,"B","VIAA VISTA TRIGGER SERVICE","")) ; need pointer for later use
  1. S STATUS=1,SSL=1,LOGIN=1,SSLCFIG="RTLS_CLIENT"
  1. S DEFHTTPT=30 ; default http timeout
  1. S X=SERVER
  1. D FILE^DICN
  1. S DA=+Y
  1. L +^XOB(18.12,DA):5 I '$T D BMES^XPDUTL(" ...cannot lock file #18.12 - try later.") Q
  1. S FDA(18.12,DA_",",.03)=PORT
  1. S FDA(18.12,DA_",",.06)=STATUS
  1. S FDA(18.12,DA_",",.07)=DEFHTTPT
  1. S FDA(18.12,DA_",",1.01)=LOGIN
  1. S FDA(18.12,DA_",",3.01)=SSL
  1. S FDA(18.12,DA_",",3.02)=SSLCFIG
  1. S FDA(18.12,DA_",",3.03)=PORT
  1. D UPDATE^DIE("","FDA","")
  1. D CLEAN^DILF
  1. ; add to multiple 100
  1. S MULT(1,18.121,"+1,"_DA_",",.01)=SVCPTR
  1. S MULT(1,18.121,"+1,"_DA_",",.06)=STATUS
  1. D UPDATE^DIE("","MULT(1)","")
  1. L -^XOB(18.12,DA)
  1. D CLEAN^DILF
  1. D BMES^XPDUTL(" ...new web server "_SERVER_" added.")
  1. D BMES^XPDUTL(" Please note: the web server just added will need a ")
  1. D BMES^XPDUTL(" fully qualified domain name, username, and password.")
  1. D BMES^XPDUTL(" The information will be available via secure communication later on.")
  1. D BMES^XPDUTL(" Post-Install for Patch VIAA*1.0*3 Finished.")
  1. Q
  1. ;
  1. REGRPC ; register RPC
  1. N I,J,X,Y,DIC,FDA,REGRPC,RPCIEN,OPTIEN,VIAAOPT
  1. S VIAAOPT="VIAA01 RTLS RPC MENU"
  1. F I=1:1 S J=$P($E($T(TABLE+I),2,40),";;",2),REGRPC=J D ADD Q:J=""
  1. Q
  1. ;
  1. ADD ;
  1. S DIC(0)="I",X=REGRPC,DIC="^XWB(8994,"
  1. D ^DIC Q:'(Y>0) S RPCIEN=+Y
  1. D CLEAN^DILF
  1. ;
  1. S DIC(0)="I",X=VIAAOPT,DIC="^DIC(19,"
  1. D ^DIC Q:'(Y>0) S OPTIEN=+Y
  1. D CLEAN^DILF
  1. S FDA(19.05,"?+1,"_OPTIEN_",",.01)=RPCIEN
  1. D UPDATE^DIE("","FDA","")
  1. Q
  1. ;
  1. TABLE ; list the RPCs to be added to the menu option
  1. ;;VIAA ENG ASSET MOVE
  1. ;;VIAA ENG GET CATEGORY
  1. ;;VIAA ENG GET DATA
  1. ;;VIAA ENG GET EQUIPMENT
  1. ;;VIAA ENG GET LOCATION
  1. ;;VIAA ENG GET PRIMARY STATION