LA67 ;VA/DALOI/JMC - LA*5.2*67 PATCH ENVIRONMENT CHECK ROUTINE ;5/13/2002
;;5.2;AUTOMATED LAB INSTRUMENTS;**1031**;NOV 01, 1997
;
;;VA LA Patche(s): 67
;
EN ; Does not prevent loading of the transport global.
; Environment check is done only during the install.
;
N XQA,XQAMSG
;
I '$G(XPDENV) D Q
. S XQAMSG="Transport global for patch "_$G(XPDNM,"Unknown patch")_" loaded on "_$$HTE^XLFDT($H),XQA("G.LMI")=""
. ; D SETUP^XQALERT
. ; D BMES^XPDUTL($$CJ^XLFSTR("Sending transport global loaded alert to mail group G.LMI",80))
;
S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")_" started on "_$$HTE^XLFDT($H)
S XQA("G.LMI")=""
; D SETUP^XQALERT
;
D BMES^XPDUTL($$CJ^XLFSTR("--- "_XQAMSG_" ---",80)) ; IHS/MSC/MKK - LR*5.2*1031
;
D CHECK
D EXIT
Q
;
CHECK ; Perform environment check
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 $P($$ACTIVE^XUSER(DUZ),"^")'=1 D Q
. D BMES^XPDUTL($$CJ^XLFSTR("You are not a valid user on this system",80))
. S XPDQUIT=2
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))
;
I $G(XPDQUIT) D BMES^XPDUTL($$CJ^XLFSTR("--- Install Environment Check for "_$G(XPDNM,"Unknown patch")_" FAILED ---",80)) ; IHS/MSC/MKK - LR*5.2*1031
I '$G(XPDQUIT) D BMES^XPDUTL($$CJ^XLFSTR("--- Install Environment Check for "_$G(XPDNM,"Unknown patch")_" is Ok ---",80)) ; IHS/MSC/MKK - LR*5.2*1031
;
Q
;
;
PRE ; KIDS Pre install for LA*5.2*67
;
N DA,DIK,FDA,LA7ERR,LAI
;
; D BMES^XPDUTL($$CJ^XLFSTR("Sending install started alert to mail group G.LMI",80))
D BMES^XPDUTL($$CJ^XLFSTR("*** Pre install started ***",80))
D BMES^XPDUTL($$CJ^XLFSTR("--- Creating stub entries to file #62.4 and #62.48 ---",80))
;
F LAI=1:1:5 D
. S FDA(1,62.4,"?+1,",.01)="LA7POC"_LAI
. D UPDATE^DIE("","FDA(1)","","LA7ERR(1)")
. S FDA(2,62.48,"?+1,",.01)="LA7POC"_LAI
. D UPDATE^DIE("","FDA(2)","","LA7ERR(2)")
;
S LAI=$$FIND1^DIC(62.48,"","OX","LA7POC99","B","")
I LAI S DIK="^LAHM(62.48,",DA=LAI D ^DIK
;
D BMES^XPDUTL($$CJ^XLFSTR("*** Pre install completed ***",80))
;
Q
;
;
POST ; KIDS Post install for LA*5.2*67
N DA,DIK,DLAYGO,FDA,IEN,LA7200,LA7FAC,LA7X,LA7Y,LA7I,XQA,XQAMSG
;
D BMES^XPDUTL($$CJ^XLFSTR("*** Post install started ***",80))
D BMES^XPDUTL($$CJ^XLFSTR("--- Completing LA7POC* entries in file #62.4 ---",80))
;
F LA7I=1:1:5 D
. S IEN=$$FIND1^DIC(62.4,"","X","LA7POC"_LA7I,"B","","LA7ERRF")
. S FDA(1,62.4,IEN_",",5)="Accession cross-reference"
. S FDA(1,62.4,IEN_",",6)="IDE"
. S FDA(1,62.4,IEN_",",8)="LA7POC"_LA7I
. D FILE^DIE("E","FDA(1)","LA7ERR(1)")
D BMES^XPDUTL($$CJ^XLFSTR("*** Updating file #62.4 completed ***",80))
;
; Set facility station number into FACILITY NAME field in file #771.
S LA7FAC=$P($$SITE^VASITE(DT),"^",3)
I LA7FAC'="" D
. D BMES^XPDUTL($$CJ^XLFSTR("*** Updating facility name for LA7POC* entries in file #771 ***",80))
. F LA7I=1:1:5,"LA7LAB" D
. . I LA7I S LA7X="LA7POC"_LA7I
. . E S LA7X=LA7I
. . S LA7Y=$$FIND1^DIC(771,"","",LA7X,"B")
. . I LA7Y<1 Q
. . S FDA(1,771,LA7Y_",",3)=LA7FAC
. . D FILE^DIE("","FDA(1)","LA7DIE(1)")
. D BMES^XPDUTL($$CJ^XLFSTR("*** Updating facility name completed ***",80))
;
; Add POC user to file #200 if not entered
S LA7200=$$FIND1^DIC(200,"","OX","LRLAB,POC","B","")
I LA7200<1 D
. D BMES^XPDUTL($$CJ^XLFSTR("*** Adding non-human user 'LRLAB,POC' to NEW PERSON file ***",80))
. S DIC=200,DIC("DR")="",DIC(0)="L",DLAYGO=200,X="LRLAB,POC"
. D ^DIC
. D BMES^XPDUTL($$CJ^XLFSTR("*** Adding 'LRLAB,POC' "_$S(Y<1:"Failed",1:"Successful")_" ***",80))
;
;
; Add LRLAB,HL user to file #200 if not entered
S LA7200=$$FIND1^DIC(200,"","OX","LRLAB,HL","B","")
I LA7200<1 D
. D BMES^XPDUTL($$CJ^XLFSTR("*** Adding non-human user 'LRLAB,HL' to NEW PERSON file ***",80))
. S DIC=200,DIC("DR")="",DIC(0)="L",DLAYGO=200,X="LRLAB,HL"
. D ^DIC
. D BMES^XPDUTL($$CJ^XLFSTR("*** Adding 'LRLAB,HL' "_$S(Y<1:"Failed",1:"Successful")_" ***",80))
Q
;
;
D BMES^XPDUTL($$CJ^XLFSTR("*** Post install completed ***",80))
;
D BMES^XPDUTL($$CJ^XLFSTR("Sending install completion alert to mail group G.LMI",80))
S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($H)
S XQA("G.LMI")=""
; D SETUP^XQALERT
;
D BMES^XPDUTL($$CJ^XLFSTR("--- "_XQAMSG_" ---",80)) ; IHS/MSC/MKK - LR*5.2*1031
;
Q
LA67 ;VA/DALOI/JMC - LA*5.2*67 PATCH ENVIRONMENT CHECK ROUTINE ;5/13/2002
+1 ;;5.2;AUTOMATED LAB INSTRUMENTS;**1031**;NOV 01, 1997
+2 ;
+3 ;;VA LA Patche(s): 67
+4 ;
EN ; Does not prevent loading of the transport global.
+1 ; Environment check is done only during the install.
+2 ;
+3 NEW XQA,XQAMSG
+4 ;
+5 IF '$GET(XPDENV)
Begin DoDot:1
+6 SET XQAMSG="Transport global for patch "_$GET(XPDNM,"Unknown patch")_" loaded on "_$$HTE^XLFDT($HOROLOG)
SET XQA("G.LMI")=""
+7 ; D SETUP^XQALERT
+8 ; D BMES^XPDUTL($$CJ^XLFSTR("Sending transport global loaded alert to mail group G.LMI",80))
End DoDot:1
QUIT
+9 ;
+10 SET XQAMSG="Installation of patch "_$GET(XPDNM,"Unknown patch")_" started on "_$$HTE^XLFDT($HOROLOG)
+11 SET XQA("G.LMI")=""
+12 ; D SETUP^XQALERT
+13 ;
+14 ; IHS/MSC/MKK - LR*5.2*1031
DO BMES^XPDUTL($$CJ^XLFSTR("--- "_XQAMSG_" ---",80))
+15 ;
+16 DO CHECK
+17 DO EXIT
+18 QUIT
+19 ;
CHECK ; Perform environment check
+1 IF $SELECT('$GET(IOM):1,'$GET(IOSL):1,$GET(U)'="^":1,1:0)
Begin DoDot:1
+2 DO BMES^XPDUTL($$CJ^XLFSTR("Terminal Device is not defined",80))
+3 SET XPDQUIT=2
End DoDot:1
QUIT
+4 IF $SELECT('$GET(DUZ):1,$DATA(DUZ)[0:1,$DATA(DUZ(0))[0:1,1:0)
Begin DoDot:1
+5 DO BMES^XPDUTL($$CJ^XLFSTR("Please log in to set local DUZ... variables",80))
+6 SET XPDQUIT=2
End DoDot:1
QUIT
+7 IF $PIECE($$ACTIVE^XUSER(DUZ),"^")'=1
Begin DoDot:1
+8 DO BMES^XPDUTL($$CJ^XLFSTR("You are not a valid user on this system",80))
+9 SET XPDQUIT=2
End DoDot:1
QUIT
+10 SET XPDIQ("XPZ1","B")="NO"
+11 QUIT
+12 ;
EXIT ;
+1 ; I $G(XPDQUIT) D BMES^XPDUTL($$CJ^XLFSTR("--- Install Environment Check FAILED ---",80))
+2 ; I '$G(XPDQUIT) D BMES^XPDUTL($$CJ^XLFSTR("--- Environment Check is Ok ---",80))
+3 ;
+4 ; IHS/MSC/MKK - LR*5.2*1031
IF $GET(XPDQUIT)
DO BMES^XPDUTL($$CJ^XLFSTR("--- Install Environment Check for "_$GET(XPDNM,"Unknown patch")_" FAILED ---",80))
+5 ; IHS/MSC/MKK - LR*5.2*1031
IF '$GET(XPDQUIT)
DO BMES^XPDUTL($$CJ^XLFSTR("--- Install Environment Check for "_$GET(XPDNM,"Unknown patch")_" is Ok ---",80))
+6 ;
+7 QUIT
+8 ;
+9 ;
PRE ; KIDS Pre install for LA*5.2*67
+1 ;
+2 NEW DA,DIK,FDA,LA7ERR,LAI
+3 ;
+4 ; D BMES^XPDUTL($$CJ^XLFSTR("Sending install started alert to mail group G.LMI",80))
+5 DO BMES^XPDUTL($$CJ^XLFSTR("*** Pre install started ***",80))
+6 DO BMES^XPDUTL($$CJ^XLFSTR("--- Creating stub entries to file #62.4 and #62.48 ---",80))
+7 ;
+8 FOR LAI=1:1:5
Begin DoDot:1
+9 SET FDA(1,62.4,"?+1,",.01)="LA7POC"_LAI
+10 DO UPDATE^DIE("","FDA(1)","","LA7ERR(1)")
+11 SET FDA(2,62.48,"?+1,",.01)="LA7POC"_LAI
+12 DO UPDATE^DIE("","FDA(2)","","LA7ERR(2)")
End DoDot:1
+13 ;
+14 SET LAI=$$FIND1^DIC(62.48,"","OX","LA7POC99","B","")
+15 IF LAI
SET DIK="^LAHM(62.48,"
SET DA=LAI
DO ^DIK
+16 ;
+17 DO BMES^XPDUTL($$CJ^XLFSTR("*** Pre install completed ***",80))
+18 ;
+19 QUIT
+20 ;
+21 ;
POST ; KIDS Post install for LA*5.2*67
+1 NEW DA,DIK,DLAYGO,FDA,IEN,LA7200,LA7FAC,LA7X,LA7Y,LA7I,XQA,XQAMSG
+2 ;
+3 DO BMES^XPDUTL($$CJ^XLFSTR("*** Post install started ***",80))
+4 DO BMES^XPDUTL($$CJ^XLFSTR("--- Completing LA7POC* entries in file #62.4 ---",80))
+5 ;
+6 FOR LA7I=1:1:5
Begin DoDot:1
+7 SET IEN=$$FIND1^DIC(62.4,"","X","LA7POC"_LA7I,"B","","LA7ERRF")
+8 SET FDA(1,62.4,IEN_",",5)="Accession cross-reference"
+9 SET FDA(1,62.4,IEN_",",6)="IDE"
+10 SET FDA(1,62.4,IEN_",",8)="LA7POC"_LA7I
+11 DO FILE^DIE("E","FDA(1)","LA7ERR(1)")
End DoDot:1
+12 DO BMES^XPDUTL($$CJ^XLFSTR("*** Updating file #62.4 completed ***",80))
+13 ;
+14 ; Set facility station number into FACILITY NAME field in file #771.
+15 SET LA7FAC=$PIECE($$SITE^VASITE(DT),"^",3)
+16 IF LA7FAC'=""
Begin DoDot:1
+17 DO BMES^XPDUTL($$CJ^XLFSTR("*** Updating facility name for LA7POC* entries in file #771 ***",80))
+18 FOR LA7I=1:1:5,"LA7LAB"
Begin DoDot:2
+19 IF LA7I
SET LA7X="LA7POC"_LA7I
+20 IF '$TEST
SET LA7X=LA7I
+21 SET LA7Y=$$FIND1^DIC(771,"","",LA7X,"B")
+22 IF LA7Y<1
QUIT
+23 SET FDA(1,771,LA7Y_",",3)=LA7FAC
+24 DO FILE^DIE("","FDA(1)","LA7DIE(1)")
End DoDot:2
+25 DO BMES^XPDUTL($$CJ^XLFSTR("*** Updating facility name completed ***",80))
End DoDot:1
+26 ;
+27 ; Add POC user to file #200 if not entered
+28 SET LA7200=$$FIND1^DIC(200,"","OX","LRLAB,POC","B","")
+29 IF LA7200<1
Begin DoDot:1
+30 DO BMES^XPDUTL($$CJ^XLFSTR("*** Adding non-human user 'LRLAB,POC' to NEW PERSON file ***",80))
+31 SET DIC=200
SET DIC("DR")=""
SET DIC(0)="L"
SET DLAYGO=200
SET X="LRLAB,POC"
+32 DO ^DIC
+33 DO BMES^XPDUTL($$CJ^XLFSTR("*** Adding 'LRLAB,POC' "_$SELECT(Y<1:"Failed",1:"Successful")_" ***",80))
End DoDot:1
+34 ;
+35 ;
+36 ; Add LRLAB,HL user to file #200 if not entered
+37 SET LA7200=$$FIND1^DIC(200,"","OX","LRLAB,HL","B","")
+38 IF LA7200<1
Begin DoDot:1
+39 DO BMES^XPDUTL($$CJ^XLFSTR("*** Adding non-human user 'LRLAB,HL' to NEW PERSON file ***",80))
+40 SET DIC=200
SET DIC("DR")=""
SET DIC(0)="L"
SET DLAYGO=200
SET X="LRLAB,HL"
+41 DO ^DIC
+42 DO BMES^XPDUTL($$CJ^XLFSTR("*** Adding 'LRLAB,HL' "_$SELECT(Y<1:"Failed",1:"Successful")_" ***",80))
End DoDot:1
+43 QUIT
+44 ;
+45 ;
+46 DO BMES^XPDUTL($$CJ^XLFSTR("*** Post install completed ***",80))
+47 ;
+48 DO BMES^XPDUTL($$CJ^XLFSTR("Sending install completion alert to mail group G.LMI",80))
+49 SET XQAMSG="Installation of patch "_$GET(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($HOROLOG)
+50 SET XQA("G.LMI")=""
+51 ; D SETUP^XQALERT
+52 ;
+53 ; IHS/MSC/MKK - LR*5.2*1031
DO BMES^XPDUTL($$CJ^XLFSTR("--- "_XQAMSG_" ---",80))
+54 ;
+55 QUIT