LA23 ;DALISC/JMC - LA*5.2*23 PATCH ENVIRONMENT CHECK ROUTINE [ 01/12/98 4:16 PM ]
;;5.2;LA;**1001**;DEC 10, 1997
;;5.2;LAB SERVICE;**23**;Feb 14, 1996
EN ; Does not prevent loading of the transport global.
; Environment check is done only during the install.
Q:'$G(XPDENV)
D CHECK
D EXIT
Q
;
CHECK ; Perform environment check
D ^LA7INIT ;IHS/OIRM TUC/AAB 1/12/98
N VER
I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) D Q
. D BMES^XPDUTL($$CJ^XLFSTR("Terminal Device is not defined",80))
. S XPDQUIT=2
I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) D Q
. D BMES^XPDUTL($$CJ^XLFSTR("Please log in to set local DUZ... variables",80))
. S XPDQUIT=2
I '$D(^VA(200,$G(DUZ),0))#2 D Q
. D BMES^XPDUTL($$CJ^XLFSTR("You are not a valid user on this system",80))
. S XPDQUIT=2
S VER=$$VERSION^XPDUTL("LA7")
I VER'>5.1 D Q
. D BMES^XPDUTL($$CJ^XLFSTR("You must have LAB MESSAGING V5.2 Installed",80))
. S XPDQUIT=2
;I '$$PATCH^XPDUTL("LA*5.2*25") D Q ;IHS/OIRM TUC/AAB 12/1/98
. D BMES^XPDUTL($$CJ^XLFSTR("You must install patch LA*5.2*25",80))
. S XPDQUIT=2
; Set lock if site using autodownload.
I $D(^LAB(62.4,"AE")) D Q:$G(XPDQUIT)
. L +^LA("ADL",0):10 Q:$T
. S XPDQUIT=2
. D BMES^XPDUTL("Unable to obtain lock on ^LA(""ADL"",0) node, auto download (LA7ADL) running!")
. D BMES^XPDUTL("Install aborted!")
; Set lock to prevent LA7UIIN processing routine from running.
L +^LAHM(62.49,"Z"):10
I '$T D
. S XPDQUIT=2
. D BMES^XPDUTL("Unable to obtain lock on ^LAHM(62.49,""Z"") node, UI processing (LA7UIIN) running!")
. D BMES^XPDUTL("Install aborted!")
S XPDIQ("XPZ1","B")="NO"
Q
;
EXIT ;
I $G(XPDQUIT) D BMES^XPDUTL($$CJ^XLFSTR("--- Install Environment Check FAILED ---",80))
I '$G(XPDQUIT) D BMES^XPDUTL($$CJ^XLFSTR("--- Environment Check is Ok ---",80))
Q
;
POST ; KIDS Post install for LA*5.2*23
N X
S X=$$ADD^XPDMENU("LA INTERFACE","LA7 MAIN MENU")
D BMES^XPDUTL("Option [LA7 MAIN MENU] was "_$S(X:"added",1:"NOT ADDED")_" to [LA INTERFACE] MENU")
D BMES^XPDUTL("Moving entries in global ^LA(""ADL"",uid) to ^LA(""ADL"",""Q"",uid)")
POST1 S X=0
F S X=$O(^LA("ADL",X)) Q:X="" D
. I X="Q"!(X="STOP") Q
. S ^LA("ADL","Q",X)=""
. K ^LA("ADL",X)
D BMES^XPDUTL($$CJ^XLFSTR("Post install completed",80))
I $D(^LAB(62.4,"AE")) D
. L -^LA("ADL",0)
L -^LAHM(62.49,"Z")
Q
LA23 ;DALISC/JMC - LA*5.2*23 PATCH ENVIRONMENT CHECK ROUTINE [ 01/12/98 4:16 PM ]
+1 ;;5.2;LA;**1001**;DEC 10, 1997
+2 ;;5.2;LAB SERVICE;**23**;Feb 14, 1996
EN ; Does not prevent loading of the transport global.
+1 ; Environment check is done only during the install.
+2 IF '$GET(XPDENV)
QUIT
+3 DO CHECK
+4 DO EXIT
+5 QUIT
+6 ;
CHECK ; Perform environment check
+1 ;IHS/OIRM TUC/AAB 1/12/98
DO ^LA7INIT
+2 NEW VER
+3 IF $SELECT('$GET(IOM):1,'$GET(IOSL):1,$GET(U)'="^":1,1:0)
Begin DoDot:1
+4 DO BMES^XPDUTL($$CJ^XLFSTR("Terminal Device is not defined",80))
+5 SET XPDQUIT=2
End DoDot:1
QUIT
+6 IF $SELECT('$GET(DUZ):1,$DATA(DUZ)[0:1,$DATA(DUZ(0))[0:1,1:0)
Begin DoDot:1
+7 DO BMES^XPDUTL($$CJ^XLFSTR("Please log in to set local DUZ... variables",80))
+8 SET XPDQUIT=2
End DoDot:1
QUIT
+9 IF '$DATA(^VA(200,$GET(DUZ),0))#2
Begin DoDot:1
+10 DO BMES^XPDUTL($$CJ^XLFSTR("You are not a valid user on this system",80))
+11 SET XPDQUIT=2
End DoDot:1
QUIT
+12 SET VER=$$VERSION^XPDUTL("LA7")
+13 IF VER'>5.1
Begin DoDot:1
+14 DO BMES^XPDUTL($$CJ^XLFSTR("You must have LAB MESSAGING V5.2 Installed",80))
+15 SET XPDQUIT=2
End DoDot:1
QUIT
+16 ;I '$$PATCH^XPDUTL("LA*5.2*25") D Q ;IHS/OIRM TUC/AAB 12/1/98
+17
*** ERROR ***
+18
*** ERROR ***
+19 ; Set lock if site using autodownload.
+20 IF $DATA(^LAB(62.4,"AE"))
Begin DoDot:1
+21 LOCK +^LA("ADL",0):10
IF $TEST
QUIT
+22 SET XPDQUIT=2
+23 DO BMES^XPDUTL("Unable to obtain lock on ^LA(""ADL"",0) node, auto download (LA7ADL) running!")
+24 DO BMES^XPDUTL("Install aborted!")
End DoDot:1
IF $GET(XPDQUIT)
QUIT
+25 ; Set lock to prevent LA7UIIN processing routine from running.
+26 LOCK +^LAHM(62.49,"Z"):10
+27 IF '$TEST
Begin DoDot:1
+28 SET XPDQUIT=2
+29 DO BMES^XPDUTL("Unable to obtain lock on ^LAHM(62.49,""Z"") node, UI processing (LA7UIIN) running!")
+30 DO BMES^XPDUTL("Install aborted!")
End DoDot:1
+31 SET XPDIQ("XPZ1","B")="NO"
+32 QUIT
+33 ;
EXIT ;
+1 IF $GET(XPDQUIT)
DO BMES^XPDUTL($$CJ^XLFSTR("--- Install Environment Check FAILED ---",80))
+2 IF '$GET(XPDQUIT)
DO BMES^XPDUTL($$CJ^XLFSTR("--- Environment Check is Ok ---",80))
+3 QUIT
+4 ;
POST ; KIDS Post install for LA*5.2*23
+1 NEW X
+2 SET X=$$ADD^XPDMENU("LA INTERFACE","LA7 MAIN MENU")
+3 DO BMES^XPDUTL("Option [LA7 MAIN MENU] was "_$SELECT(X:"added",1:"NOT ADDED")_" to [LA INTERFACE] MENU")
+4 DO BMES^XPDUTL("Moving entries in global ^LA(""ADL"",uid) to ^LA(""ADL"",""Q"",uid)")
POST1 SET X=0
+1 FOR
SET X=$ORDER(^LA("ADL",X))
IF X=""
QUIT
Begin DoDot:1
+2 IF X="Q"!(X="STOP")
QUIT
+3 SET ^LA("ADL","Q",X)=""
+4 KILL ^LA("ADL",X)
End DoDot:1
+5 DO BMES^XPDUTL($$CJ^XLFSTR("Post install completed",80))
+6 IF $DATA(^LAB(62.4,"AE"))
Begin DoDot:1
+7 LOCK -^LA("ADL",0)
End DoDot:1
+8 LOCK -^LAHM(62.49,"Z")
+9 QUIT