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

LR305.m

Go to the documentation of this file.
  1. LR305 ;DALOI/WTY - LR*5.2*305 PATCH ENVIRONMENT CHECK ROUTINE;02/18/2004
  1. ;;5.2;LR;**305,1022**;September 20, 2007
  1. ;;
  1. ; VA PATCH 305 included in IHS LAB PATCH 1022
  1. ;;
  1. EN ; Does not prevent loading of the transport global.
  1. ; Environment check is done only during the install.
  1. ;
  1. N XQA,XQAMSG,LRAMSG
  1. ;
  1. I '$G(XPDENV) D Q
  1. . S XQAMSG="Transport global for patch "_$G(XPDNM,"Unknown patch")
  1. . S XQAMSG=XQAMSG_" loaded on "_$$HTE^XLFDT($H)
  1. . S XQA("G.LMI")=""
  1. . D SETUP^XQALERT
  1. . S LRAMSG="Sending transport global loaded alert to mail group G.LMI"
  1. . D BMES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. ;
  1. S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")_" started "
  1. S XQAMSG=XQAMSG_"on "_$$HTE^XLFDT($H)
  1. S XQA("G.LMI")=""
  1. D SETUP^XQALERT
  1. S LRAMSG="Sending install started alert to mail group G.LMI"
  1. D BMES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  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 Q
  1. . D BMES^XPDUTL($$CJ^XLFSTR("Terminal Device is not defined",80))
  1. . S XPDQUIT=2
  1. I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) D Q
  1. . S LRAMSG="Please log in to set local DUZ... variables"
  1. . D BMES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. . S XPDQUIT=2
  1. I $P($$ACTIVE^XUSER(DUZ),"^")'=1 D Q
  1. . S LRAMSG="You are not a valid user on this system"
  1. . D BMES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. . S XPDQUIT=2
  1. S XPDIQ("XPZ1","B")="NO"
  1. Q
  1. ;
  1. ;
  1. EXIT ;
  1. I $G(XPDQUIT) D
  1. .D BMES^XPDUTL($$CJ^XLFSTR("--- Install Environment Check FAILED ---",80))
  1. I '$G(XPDQUIT) D
  1. .D BMES^XPDUTL($$CJ^XLFSTR("--- Environment Check is OK ---",80))
  1. Q
  1. ;
  1. ;
  1. PRE ; KIDS Pre install
  1. D BMES^XPDUTL($$CJ^XLFSTR("*** Pre install started ***",80))
  1. D BMES^XPDUTL($$CJ^XLFSTR("*** No action required ***",80))
  1. D BMES^XPDUTL($$CJ^XLFSTR("*** Pre install completed ***",80))
  1. Q
  1. ;
  1. ;
  1. POST ; KIDS Post install
  1. N XQA,XQAMSG,LRNUM,LRFDA,LRERR,LREND
  1. D BMES^XPDUTL($$CJ^XLFSTR("*** Post install started ***",80))
  1. S LRAMSG="Set ALLOW LAB TO ADD PATIENTS (#13) field of the"
  1. D BMES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. S LRAMSG="LABORATORY SITE (#69.9) file to 'NO'"
  1. D MES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. ;Set field #13 of file 69.9 to 'No'
  1. S (LRNUM,LREND)=0
  1. F S LRNUM=$O(^LAB(69.9,LRNUM)) Q:'LRNUM D
  1. .L +^LAB(69.9,LRNUM,0):5 I '$T D Q
  1. ..S LRAMSG="The record is locked by another user. "
  1. ..S LRAMSG=LRAMSG_"Record cannot be updated."
  1. ..D BMES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. ..S LRAMSG="Please contact IRM for assistance."
  1. ..D MES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. .K LRFDA,LRERR
  1. .Q:'$D(^LAB(69.9,LRNUM,0))
  1. .S LRFDA(69.9,LRNUM_",",13)=0
  1. .D FILE^DIE("","LRFDA","LRERR")
  1. .I $D(LRERR) D
  1. ..S LREND=1
  1. ..S LRAMSG="An error occurred while attempting to update "
  1. ..S LRAMSG=LRAMSG_"the file."
  1. ..D BMES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. ..S LRAMSG="Please contact IRM for assistance."
  1. ..D MES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. .I 'LREND D
  1. ..S LRAMSG="File Update Completed"
  1. ..D BMES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. .L -^LAB(69.9,LRNUM,0)
  1. D BMES^XPDUTL($$CJ^XLFSTR("*** Post install completed ***",80))
  1. S LRAMSG="Sending install completion alert to mail group G.LMI"
  1. D BMES^XPDUTL($$CJ^XLFSTR(LRAMSG,80))
  1. S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")
  1. S XQAMSG=XQAMSG_" completed on "_$$HTE^XLFDT($H)
  1. S XQA("G.LMI")=""
  1. D SETUP^XQALERT
  1. Q