BSTS2PRE ;GDIT/HS/BEE-Version 2.0 Environmental Checking and Pre-Install ; 19 Nov 2012 9:41 AM
;;2.0;IHS STANDARD TERMINOLOGY;;Dec 01, 2016;Build 62
;
ENV ;EP - Environmental Checking Routine
;
;Make sure a refresh is not running already
L +^BSTS(9002318.1,0):0 E D BMES^XPDUTL("A Local BSTS Cache Refresh is Already Running. Please Try Later") S XPDQUIT=2 Q
L -^BSTS(9002318.1,0)
;
;Make sure another install isn't running
L +^TMP("BSTSINSTALL"):3 E D BMES^XPDUTL("A BSTS Install is Already Running") S XPDQUIT=2 Q
L -^TMP("BSTSINSTALL")
;
;Check for AICD 4.0
I +$$VERSION^XPDUTL("AICD")<4 D BMES^XPDUTL("Version 4.0 of AICD is required!") S XPDQUIT=2 Q
;
NEW SSLNAME,SSLFND,SYSXREF,SYSGL,ROLES,EXEC
;
; Verify that installer has proper roles
S EXEC="S ROLES=$roles" X EXEC
S ROLES=","_ROLES_",",U="^"
I ROLES'[",%All," D BMES^XPDUTL("Your Ensemble account MUST have ""%All"" role to proceed") H 8 S XPDQUIT=2 Q
;
;Look for an SSL server
S SYSXREF="^[""%SYS""]SYS",SYSGL=$NA(@SYSXREF)
S (SSLFND,SSLNAME)="" F S SSLNAME=$O(@SYSGL@("Security","SSLConfigsD",SSLNAME)) Q:SSLNAME="" D Q:SSLFND]""
. NEW UPNAME
. S UPNAME=$$UP^XLFSTR(SSLNAME)
. I UPNAME["SNOMED" S SSLFND=SSLNAME
I SSLFND="" D BMES^XPDUTL("**Warning - No SNOMEDServer SSL/TLS configuration found**") D BMES^XPDUTL("One will be set up during the installation process") H 8
;
Q
;
EN ;Pre-Install Front End
;
NEW DIU,WSIEN
;
;Make sure a refresh is not running already
L +^BSTS(9002318.1,0):0 E D BMES^XPDUTL("A Local BSTS Cache Refresh is Already Running. Please Try Later") S XPDQUIT=2 Q
L -^BSTS(9002318.1,0)
;
;Perform Lock so only one install can run and DTS calls will be switched to local
L +^TMP("BSTSINSTALL"):3 E W !!,"A BSTS Install is Already Running - Aborting Installation" H 10 S XPDABORT=1 Q
;
;Clear existing transport global
S DIU="^BSTSCLS(",DIU(0)="DST" D EN^DIU2
;
;Clear out the SNOMED conversion global
S DIU="^BSTS(9002318.6,",DIU(0)="DST" D EN^DIU2
;
Q
BSTS2PRE ;GDIT/HS/BEE-Version 2.0 Environmental Checking and Pre-Install ; 19 Nov 2012 9:41 AM
+1 ;;2.0;IHS STANDARD TERMINOLOGY;;Dec 01, 2016;Build 62
+2 ;
ENV ;EP - Environmental Checking Routine
+1 ;
+2 ;Make sure a refresh is not running already
+3 LOCK +^BSTS(9002318.1,0):0
IF '$TEST
DO BMES^XPDUTL("A Local BSTS Cache Refresh is Already Running. Please Try Later")
SET XPDQUIT=2
QUIT
+4 LOCK -^BSTS(9002318.1,0)
+5 ;
+6 ;Make sure another install isn't running
+7 LOCK +^TMP("BSTSINSTALL"):3
IF '$TEST
DO BMES^XPDUTL("A BSTS Install is Already Running")
SET XPDQUIT=2
QUIT
+8 LOCK -^TMP("BSTSINSTALL")
+9 ;
+10 ;Check for AICD 4.0
+11 IF +$$VERSION^XPDUTL("AICD")<4
DO BMES^XPDUTL("Version 4.0 of AICD is required!")
SET XPDQUIT=2
QUIT
+12 ;
+13 NEW SSLNAME,SSLFND,SYSXREF,SYSGL,ROLES,EXEC
+14 ;
+15 ; Verify that installer has proper roles
+16 SET EXEC="S ROLES=$roles"
XECUTE EXEC
+17 SET ROLES=","_ROLES_","
SET U="^"
+18 IF ROLES'[",%All,"
DO BMES^XPDUTL("Your Ensemble account MUST have ""%All"" role to proceed")
HANG 8
SET XPDQUIT=2
QUIT
+19 ;
+20 ;Look for an SSL server
+21 SET SYSXREF="^[""%SYS""]SYS"
SET SYSGL=$NAME(@SYSXREF)
+22 SET (SSLFND,SSLNAME)=""
FOR
SET SSLNAME=$ORDER(@SYSGL@("Security","SSLConfigsD",SSLNAME))
IF SSLNAME=""
QUIT
Begin DoDot:1
+23 NEW UPNAME
+24 SET UPNAME=$$UP^XLFSTR(SSLNAME)
+25 IF UPNAME["SNOMED"
SET SSLFND=SSLNAME
End DoDot:1
IF SSLFND]""
QUIT
+26 IF SSLFND=""
DO BMES^XPDUTL("**Warning - No SNOMEDServer SSL/TLS configuration found**")
DO BMES^XPDUTL("One will be set up during the installation process")
HANG 8
+27 ;
+28 QUIT
+29 ;
EN ;Pre-Install Front End
+1 ;
+2 NEW DIU,WSIEN
+3 ;
+4 ;Make sure a refresh is not running already
+5 LOCK +^BSTS(9002318.1,0):0
IF '$TEST
DO BMES^XPDUTL("A Local BSTS Cache Refresh is Already Running. Please Try Later")
SET XPDQUIT=2
QUIT
+6 LOCK -^BSTS(9002318.1,0)
+7 ;
+8 ;Perform Lock so only one install can run and DTS calls will be switched to local
+9 LOCK +^TMP("BSTSINSTALL"):3
IF '$TEST
WRITE !!,"A BSTS Install is Already Running - Aborting Installation"
HANG 10
SET XPDABORT=1
QUIT
+10 ;
+11 ;Clear existing transport global
+12 SET DIU="^BSTSCLS("
SET DIU(0)="DST"
DO EN^DIU2
+13 ;
+14 ;Clear out the SNOMED conversion global
+15 SET DIU="^BSTS(9002318.6,"
SET DIU(0)="DST"
DO EN^DIU2
+16 ;
+17 QUIT