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

DIZ22ENV.m

Go to the documentation of this file.
DIZ22ENV ;IHS/OIRM/DSD/AEF - ENVIRONMENT CHECK ROUTINE [ 04/02/2003  8:23 AM ]
 ;;22.0;VA FileMan;**1001**;APR 1, 2003
 ;
EN ;----- MAIN ENTRY POINT
 ;
 D ^XBKVAR
 D NOQUE
 D VERSION
 D PKG
 D DUPES
 D OK
 Q
NOQUE ;----- PREVENT QUEUEING OF INSTALL
 ;
 S XPDNOQUE=1
 Q
DUPES ;----- CHECK FOR DUPLICATE ENTRIES IN THE PACKAGE FILE
 ;
 N PKG,X
 ;
 S PKG("VA FILEMAN")=0
 S PKG("KERNEL")=0
 S PKG("TOOLKIT")=0
 S PKG("HEALTH LEVEL SEVEN")=0
 S PKG("CAPACITY MANAGEMENT - RUM")=0
 S PKG("RPC BROKER")=0
 S PKG("NEW PERSON")=0
 ;
 S PKG=""
 F  S PKG=$O(PKG(PKG)) Q:PKG']""  D
 . S X=0 
 . F  S X=$O(^DIC(9.4,"B",PKG,X)) Q:'X  D
 . . S PKG(PKG)=PKG(PKG)+1
 ;
 S PKG=""
 F  S PKG=$O(PKG(PKG)) Q:PKG']""  D
 . I PKG(PKG)>1 D
 . . S XPDQUIT=1
 . . S X="IT APPEARS THAT YOU HAVE DUPLICATE "_PKG_" PACKAGE ENTRIES"
 . . D BMES^XPDUTL(X)
 I $G(XPDQUIT) D
 . D BMES^XPDUTL("YOU MUST CLEAN UP THE PACKAGE FILE BEFORE CONTINUING")
 Q
VERSION ;
 ;----- CHECK VERSION NUMBER
 ;
 ;I "21.0"'=$$VERSION^XPDUTL("VA FILEMAN") D
 . S XPDQUIT=1
 . D BMES^XPDUTL("CURRENT VERSION IS NOT 21.0, CANNOT CONTINUE WITH INSTALL")
 I 8'=+$$VERSION^XPDUTL("KERNEL") D
 . S XPDQUIT=1
 . D BMES^XPDUTL("CURRENT VERSION OF KERNEL IS NOT 8.0, CANNOT CONTINUE WITH INSTALL")
 I "7.3"'=$$VERSION^XPDUTL("TOOLKIT") D
 . S XPDQUIT=1
 . D BMES^XPDUTL("CURRENT VERSION OF TOOLKIT IS NOT 7.3, CANNOT CONTINUE WITH INSTALL")
 I "1.6"'=$$VERSION^XPDUTL("HEALTH LEVEL SEVEN") D
 . S XPDQUIT=1
 . D BMES^XPDUTL("CURRENT VERSION OF HL7 IS NOT 1.6, CANNOT CONTINUE WITH INSTALL")
 Q
PKG ;----- MAKE SURE THERE ARE PKG ENTRY/VERSION FOR SAGG,RUM,RPC,A4A7
 ;
 N DA,DIE,DIC,DLAYGO,DR,DTOUT,DUOUT,PKG,VER,X,Y
 ;
 S PKG("SAGG PROJECT")=1.8
 S PKG("CAPACITY MANAGEMENT - RUM")="1.0"
 S PKG("RPC BROKER")=1.1
 S PKG("NEW PERSON")=1.01
 ;
 S PKG=""
 F  S PKG=$O(PKG(PKG)) Q:PKG']""  D
 . S VER=PKG(PKG)
 . S DIC="^DIC(9.4,"
 . S DIC(0)="L"
 . S DLAYGO=9.4
 . S X=PKG
 . D ^DIC
 . Q:Y'>0!($D(DTOUT))!($D(DUOUT))
 . S DA=+Y
 . S DIE=DIC
 . S DR="13///^S X=VER"
 . D ^DIE
 Q
OK ;----- OK TO INSTALL?
 ;
 I $G(XPDQUIT) D
 . D BMES^XPDUTL("INSTALL ABORTED!")
 I '$G(XPDQUIT) D
 . D BMES^XPDUTL("EVERYTHING LOOKS OK")
 Q