LA23 ;DALISC/JMC - LA*5.2*23 PATCH ENVIRONMENT CHECK ROUTINE
;;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
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
. 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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLA23 2265 printed Dec 13, 2024@01:38:43 Page 2
LA23 ;DALISC/JMC - LA*5.2*23 PATCH ENVIRONMENT CHECK ROUTINE
+1 ;;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 NEW VER
+2 IF $SELECT('$GET(IOM):1,'$GET(IOSL):1,$GET(U)'="^":1,1:0)
Begin DoDot:1
+3 DO BMES^XPDUTL($$CJ^XLFSTR("Terminal Device is not defined",80))
+4 SET XPDQUIT=2
End DoDot:1
QUIT
+5 IF $SELECT('$GET(DUZ):1,$DATA(DUZ)[0:1,$DATA(DUZ(0))[0:1,1:0)
Begin DoDot:1
+6 DO BMES^XPDUTL($$CJ^XLFSTR("Please log in to set local DUZ... variables",80))
+7 SET XPDQUIT=2
End DoDot:1
QUIT
+8 IF '$DATA(^VA(200,$GET(DUZ),0))#2
Begin DoDot:1
+9 DO BMES^XPDUTL($$CJ^XLFSTR("You are not a valid user on this system",80))
+10 SET XPDQUIT=2
End DoDot:1
QUIT
+11 SET VER=$$VERSION^XPDUTL("LA7")
+12 IF VER'>5.1
Begin DoDot:1
+13 DO BMES^XPDUTL($$CJ^XLFSTR("You must have LAB MESSAGING V5.2 Installed",80))
+14 SET XPDQUIT=2
End DoDot:1
QUIT
+15 IF '$$PATCH^XPDUTL("LA*5.2*25")
Begin DoDot:1
+16 DO BMES^XPDUTL($$CJ^XLFSTR("You must install patch LA*5.2*25",80))
+17 SET XPDQUIT=2
End DoDot:1
QUIT
+18 ; Set lock if site using autodownload.
+19 IF $DATA(^LAB(62.4,"AE"))
Begin DoDot:1
+20 LOCK +^LA("ADL",0):10
if $TEST
QUIT
+21 SET XPDQUIT=2
+22 DO BMES^XPDUTL("Unable to obtain lock on ^LA(""ADL"",0) node, auto download (LA7ADL) running!")
+23 DO BMES^XPDUTL("Install aborted!")
End DoDot:1
if $GET(XPDQUIT)
QUIT
+24 ; Set lock to prevent LA7UIIN processing routine from running.
+25 LOCK +^LAHM(62.49,"Z"):10
+26 IF '$TEST
Begin DoDot:1
+27 SET XPDQUIT=2
+28 DO BMES^XPDUTL("Unable to obtain lock on ^LAHM(62.49,""Z"") node, UI processing (LA7UIIN) running!")
+29 DO BMES^XPDUTL("Install aborted!")
End DoDot:1
+30 SET XPDIQ("XPZ1","B")="NO"
+31 QUIT
+32 ;
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