LR72ENVC ;DALISC/CYM - LR*5.2*72 PATCH ENVIRNMENT CHECK ROUTINE
;;5.2;LAB SERVICE;**72**;Feb 14, 1996
EN ; Does not prevent loading of the transport global.
;Envirnment check is done only during the install.
;
Q:'$G(XPDENV)
I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) W !,$$CJ^XLFSTR("Terminal Device in not defined",80),!!
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",80),! S XPDQUIT=2
I '$D(^VA(200,$G(DUZ),0))#2 W !,$$CJ^XLFSTR("You are not a valid user on this system",80),! S XPDQUIT=2
S LRSITE=+$P(^XMB(1,1,"XUS"),U,17) I 'LRSITE W !!,"You must have a DEFAULT INSTITUTION defined in KERNEL SITE PARAMETERS FILE.",!!,$C(7) S XPDQUIT=2
I LRSITE'=+$P($$SITE^VASITE,U) W !!?5,"Your Instituion File entry does not match your KERNEL SITE PARAMETERS FILE.",!!,$C(7) S XPDQUIT=2
I +$G(^LAM("VR"))'>5.1 W !,$$CJ^XLFSTR("You must have LAB V5.2 or greater Installed",80),! S XPDQUIT=2
I '$D(^LRO(68,"VR")) D
. K DIC S DIC=68,DIC(0)="Z" F X="SURGICAL PATHOLOGY","CYTOPATHOLOGY","EM","AUTOPSY" D
.. D ^DIC I Y=-1 W $C(7),!!,"You must have ",X," defined in file 68 to proceed with this install",!! S XPDQUIT=2 Q
.. S LRSS=$P(Y(0),U,2),LRABV=$P(Y(0),U,11)
.. I LRSS="" W $C(7),!!,"You must have the LR Subscript field in file 68 defined for ",X," to proceed with this install",!! S XPDQUIT=2
.. I LRABV="" W $C(7),!!,"You must have the ABBREVIATION field in file 68 defined for ",X," to proceed with this install",!! S XPDQUIT=2
.. I X="SURGICAL PATHOLOGY",LRSS'="SP" W !!,$C(7),$$CJ^XLFSTR("Check your file setup for SURGICAL PATHOLOGY. Refer to instructions in the Installation Guide",80) S XPDQUIT=2
.. I X="CYTOPATHOLOGY",LRSS'="CY" W !!,$C(7),$$CJ^XLFSTR("Check your file setup for CYTOPATHOLOGY. Refer to instructions in the Installation Guide",80) S XPDQUIT=2
.. I X="EM",LRSS'="EM" W !!,$C(7),$$CJ^XLFSTR("Check your file setup for EM. Refer to instructions in the Installation Guide",80) S XPDQUIT=2
.. I X="AUTOPSY",LRSS'="AU" W !!,$C(7),$$CJ^XLFSTR("Check your file setup for AUTOPSY. Refer to instructions in the Installation Guide",80) S XPDQUIT=2
I $G(XPDQUIT) W !!,$$CJ^XLFSTR("Install environment check FAILED",80)
I '$G(XPDQUIT) W !!,$$CJ^XLFSTR("Envirnment Check is Ok ---",80)
K DIC Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLR72ENVC 2316 printed Dec 13, 2024@02:04:40 Page 2
LR72ENVC ;DALISC/CYM - LR*5.2*72 PATCH ENVIRNMENT CHECK ROUTINE
+1 ;;5.2;LAB SERVICE;**72**;Feb 14, 1996
EN ; Does not prevent loading of the transport global.
+1 ;Envirnment check is done only during the install.
+2 ;
+3 if '$GET(XPDENV)
QUIT
+4 IF $SELECT('$GET(IOM):1,'$GET(IOSL):1,$GET(U)'="^":1,1:0)
WRITE !,$$CJ^XLFSTR("Terminal Device in not defined",80),!!
+5 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",80),!
SET XPDQUIT=2
+6 IF '$DATA(^VA(200,$GET(DUZ),0))#2
WRITE !,$$CJ^XLFSTR("You are not a valid user on this system",80),!
SET XPDQUIT=2
+7 SET LRSITE=+$PIECE(^XMB(1,1,"XUS"),U,17)
IF 'LRSITE
WRITE !!,"You must have a DEFAULT INSTITUTION defined in KERNEL SITE PARAMETERS FILE.",!!,$CHAR(7)
SET XPDQUIT=2
+8 IF LRSITE'=+$PIECE($$SITE^VASITE,U)
WRITE !!?5,"Your Instituion File entry does not match your KERNEL SITE PARAMETERS FILE.",!!,$CHAR(7)
SET XPDQUIT=2
+9 IF +$GET(^LAM("VR"))'>5.1
WRITE !,$$CJ^XLFSTR("You must have LAB V5.2 or greater Installed",80),!
SET XPDQUIT=2
+10 IF '$DATA(^LRO(68,"VR"))
Begin DoDot:1
+11 KILL DIC
SET DIC=68
SET DIC(0)="Z"
FOR X="SURGICAL PATHOLOGY","CYTOPATHOLOGY","EM","AUTOPSY"
Begin DoDot:2
+12 DO ^DIC
IF Y=-1
WRITE $CHAR(7),!!,"You must have ",X," defined in file 68 to proceed with this install",!!
SET XPDQUIT=2
QUIT
+13 SET LRSS=$PIECE(Y(0),U,2)
SET LRABV=$PIECE(Y(0),U,11)
+14 IF LRSS=""
WRITE $CHAR(7),!!,"You must have the LR Subscript field in file 68 defined for ",X," to proceed with this install",!!
SET XPDQUIT=2
+15 IF LRABV=""
WRITE $CHAR(7),!!,"You must have the ABBREVIATION field in file 68 defined for ",X," to proceed with this install",!!
SET XPDQUIT=2
+16 IF X="SURGICAL PATHOLOGY"
IF LRSS'="SP"
WRITE !!,$CHAR(7),$$CJ^XLFSTR("Check your file setup for SURGICAL PATHOLOGY. Refer to instructions in the Installation Guide",80)
SET XPDQUIT=2
+17 IF X="CYTOPATHOLOGY"
IF LRSS'="CY"
WRITE !!,$CHAR(7),$$CJ^XLFSTR("Check your file setup for CYTOPATHOLOGY. Refer to instructions in the Installation Guide",80)
SET XPDQUIT=2
+18 IF X="EM"
IF LRSS'="EM"
WRITE !!,$CHAR(7),$$CJ^XLFSTR("Check your file setup for EM. Refer to instructions in the Installation Guide",80)
SET XPDQUIT=2
+19 IF X="AUTOPSY"
IF LRSS'="AU"
WRITE !!,$CHAR(7),$$CJ^XLFSTR("Check your file setup for AUTOPSY. Refer to instructions in the Installation Guide",80)
SET XPDQUIT=2
End DoDot:2
End DoDot:1
+20 IF $GET(XPDQUIT)
WRITE !!,$$CJ^XLFSTR("Install environment check FAILED",80)
+21 IF '$GET(XPDQUIT)
WRITE !!,$$CJ^XLFSTR("Envirnment Check is Ok ---",80)
+22 KILL DIC
QUIT