BPC15E ; IHS/OIT/MJL - ENVIRONMENT CHECK FOR PATIENT CHART ; [ 04/15/2008 10:18 AM ]
;;1.5;BPC;**5**;OCT 04, 2005
;
S $P(LINE,"*",81)=""
S XPDNOQUE="NO QUE" ;NO QUEUING ALLOWED
S XPDABORT=0
I '$G(DUZ) D SORRY("DUZ UNDEFINED OR 0") Q
;
I '$L($G(DUZ(0))) D SORRY("DUZ(0) UNDEFINED OR NULL") Q
;
D HOME^%ZIS,DT^DICRW
S X=$P($G(^VA(200,DUZ,0)),U)
I $G(X)="" W !,$$C^XBFUNC("Who are you????") D SORRY("Unknown User") Q
;
VERSION ;
W !,$$C^XBFUNC("Hello, "_$P(X,",",2)_" "_$P(X,","))
W !!,$$C^XBFUNC("Checking Environment for Install of Version "_$P($T(+2),";",3)_" of "_$P($T(+2),";",4)_".")
;
Q:'$$VERCHK("VA FILEMAN",22)
Q:'$$VERCHK("KERNEL",8)
Q:'$$VERCHK("IHS RPC BROKER",1.5)
Q:'$$VERCHK("BPC PATIENT CHART",1.5)
Q:'$$VERCHK("IHS MENTAL HLTH/SOC SERV",3)
Q:'$$VERCHK("REFERRED CARE INFO SYSTEM",3)
;
OTHER ;
;Other checks
I '$P($G(^AUTTSITE(1,0)),U,22) D SORRY("File 200 PCC Conversion Has Not Been Previously Completed") Q
W !!,"Checking for IHS RPC BROKER Patch..."
I ","_$P($T(+2^BGUXUSRB),"**",2)_","'[",2," D SORRY("IHS RPC BROKER Version 1.5, Patch 2 Is Not Installed") Q
I ","_$P($T(+2^BGULIST2),"**",2)_","'[",3," D SORRY("IHS RPC BROKER Version 1.5, Patch 3 Is Not Installed") Q
I ","_$P($T(+2^BGUTCPL),"**",2)_","'[",4," D SORRY("IHS RPC BROKER Version 1.5, Patch 4 Is Not Installed") Q
W !!,"Checking for BPC PATIENT CHART Patches..."
; The following line is necessary because patch 2 didn't do this check.
I ","_$P($T(+2^BPCBHSC),"**",2)_","'[",1," D SORRY("BPC PATIENT CHART Version 1.5, Patch 1 Is Not Installed") Q
I ","_$P($T(+2^BPCRC3),"**",2)_","'[",2," D SORRY("BPC PATIENT CHART Version 1.5, Patch 2 Is Not Installed") Q
I ","_$P($T(+2^BPCBHDSP),"**",2)_","'[",3," D SORRY("BPC PATIENT CHART Version 1.5, Patch 3 Is Not Installed") Q
I ","_$P($T(+2^BPCBHDSP),"**",2)_","'[",4," D SORRY("BPC PATIENT CHART Version 1.5, Patch 4 Is Not Installed") Q
W !!,"Checking for AMH Patch..."
I ","_$P($T(+2^AMHPCCL1),"**",2)_","'[",9," D SORRY("Mental Health Version 3.0, Patch 9 Is Not Installed") Q
;
ENVOK ; If this is just an environ check, end here.
W !!,$$C^XBFUNC("ENVIRONMENT OK.")
;
; The following line prevents the "Disable Options..." and "Move
; Routines..." questions from being asked during the install.
I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
;
;
;VERIFY BACKUPS HAVE BEEN DONE
;W !!
;S DIR(0)="Y"
;S DIR("B")="NO"
;S DIR("A")="Has a SUCCESSFUL system backup been performed??"
;D ^DIR
;I $D(DIRUT)!($G(Y)=0) S XPDABORT=1 S XPX="BACKUP" D SORRY Q
;S ^TMP("BPCPRE",$J,"BACKUPS CONFIRMED BY "_DUZ)=$H
;
Q
;
VERCHK(XPXPKG,XVRMIN) ;
S X=$$VERSION^XPDUTL(XPXPKG)
W !!,$$C^XBFUNC("Need at least "_XPXPKG_" "_XVRMIN_"....."_XPXPKG_" "_$S(X'="":X,1:"Is Not")_" Present")
I X<XVRMIN D SORRY(XPXPKG_" "_XVRMIN_" Is Not Installed") Q 0
Q 1
;
SORRY(XPX) ;
K DIFQ
S XPDABORT=1,XPDBLD=$O(^XTMP("XPDI",XPDA,"BLD",0))
W !,$$C^XBFUNC($P(^XTMP("XPDI",XPDST,"BLD",XPDBLD,0),U,1)_" "_$P(^XTMP("XPDI",XPDST,"BLD",XPDBLD,0),U,2)_" Cannot Be Installed!")
W !,$$C^XBFUNC("Reason: "_XPX_".")
W *7,!!!,$$C^XBFUNC("Sorry....something is wrong with your environment")
W !,$$C^XBFUNC("Aborting "_XPDNM_" install!")
W !,$$C^XBFUNC("Correct error and reinstall otherwise")
W !,$$C^XBFUNC("please print/capture this screen and notify")
W !,$$C^XBFUNC("the Help Desk")
W !!,LINE
D BMES^XPDUTL("Sorry....something is wrong with your environment")
D BMES^XPDUTL("Enviroment ERROR "_$G(XPX))
D BMES^XPDUTL("Aborting "_XPDNM_" install!")
D BMES^XPDUTL("Correct error and reinstall otherwise")
D BMES^XPDUTL("please print/capture this screen and notify")
D BMES^XPDUTL("the Help Desk")
Q
;
BPC15E ; IHS/OIT/MJL - ENVIRONMENT CHECK FOR PATIENT CHART ; [ 04/15/2008 10:18 AM ]
+1 ;;1.5;BPC;**5**;OCT 04, 2005
+2 ;
+3 SET $PIECE(LINE,"*",81)=""
+4 ;NO QUEUING ALLOWED
SET XPDNOQUE="NO QUE"
+5 SET XPDABORT=0
+6 IF '$GET(DUZ)
DO SORRY("DUZ UNDEFINED OR 0")
QUIT
+7 ;
+8 IF '$LENGTH($GET(DUZ(0)))
DO SORRY("DUZ(0) UNDEFINED OR NULL")
QUIT
+9 ;
+10 DO HOME^%ZIS
DO DT^DICRW
+11 SET X=$PIECE($GET(^VA(200,DUZ,0)),U)
+12 IF $GET(X)=""
WRITE !,$$C^XBFUNC("Who are you????")
DO SORRY("Unknown User")
QUIT
+13 ;
VERSION ;
+1 WRITE !,$$C^XBFUNC("Hello, "_$PIECE(X,",",2)_" "_$PIECE(X,","))
+2 WRITE !!,$$C^XBFUNC("Checking Environment for Install of Version "_$PIECE($TEXT(+2),";",3)_" of "_$PIECE($TEXT(+2),";",4)_".")
+3 ;
+4 IF '$$VERCHK("VA FILEMAN",22)
QUIT
+5 IF '$$VERCHK("KERNEL",8)
QUIT
+6 IF '$$VERCHK("IHS RPC BROKER",1.5)
QUIT
+7 IF '$$VERCHK("BPC PATIENT CHART",1.5)
QUIT
+8 IF '$$VERCHK("IHS MENTAL HLTH/SOC SERV",3)
QUIT
+9 IF '$$VERCHK("REFERRED CARE INFO SYSTEM",3)
QUIT
+10 ;
OTHER ;
+1 ;Other checks
+2 IF '$PIECE($GET(^AUTTSITE(1,0)),U,22)
DO SORRY("File 200 PCC Conversion Has Not Been Previously Completed")
QUIT
+3 WRITE !!,"Checking for IHS RPC BROKER Patch..."
+4 IF ","_$PIECE($TEXT(+2^BGUXUSRB),"**",2)_","'[",2,"
DO SORRY("IHS RPC BROKER Version 1.5, Patch 2 Is Not Installed")
QUIT
+5 IF ","_$PIECE($TEXT(+2^BGULIST2),"**",2)_","'[",3,"
DO SORRY("IHS RPC BROKER Version 1.5, Patch 3 Is Not Installed")
QUIT
+6 IF ","_$PIECE($TEXT(+2^BGUTCPL),"**",2)_","'[",4,"
DO SORRY("IHS RPC BROKER Version 1.5, Patch 4 Is Not Installed")
QUIT
+7 WRITE !!,"Checking for BPC PATIENT CHART Patches..."
+8 ; The following line is necessary because patch 2 didn't do this check.
+9 IF ","_$PIECE($TEXT(+2^BPCBHSC),"**",2)_","'[",1,"
DO SORRY("BPC PATIENT CHART Version 1.5, Patch 1 Is Not Installed")
QUIT
+10 IF ","_$PIECE($TEXT(+2^BPCRC3),"**",2)_","'[",2,"
DO SORRY("BPC PATIENT CHART Version 1.5, Patch 2 Is Not Installed")
QUIT
+11 IF ","_$PIECE($TEXT(+2^BPCBHDSP),"**",2)_","'[",3,"
DO SORRY("BPC PATIENT CHART Version 1.5, Patch 3 Is Not Installed")
QUIT
+12 IF ","_$PIECE($TEXT(+2^BPCBHDSP),"**",2)_","'[",4,"
DO SORRY("BPC PATIENT CHART Version 1.5, Patch 4 Is Not Installed")
QUIT
+13 WRITE !!,"Checking for AMH Patch..."
+14 IF ","_$PIECE($TEXT(+2^AMHPCCL1),"**",2)_","'[",9,"
DO SORRY("Mental Health Version 3.0, Patch 9 Is Not Installed")
QUIT
+15 ;
ENVOK ; If this is just an environ check, end here.
+1 WRITE !!,$$C^XBFUNC("ENVIRONMENT OK.")
+2 ;
+3 ; The following line prevents the "Disable Options..." and "Move
+4 ; Routines..." questions from being asked during the install.
+5 IF $GET(XPDENV)=1
SET (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
+6 ;
+7 ;
+8 ;VERIFY BACKUPS HAVE BEEN DONE
+9 ;W !!
+10 ;S DIR(0)="Y"
+11 ;S DIR("B")="NO"
+12 ;S DIR("A")="Has a SUCCESSFUL system backup been performed??"
+13 ;D ^DIR
+14 ;I $D(DIRUT)!($G(Y)=0) S XPDABORT=1 S XPX="BACKUP" D SORRY Q
+15 ;S ^TMP("BPCPRE",$J,"BACKUPS CONFIRMED BY "_DUZ)=$H
+16 ;
+17 QUIT
+18 ;
VERCHK(XPXPKG,XVRMIN) ;
+1 SET X=$$VERSION^XPDUTL(XPXPKG)
+2 WRITE !!,$$C^XBFUNC("Need at least "_XPXPKG_" "_XVRMIN_"....."_XPXPKG_" "_$SELECT(X'="":X,1:"Is Not")_" Present")
+3 IF X<XVRMIN
DO SORRY(XPXPKG_" "_XVRMIN_" Is Not Installed")
QUIT 0
+4 QUIT 1
+5 ;
SORRY(XPX) ;
+1 KILL DIFQ
+2 SET XPDABORT=1
SET XPDBLD=$ORDER(^XTMP("XPDI",XPDA,"BLD",0))
+3 WRITE !,$$C^XBFUNC($PIECE(^XTMP("XPDI",XPDST,"BLD",XPDBLD,0),U,1)_" "_$PIECE(^XTMP("XPDI",XPDST,"BLD",XPDBLD,0),U,2)_" Cannot Be Installed!")
+4 WRITE !,$$C^XBFUNC("Reason: "_XPX_".")
+5 WRITE *7,!!!,$$C^XBFUNC("Sorry....something is wrong with your environment")
+6 WRITE !,$$C^XBFUNC("Aborting "_XPDNM_" install!")
+7 WRITE !,$$C^XBFUNC("Correct error and reinstall otherwise")
+8 WRITE !,$$C^XBFUNC("please print/capture this screen and notify")
+9 WRITE !,$$C^XBFUNC("the Help Desk")
+10 WRITE !!,LINE
+11 DO BMES^XPDUTL("Sorry....something is wrong with your environment")
+12 DO BMES^XPDUTL("Enviroment ERROR "_$GET(XPX))
+13 DO BMES^XPDUTL("Aborting "_XPDNM_" install!")
+14 DO BMES^XPDUTL("Correct error and reinstall otherwise")
+15 DO BMES^XPDUTL("please print/capture this screen and notify")
+16 DO BMES^XPDUTL("the Help Desk")
+17 QUIT
+18 ;