LR258 ;DALOI/RSH - LR*5.2*258 PATCH ENVIRONMENT CHECK ROUTINE
;;5.2;LAB SERVICE;**258**;Sep 27,1994
EN ; Does not prevent loading of the transport global.
;Environment check is done only during the install.
;$$CJ^XLFSTR supported by DBIA #10104
;$$VERSION^XPDUTL supported by DBIA #10141
;BMES^XPDUTL supported by DBIA 10141
;$$ACTIVE^XUSER supported by DBIA #2343
Q:'$G(XPDENV)
D BMES^XPDUTL($$CJ^XLFSTR("*** Environment check started ***",80))
D CHECK
D EXIT Q:$G(XPDQUIT)
N DIR,DIC
D BMES^XPDUTL($$CJ^XLFSTR("This patch installs National Laboratory Test codes.",IOM))
D BMES^XPDUTL($$CJ^XLFSTR("LAB NLT/CPT CODES (#64.81)",IOM))
D BMES^XPDUTL($$CJ^XLFSTR("Will be purged to ensure data integrity.",IOM))
D BMES^XPDUTL($$CJ^XLFSTR("File #64.81 will be replaced completely by this patch installation.",IOM))
W ! S DIR(0)="Y",DIR("A")="Do you want to continue"
S DIR("B")="YES"
D ^DIR K DIR
I $D(DIRUT)!('Y) D Q
.D BMES^XPDUTL($$CJ^XLFSTR("Environment check aborted.",IOM))
.S XPDQUIT=2
.Q
Q
CHECK I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) W !,$$CJ^XLFSTR("Terminal Device is not defined",IOM),!! S XPDQUIT=2
I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) W !!,$$CJ^XLFSTR("Please Log in to set local DUZ... variables",IOM),! S XPDQUIT=2
I '$P($$ACTIVE^XUSER(DUZ),U) W !,$$CJ^XLFSTR("You are not a valid user on this system",IOM),! S XPDQUIT=2
S VER=""
I $O(^LAM(0)) S VER=$$VERSION^XPDUTL("LR")
I VER,VER'>5.1 W !,$$CJ^XLFSTR("You must have LAB V5.2 Installed",IOM),! S XPDQUIT=2
LMI N DIC,X,Y
S DIC=3.8,DIC(0)="NMXO",X="LMI" D ^DIC
I Y<1 D
. W !,$$CJ^XLFSTR("You must have Mail Group [ LMI ] defined.",IOM)
. S XPDQUIT=2
Q:$G(XPDQUIT)<1
S XPDIQ("XPZ1","B")="NO"
Q
EXIT I $G(XPDQUIT) W !!,$$CJ^XLFSTR("Install Environment Check FAILED",IOM)
I '$G(XPDQUIT) D BMES^XPDUTL($$CJ^XLFSTR("Environment Check is Ok ---",IOM))
K VER,RN,LN2
Q
LR258 ;DALOI/RSH - LR*5.2*258 PATCH ENVIRONMENT CHECK ROUTINE
+1 ;;5.2;LAB SERVICE;**258**;Sep 27,1994
EN ; Does not prevent loading of the transport global.
+1 ;Environment check is done only during the install.
+2 ;$$CJ^XLFSTR supported by DBIA #10104
+3 ;$$VERSION^XPDUTL supported by DBIA #10141
+4 ;BMES^XPDUTL supported by DBIA 10141
+5 ;$$ACTIVE^XUSER supported by DBIA #2343
+6 IF '$GET(XPDENV)
QUIT
+7 DO BMES^XPDUTL($$CJ^XLFSTR("*** Environment check started ***",80))
+8 DO CHECK
+9 DO EXIT
IF $GET(XPDQUIT)
QUIT
+10 NEW DIR,DIC
+11 DO BMES^XPDUTL($$CJ^XLFSTR("This patch installs National Laboratory Test codes.",IOM))
+12 DO BMES^XPDUTL($$CJ^XLFSTR("LAB NLT/CPT CODES (#64.81)",IOM))
+13 DO BMES^XPDUTL($$CJ^XLFSTR("Will be purged to ensure data integrity.",IOM))
+14 DO BMES^XPDUTL($$CJ^XLFSTR("File #64.81 will be replaced completely by this patch installation.",IOM))
+15 WRITE !
SET DIR(0)="Y"
SET DIR("A")="Do you want to continue"
+16 SET DIR("B")="YES"
+17 DO ^DIR
KILL DIR
+18 IF $DATA(DIRUT)!('Y)
Begin DoDot:1
+19 DO BMES^XPDUTL($$CJ^XLFSTR("Environment check aborted.",IOM))
+20 SET XPDQUIT=2
+21 QUIT
End DoDot:1
QUIT
+22 QUIT
CHECK IF $SELECT('$GET(IOM):1,'$GET(IOSL):1,$GET(U)'="^":1,1:0)
WRITE !,$$CJ^XLFSTR("Terminal Device is not defined",IOM),!!
SET XPDQUIT=2
+1 IF $SELECT('$GET(DUZ):1,$DATA(DUZ)[0:1,$DATA(DUZ(0))[0:1,1:0)
WRITE !!,$$CJ^XLFSTR("Please Log in to set local DUZ... variables",IOM),!
SET XPDQUIT=2
+2 IF '$PIECE($$ACTIVE^XUSER(DUZ),U)
WRITE !,$$CJ^XLFSTR("You are not a valid user on this system",IOM),!
SET XPDQUIT=2
+3 SET VER=""
+4 IF $ORDER(^LAM(0))
SET VER=$$VERSION^XPDUTL("LR")
+5 IF VER
IF VER'>5.1
WRITE !,$$CJ^XLFSTR("You must have LAB V5.2 Installed",IOM),!
SET XPDQUIT=2
LMI NEW DIC,X,Y
+1 SET DIC=3.8
SET DIC(0)="NMXO"
SET X="LMI"
DO ^DIC
+2 IF Y<1
Begin DoDot:1
+3 WRITE !,$$CJ^XLFSTR("You must have Mail Group [ LMI ] defined.",IOM)
+4 SET XPDQUIT=2
End DoDot:1
+5 IF $GET(XPDQUIT)<1
QUIT
+6 SET XPDIQ("XPZ1","B")="NO"
+7 QUIT
EXIT IF $GET(XPDQUIT)
WRITE !!,$$CJ^XLFSTR("Install Environment Check FAILED",IOM)
+1 IF '$GET(XPDQUIT)
DO BMES^XPDUTL($$CJ^XLFSTR("Environment Check is Ok ---",IOM))
+2 KILL VER,RN,LN2
+3 QUIT