Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LR334

LR334.m

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