LR334 ;VA/DALOI/FHS - LR*5.2*334 PATCH ENVIRONMENT CHECK ROUTINE;31-AUG-2001
;;5.2;LAB SERVICE;**1028**;NOV 01, 1997;Build 53
;;5.2;LAB SERVICE;**334**;Sep 27, 1994;Build 45
;; IA# 4640 Set file/field implementation statusSet file/field implementation status
ENV ; Does not prevent loading of the transport global.
; Environment check is done only during the install.
;
N XQA,XQAMSG
;
CHKNM ; Make sure the patch name exist
S XUMF=1
I '$D(XPDNM) D G EXIT
. D BMES("No valid patch name exist")
. S XPDQUIT=2
;
D CHECK
D EXIT
Q
;
CHECK ; Perform environment check
I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) D
. D BMES("Terminal Device is not defined")
. S XPDQUIT=2
I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) D
. D BMES("Please log in to set local DUZ... variables")
. S XPDQUIT=2
I $P($$ACTIVE^XUSER(DUZ),"^")'=1 D
. D BMES("You are not a valid user on this system")
. S XPDQUIT=2
S XPDIQ("XPZ1","B")="NO" Q
EXIT ;
N XQA
I $G(XPDQUIT) D BMES("--- Install Environment Check FAILED ---") Q
D BMES("--- Environment Check is Ok ---")
S XQAMSG="Loading of patch "_$G(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($H)
D BMES("Sending install loaded alert to mail group G.LMI")
S XQA("G.LMI")=""
D SETUP^XQALERT
H 5
Q
;
PRE ;Pre-install entry point
Q:'$D(XPDNM)
;Remove old data
D
. N DIK,DA,DIU
. S DIK="^DD(60,",DA(1)=60,DA=64 D ^DIK K DIK
. S DIK="^DD(64,",DA(1)=64,DA=25 D ^DIK K DIK
. S DIU="^LAB(64.81,",DIU(0)="DS" D EN^DIU2
. K DIU
. S DIU="^LAB(95.3,",DIU(0)="DS" D EN^DIU2
. K DIU
. S DIU="^LAB(95.31,",DIU(0)="DS" D EN^DIU2
. K DIU
. S DIU="^LAB(64.061,",DIU(0)="DS" D EN^DIU2
. K DIU
. S DIU="^LAB(64.2,",DIU(0)="DS" D EN^DIU2
. K DIU
. S DIU="^LAB(64.3,",DIU(0)="DS" D EN^DIU2
. K DIU
. S DIU="^LAB(64.062",DIU(0)="DS" D EN^DIU2
. K DIU
D BMES("*** Preinstall completed ***")
Q
POST ;Post install
D POST^LR334PO
DD ;Purge .001 from installed files
I '$G(LRDBUG) D
. F LRDA=64.2,64.3,64.061,64.062,95.3,95.31 D
. . N DA,DIK
. . S DA(1)=LRDA,DA=.001,DIK="^DD("_LRDA_","
. . D ^DIK
. N DIK
. S DIK="^LAM(" D IXALL^DIK
D
. S $P(^LAM(0),U,3)=99999,LRVR="2.34"_$T(+2)
. S ^LAM("VR")=LRVR
. N LRI
. F LRI=64.061,64.2,64.21,64.22,64.3,95.3,95.31 I $D(^LAB(LRI,0))#2 S ^LAB(LRI,"VR")=LRVR
I $T(SETSTAT^HDISVF01)'="" D
. D SETSTAT^HDISVF01(95.3,"",6,"")
D
. D BMES("Sending install completion alert to mail group G.LMI")
. S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($H)
. S XQA("G.LMI")=""
. D SETUP^XQALERT
K LRDA,LRPRT,LRVR
Q
BMES(STR) ;Write BMES^XPDUTL statements
D BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
Q
MAIL ;Send message to G.LMI local mail group of added 64 codes
N DIFROM,XMSUB,XMDUZ,XMTEXT,XMY,LRIEN,LRN
NEWLST ;Build list of added WKLD CODES
;D BMES("Building List Of Added NLT CODEs")
K LRLAST64
I '$O(^XTMP("LRNLT","LR334",1,3)) D
. I '$G(LRPRT) D
. . D SCR^LR334PO("No WKLD CODES Added to Database")
D BMES("Sending message to LMI Mail Group.")
D
. NEW XMSUB,XMY,XMTEST,XMDUZ
. S XMSUB="ADDED WKLD CODE REPORT "_$$FMTE^XLFDT($$NOW^XLFDT,"1S")
. S XMY("G.LMI")="",XMTEXT="^XTMP(""LRNLT"",""LR334"",1,",XMDUZ=.5
. D ^XMD
. D BMES("List Of Added WKLD CODEs Complete")
Q
LR334 ;VA/DALOI/FHS - LR*5.2*334 PATCH ENVIRONMENT CHECK ROUTINE;31-AUG-2001
+1 ;;5.2;LAB SERVICE;**1028**;NOV 01, 1997;Build 53
+2 ;;5.2;LAB SERVICE;**334**;Sep 27, 1994;Build 45
+3 ;; IA# 4640 Set file/field implementation statusSet file/field implementation status
ENV ; Does not prevent loading of the transport global.
+1 ; Environment check is done only during the install.
+2 ;
+3 NEW XQA,XQAMSG
+4 ;
CHKNM ; Make sure the patch name exist
+1 SET XUMF=1
+2 IF '$DATA(XPDNM)
Begin DoDot:1
+3 DO BMES("No valid patch name exist")
+4 SET XPDQUIT=2
End DoDot:1
GOTO EXIT
+5 ;
+6 DO CHECK
+7 DO EXIT
+8 QUIT
+9 ;
CHECK ; Perform environment check
+1 IF $SELECT('$GET(IOM):1,'$GET(IOSL):1,$GET(U)'="^":1,1:0)
Begin DoDot:1
+2 DO BMES("Terminal Device is not defined")
+3 SET XPDQUIT=2
End DoDot:1
+4 IF $SELECT('$GET(DUZ):1,$DATA(DUZ)[0:1,$DATA(DUZ(0))[0:1,1:0)
Begin DoDot:1
+5 DO BMES("Please log in to set local DUZ... variables")
+6 SET XPDQUIT=2
End DoDot:1
+7 IF $PIECE($$ACTIVE^XUSER(DUZ),"^")'=1
Begin DoDot:1
+8 DO BMES("You are not a valid user on this system")
+9 SET XPDQUIT=2
End DoDot:1
+10 SET XPDIQ("XPZ1","B")="NO"
QUIT
EXIT ;
+1 NEW XQA
+2 IF $GET(XPDQUIT)
DO BMES("--- Install Environment Check FAILED ---")
QUIT
+3 DO BMES("--- Environment Check is Ok ---")
+4 SET XQAMSG="Loading of patch "_$GET(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($HOROLOG)
+5 DO BMES("Sending install loaded alert to mail group G.LMI")
+6 SET XQA("G.LMI")=""
+7 DO SETUP^XQALERT
+8 HANG 5
+9 QUIT
+10 ;
PRE ;Pre-install entry point
+1 IF '$DATA(XPDNM)
QUIT
+2 ;Remove old data
+3 Begin DoDot:1
+4 NEW DIK,DA,DIU
+5 SET DIK="^DD(60,"
SET DA(1)=60
SET DA=64
DO ^DIK
KILL DIK
+6 SET DIK="^DD(64,"
SET DA(1)=64
SET DA=25
DO ^DIK
KILL DIK
+7 SET DIU="^LAB(64.81,"
SET DIU(0)="DS"
DO EN^DIU2
+8 KILL DIU
+9 SET DIU="^LAB(95.3,"
SET DIU(0)="DS"
DO EN^DIU2
+10 KILL DIU
+11 SET DIU="^LAB(95.31,"
SET DIU(0)="DS"
DO EN^DIU2
+12 KILL DIU
+13 SET DIU="^LAB(64.061,"
SET DIU(0)="DS"
DO EN^DIU2
+14 KILL DIU
+15 SET DIU="^LAB(64.2,"
SET DIU(0)="DS"
DO EN^DIU2
+16 KILL DIU
+17 SET DIU="^LAB(64.3,"
SET DIU(0)="DS"
DO EN^DIU2
+18 KILL DIU
+19 SET DIU="^LAB(64.062"
SET DIU(0)="DS"
DO EN^DIU2
+20 KILL DIU
End DoDot:1
+21 DO BMES("*** Preinstall completed ***")
+22 QUIT
POST ;Post install
+1 DO POST^LR334PO
DD ;Purge .001 from installed files
+1 IF '$GET(LRDBUG)
Begin DoDot:1
+2 FOR LRDA=64.2,64.3,64.061,64.062,95.3,95.31
Begin DoDot:2
+3 NEW DA,DIK
+4 SET DA(1)=LRDA
SET DA=.001
SET DIK="^DD("_LRDA_","
+5 DO ^DIK
End DoDot:2
+6 NEW DIK
+7 SET DIK="^LAM("
DO IXALL^DIK
End DoDot:1
+8 Begin DoDot:1
+9 SET $PIECE(^LAM(0),U,3)=99999
SET LRVR="2.34"_$TEXT(+2)
+10 SET ^LAM("VR")=LRVR
+11 NEW LRI
+12 FOR LRI=64.061,64.2,64.21,64.22,64.3,95.3,95.31
IF $DATA(^LAB(LRI,0))#2
SET ^LAB(LRI,"VR")=LRVR
End DoDot:1
+13 IF $TEXT(SETSTAT^HDISVF01)'=""
Begin DoDot:1
+14 DO SETSTAT^HDISVF01(95.3,"",6,"")
End DoDot:1
+15 Begin DoDot:1
+16 DO BMES("Sending install completion alert to mail group G.LMI")
+17 SET XQAMSG="Installation of patch "_$GET(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($HOROLOG)
+18 SET XQA("G.LMI")=""
+19 DO SETUP^XQALERT
End DoDot:1
+20 KILL LRDA,LRPRT,LRVR
+21 QUIT
BMES(STR) ;Write BMES^XPDUTL statements
+1 DO BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
+2 QUIT
MAIL ;Send message to G.LMI local mail group of added 64 codes
+1 NEW DIFROM,XMSUB,XMDUZ,XMTEXT,XMY,LRIEN,LRN
NEWLST ;Build list of added WKLD CODES
+1 ;D BMES("Building List Of Added NLT CODEs")
+2 KILL LRLAST64
+3 IF '$ORDER(^XTMP("LRNLT","LR334",1,3))
Begin DoDot:1
+4 IF '$GET(LRPRT)
Begin DoDot:2
+5 DO SCR^LR334PO("No WKLD CODES Added to Database")
End DoDot:2
End DoDot:1
+6 DO BMES("Sending message to LMI Mail Group.")
+7 Begin DoDot:1
+8 NEW XMSUB,XMY,XMTEST,XMDUZ
+9 SET XMSUB="ADDED WKLD CODE REPORT "_$$FMTE^XLFDT($$NOW^XLFDT,"1S")
+10 SET XMY("G.LMI")=""
SET XMTEXT="^XTMP(""LRNLT"",""LR334"",1,"
SET XMDUZ=.5
+11 DO ^XMD
+12 DO BMES("List Of Added WKLD CODEs Complete")
End DoDot:1
+13 QUIT