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

BSTS1POS.m

Go to the documentation of this file.
  1. BSTS1POS ;GDIT/HS/BEE-Version 1.0 Post (and Pre) Install ; 19 Nov 2012 9:41 AM
  1. ;;1.0;IHS STANDARD TERMINOLOGY;;Sep 10, 2014;Build 101
  1. ;
  1. ENV ;EP - Environmental Checking Routine
  1. ; Run pre-install checks
  1. N VERSION,EXEC,BMWDT
  1. ;
  1. ;Check for Ensemble version greater or equal to 2012
  1. S VERSION=$$VERSION^%ZOSV
  1. I VERSION<2012 D BMES^XPDUTL("Ensemble 2012 or later is required!") S XPDQUIT=2 Q
  1. ;
  1. ;Make sure a refresh is not running already
  1. 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
  1. L -^BSTS(9002318.1,0)
  1. ;
  1. ;Make sure an ICD9 to SNOMED compile isn't running
  1. L +^TMP("BSTSICD2SMD"):0 E D BMES^XPDUTL("An ICD9 to SNOMED Background Compile is Running. Please Try later") S XPDQUIT=2 Q
  1. L -^TMP("BSTSICD2SMD")
  1. ;
  1. ;Make sure another install isn't running
  1. L +^TMP("BSTSINSTALL"):3 E D BMES^XPDUTL("A BSTS Install is Already Running") S XPDQUIT=2 Q
  1. L -^TMP("BSTSINSTALL")
  1. ;
  1. Q
  1. ;
  1. EN ;EP
  1. NEW DA,DIC,X,Y,ZTRTN,ZTDESC,ZTIO,ZTSAVE,DLAYGO,NMID,NMIEN
  1. S DIC(0)="LNZ",DIC="^BSTS(9002318,",DLAYGO=9002318,X=$P($G(^AUTTSITE(1,0)),U,1)
  1. I X="" S X=$O(^BGPSITE(0))
  1. I X'="" S X=$P(^DIC(4,X,0),U,1)
  1. D ^DIC
  1. ;
  1. ;Load the classes
  1. ;
  1. N TRIEN,EXEC,ERR
  1. ;
  1. ;For each build, set this to the 9002318.5 entry to load
  1. S TRIEN=1
  1. ;
  1. ;Delete existing BSTS Classes
  1. S EXEC="DO $SYSTEM.OBJ.DeletePackage(""BSTS"")" X EXEC
  1. ;
  1. ; Import BSTS classes
  1. K ERR
  1. I $G(TRIEN)'="" D IMPORT^BSTSCLAS(TRIEN,.ERR)
  1. I $G(ERR) Q
  1. ;
  1. ;Update LAST SUBSET CHECK now so process won't keep getting called
  1. D
  1. . NEW BSTS,ERROR,NMIEN
  1. . S NMIEN=$O(^BSTS(9002318.1,"B",36,"")) Q:NMIEN=""
  1. . S BSTS(9002318.1,NMIEN_",",.06)=DT
  1. . D FILE^DIE("","BSTS","ERROR")
  1. ;
  1. ;Unlock installation entry
  1. L -^TMP("BSTSINSTALL")
  1. ;
  1. Q
  1. ;
  1. PRE ;Pre-Install Front End
  1. ;
  1. ;Perform Lock so only one install can run and DTS calls will be switched to local
  1. L +^TMP("BSTSINSTALL"):3 E D BMES^XPDUTL("A BSTS Install is Already Running - Aborting Installation") S XPDABORT=1 Q
  1. ;
  1. N DIU
  1. ;
  1. ;Clear out existing entries
  1. S DIU="^BSTS(9002318.1,",DIU(0)="DST" D EN^DIU2
  1. S DIU="^BSTS(9002318.3,",DIU(0)="DST" D EN^DIU2
  1. S DIU="^BSTS(9002318.4,",DIU(0)="DST" D EN^DIU2
  1. S DIU="^BSTSCLS(",DIU(0)="DST" D EN^DIU2
  1. ;
  1. Q