BLRAPRE ; IHS/HQW/TPF - ENVIRONMENT CHECK FOR ELECTRONIC SIGNATURE ; [ 05/16/02 7:35 AM ]
;;5.2;LR;**1013**;JAN 07, 2002
;
S $P(LINE,"*",81)=""
S XPDNOQUE="NO QUE" ;NO QUEUING ALLOWED
S XPDABORT=0
I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." D SORRY Q
;
I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." D SORRY 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 Q
W !,$$C^XBFUNC("Hello, "_$P(X,",",2)_" "_$P(X,","))
W !!,$$C^XBFUNC("Checking Environment for Patch "_$P($T(+2),";",5)_" of Version "_$P($T(+2),";",3)_" of "_$P($T(+2),";",4)_".")
;
S X=$G(^DD("VERSION"))
W !!,$$C^XBFUNC("Need at least FileMan 21.....FileMan "_X_" Present")
I X<21 D SORRY Q
;
S X=$G(^DIC(9.4,$O(^DIC(9.4,"C","XU",0)),"VERSION"))
W !!,$$C^XBFUNC("Need at least Kernel 8.0.....Kernel "_X_" Present")
I X<8.0 D SORRY Q
;
VERSION ;
;CHECK FOR PREVIOUS PATCH NEEDED
S %=$D(^XPD("9.7","B","LR*5.2*1012"))
I '% D Q
. W !,$$C^XBFUNC("Patch 1013 of version 5.2 of the RPMS Laboratory Package Cannot Be Installed Unless")
. W !,$$C^XBFUNC("Patch 1012 of version 5.2 Has not Been Previously Installed.")
. D SORRY
. I $$DIR^XBDIR("E","Press RETURN...")
;
;GET INSTALL STATUS
S %=$O(^XPD("9.7","B","LR*5.2*1012",""))
S LRSTATUS=$P($G(^XPD(9.7,%,0)),U,9)
I LRSTATUS'=3 D Q ;IF INSTALL STATUS NOT COMPLETE QUIT
.W !,$$C^XBFUNC("Install of Patch 1012 not complete!")
.D SORRY
.I $$DIR^XBDIR("E","Press RETURN...")
;
W !!!,$$C^XBFUNC("Patch 1012 of version LR 5.2 Has Been Previously Installed...... OK to continue")
;
;
ENVOK ; If this is just an environ check, end here.
W !!,$$C^XBFUNC("ENVIRONMENT OK.")
;
;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 Q
S ^TMP("BLRAPRE","BACKUPS CONFIRMED BY "_DUZ)=$H
;
Q
SORRY ;
K DIFQ
S XPDABORT=1
W *7,!!!,$$C^XBFUNC("Sorry....something is wrong with your enviroment")
W !,$$C^XBFUNC("Aborting Electronic Signature Plug-in install!")
W !,$$C^XBFUNC("Please print/capture this screen and notify")
;W !,$$C^XBFUNC("the Help Desk")
W !!,LINE
Q
;
BLRAPRE ; IHS/HQW/TPF - ENVIRONMENT CHECK FOR ELECTRONIC SIGNATURE ; [ 05/16/02 7:35 AM ]
+1 ;;5.2;LR;**1013**;JAN 07, 2002
+2 ;
+3 SET $PIECE(LINE,"*",81)=""
+4 ;NO QUEUING ALLOWED
SET XPDNOQUE="NO QUE"
+5 SET XPDABORT=0
+6 IF '$GET(DUZ)
WRITE !,"DUZ UNDEFINED OR 0."
DO SORRY
QUIT
+7 ;
+8 IF '$LENGTH($GET(DUZ(0)))
WRITE !,"DUZ(0) UNDEFINED OR NULL."
DO SORRY
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
QUIT
+13 WRITE !,$$C^XBFUNC("Hello, "_$PIECE(X,",",2)_" "_$PIECE(X,","))
+14 WRITE !!,$$C^XBFUNC("Checking Environment for Patch "_$PIECE($TEXT(+2),";",5)_" of Version "_$PIECE($TEXT(+2),";",3)_" of "_$PIECE($TEXT(+2),";",4)_".")
+15 ;
+16 SET X=$GET(^DD("VERSION"))
+17 WRITE !!,$$C^XBFUNC("Need at least FileMan 21.....FileMan "_X_" Present")
+18 IF X<21
DO SORRY
QUIT
+19 ;
+20 SET X=$GET(^DIC(9.4,$ORDER(^DIC(9.4,"C","XU",0)),"VERSION"))
+21 WRITE !!,$$C^XBFUNC("Need at least Kernel 8.0.....Kernel "_X_" Present")
+22 IF X<8.0
DO SORRY
QUIT
+23 ;
VERSION ;
+1 ;CHECK FOR PREVIOUS PATCH NEEDED
+2 SET %=$DATA(^XPD("9.7","B","LR*5.2*1012"))
+3 IF '%
Begin DoDot:1
+4 WRITE !,$$C^XBFUNC("Patch 1013 of version 5.2 of the RPMS Laboratory Package Cannot Be Installed Unless")
+5 WRITE !,$$C^XBFUNC("Patch 1012 of version 5.2 Has not Been Previously Installed.")
+6 DO SORRY
+7 IF $$DIR^XBDIR("E","Press RETURN...")
End DoDot:1
QUIT
+8 ;
+9 ;GET INSTALL STATUS
+10 SET %=$ORDER(^XPD("9.7","B","LR*5.2*1012",""))
+11 SET LRSTATUS=$PIECE($GET(^XPD(9.7,%,0)),U,9)
+12 ;IF INSTALL STATUS NOT COMPLETE QUIT
IF LRSTATUS'=3
Begin DoDot:1
+13 WRITE !,$$C^XBFUNC("Install of Patch 1012 not complete!")
+14 DO SORRY
+15 IF $$DIR^XBDIR("E","Press RETURN...")
End DoDot:1
QUIT
+16 ;
+17 WRITE !!!,$$C^XBFUNC("Patch 1012 of version LR 5.2 Has Been Previously Installed...... OK to continue")
+18 ;
+19 ;
ENVOK ; If this is just an environ check, end here.
+1 WRITE !!,$$C^XBFUNC("ENVIRONMENT OK.")
+2 ;
+3 ;VERIFY BACKUPS HAVE BEEN DONE
+4 WRITE !!
+5 SET DIR(0)="Y"
+6 SET DIR("B")="NO"
+7 SET DIR("A")="Has a SUCCESSFUL system backup been performed??"
+8 DO ^DIR
+9 IF $DATA(DIRUT)!($GET(Y)=0)
SET XPDABORT=1
QUIT
+10 SET ^TMP("BLRAPRE","BACKUPS CONFIRMED BY "_DUZ)=$HOROLOG
+11 ;
+12 QUIT
SORRY ;
+1 KILL DIFQ
+2 SET XPDABORT=1
+3 WRITE *7,!!!,$$C^XBFUNC("Sorry....something is wrong with your enviroment")
+4 WRITE !,$$C^XBFUNC("Aborting Electronic Signature Plug-in install!")
+5 WRITE !,$$C^XBFUNC("Please print/capture this screen and notify")
+6 ;W !,$$C^XBFUNC("the Help Desk")
+7 WRITE !!,LINE
+8 QUIT
+9 ;