- BSTS2P02 ;GDIT/HS/BEE-Version 2.0 Patch 2 Post (and Pre) Install ; 19 Nov 2012 9:41 AM
- ;;2.0;IHS STANDARD TERMINOLOGY;**2**;Dec 01, 2016;Build 1
- ;
- ENV ;EP - Environmental Checking Routine
- ;
- N VERSION,EXEC,BMWDT
- ;
- ;Check for BSTS v2.0 Patch 1
- I '$$INSTALLD("BSTS*2.0*1") D BMES^XPDUTL("Version 2.0 Patch 1 of BSTS is required!") S XPDQUIT=2 Q
- ;
- ;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 an Description Id fix compile isn't running
- L +^XTMP("BSTSCFIX"):0 E D BMES^XPDUTL("A Description Id Population Utility Process is Running. Please Try later") S XPDQUIT=2 Q
- L -^XTMP("BSTSCFIX")
- ;
- ;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")
- ;
- Q
- ;
- EN ;EP
- ;
- ;Make a log entry
- D LOG^BSTSAPIL("INST","","PATCH","BSTS*2.0*2")
- ;
- ;Unlock installation entry
- L -^TMP("BSTSINSTALL")
- ;
- ;Kick off update to pull down new RxNorm Information
- D QUEUE^BSTSVOFL("S1552") ;Put RxNorm on the queue
- D QUEUE^BSTSVOFL(32771) ;Drug ingredients
- D QUEUE^BSTSVOFL(32773) ;Allergies
- D JOBNOW^BSTSVOFL ;Kick off now
- ;
- Q
- ;
- PRE ;Pre-Install Front End
- ;
- ;Perform Lock so only one install can run and DTS calls will be switched to local
- L +^TMP("BSTSINSTALL"):3 E D BMES^XPDUTL("A BSTS Install is Already Running - Aborting Installation") S XPDABORT=1 Q
- ;
- N DIU
- ;
- ;Clear out existing transport global and new conversion file
- S DIU="^BSTSCLS(",DIU(0)="DST" D EN^DIU2
- ;
- Q
- ;
- INSTALLD(BSTSSTAL) ;EP - Determine if patch BSTSSTAL was installed, where
- ; BSTSSTAL is the name of the INSTALL. E.g "BSTS*1.0*1".
- ;
- NEW DIC,X,Y,D
- S X=$P(BSTSSTAL,"*",1)
- S DIC="^DIC(9.4,",DIC(0)="FM",D="C"
- D IX^DIC
- I Y<1 Q 0
- S DIC=DIC_+Y_",22,",X=$P(BSTSSTAL,"*",2)
- D ^DIC
- I Y<1 Q 0
- S DIC=DIC_+Y_",""PAH"",",X=$P(BSTSSTAL,"*",3)
- D ^DIC
- Q $S(Y<1:0,1:1)
- BSTS2P02 ;GDIT/HS/BEE-Version 2.0 Patch 2 Post (and Pre) Install ; 19 Nov 2012 9:41 AM
- +1 ;;2.0;IHS STANDARD TERMINOLOGY;**2**;Dec 01, 2016;Build 1
- +2 ;
- ENV ;EP - Environmental Checking Routine
- +1 ;
- +2 NEW VERSION,EXEC,BMWDT
- +3 ;
- +4 ;Check for BSTS v2.0 Patch 1
- +5 IF '$$INSTALLD("BSTS*2.0*1")
- DO BMES^XPDUTL("Version 2.0 Patch 1 of BSTS is required!")
- SET XPDQUIT=2
- QUIT
- +6 ;
- +7 ;Make sure a refresh is not running already
- +8 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
- +9 LOCK -^BSTS(9002318.1,0)
- +10 ;
- +11 ;Make sure an Description Id fix compile isn't running
- +12 LOCK +^XTMP("BSTSCFIX"):0
- IF '$TEST
- DO BMES^XPDUTL("A Description Id Population Utility Process is Running. Please Try later")
- SET XPDQUIT=2
- QUIT
- +13 LOCK -^XTMP("BSTSCFIX")
- +14 ;
- +15 ;Make sure another install isn't running
- +16 LOCK +^TMP("BSTSINSTALL"):3
- IF '$TEST
- DO BMES^XPDUTL("A BSTS Install is Already Running")
- SET XPDQUIT=2
- QUIT
- +17 LOCK -^TMP("BSTSINSTALL")
- +18 ;
- +19 QUIT
- +20 ;
- EN ;EP
- +1 ;
- +2 ;Make a log entry
- +3 DO LOG^BSTSAPIL("INST","","PATCH","BSTS*2.0*2")
- +4 ;
- +5 ;Unlock installation entry
- +6 LOCK -^TMP("BSTSINSTALL")
- +7 ;
- +8 ;Kick off update to pull down new RxNorm Information
- +9 ;Put RxNorm on the queue
- DO QUEUE^BSTSVOFL("S1552")
- +10 ;Drug ingredients
- DO QUEUE^BSTSVOFL(32771)
- +11 ;Allergies
- DO QUEUE^BSTSVOFL(32773)
- +12 ;Kick off now
- DO JOBNOW^BSTSVOFL
- +13 ;
- +14 QUIT
- +15 ;
- PRE ;Pre-Install Front End
- +1 ;
- +2 ;Perform Lock so only one install can run and DTS calls will be switched to local
- +3 LOCK +^TMP("BSTSINSTALL"):3
- IF '$TEST
- DO BMES^XPDUTL("A BSTS Install is Already Running - Aborting Installation")
- SET XPDABORT=1
- QUIT
- +4 ;
- +5 NEW DIU
- +6 ;
- +7 ;Clear out existing transport global and new conversion file
- +8 SET DIU="^BSTSCLS("
- SET DIU(0)="DST"
- DO EN^DIU2
- +9 ;
- +10 QUIT
- +11 ;
- INSTALLD(BSTSSTAL) ;EP - Determine if patch BSTSSTAL was installed, where
- +1 ; BSTSSTAL is the name of the INSTALL. E.g "BSTS*1.0*1".
- +2 ;
- +3 NEW DIC,X,Y,D
- +4 SET X=$PIECE(BSTSSTAL,"*",1)
- +5 SET DIC="^DIC(9.4,"
- SET DIC(0)="FM"
- SET D="C"
- +6 DO IX^DIC
- +7 IF Y<1
- QUIT 0
- +8 SET DIC=DIC_+Y_",22,"
- SET X=$PIECE(BSTSSTAL,"*",2)
- +9 DO ^DIC
- +10 IF Y<1
- QUIT 0
- +11 SET DIC=DIC_+Y_",""PAH"","
- SET X=$PIECE(BSTSSTAL,"*",3)
- +12 DO ^DIC
- +13 QUIT $SELECT(Y<1:0,1:1)