LR458 ;DALOI/JMC - LA*5.2*458 KIDS ROUTINE ;9/2/15 11:40
;;5.2;AUTOMATED LAB INSTRUMENTS;**458**;Sep 27, 1994;Build 10
;
PRE ;
; KIDS Pre install for LA*5.2*458
D BMES("*** Pre install started ***")
;
;
D BMES("*** Pre install completed ***")
;
Q
;
;
POST ;
; KIDS Post install for LA*5.2*458
D BMES("*** Post install started ***")
;
I $G(^TMP("LA88A",$J,1)) D RESTORE^LA88A
;
;
D BMES("*** Post install completed ***")
D BMES("Sending install completion alert to mail group G.LMI")
S STR="Installation of patch "_$G(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($H)
D ALERT(STR)
;
Q
;
;
ALERT(MSG,RECIPS) ;
N DA,DIK,XQA,XQAMSG
S XQAMSG=$G(MSG)
I '$$GOTLOCAL^XMXAPIG("LMI") S XQA("G.LMI")=""
E S XQA(DUZ)=""
I $D(RECIPS) M XQA=RECIPS
D SETUP^XQALERT
Q
;
;
BMES(STR) ;
; Write string
D BMES^XPDUTL($$TRIM^XLFSTR($$CJ^XLFSTR(STR,$G(IOM,80)),"R"," "))
Q
;
;
PROGRESS(LAST) ;
; Prints a "." when NOW > LAST + INT
; Input
; LAST : <byref> The last $H when "." was shown
N INT
S INT=1 ;interval in seconds
I $P($H,",",2)>(+$P(LAST,",",2)+INT) S LAST=$H W "."
Q
;
;
PTG ;
; Pre-Transport Global routine
Q
;
;
MES(STR,CJ,LM) ;
; Display a string using MES^XPDUTL
; Inputs
; STR: String to display
; CJ: Center text? 1=yes 0=1 <dflt=1>
; LM: Left Margin (padding)
N X
S STR=$G(STR)
S CJ=$G(CJ,1)
S LM=$G(LM)
I CJ S STR=$$TRIM^XLFSTR($$CJ^XLFSTR(STR,$G(IOM,80)),"R"," ")
I 'CJ I LM S X="" S $P(X," ",LM)=" " S STR=X_STR
D MES^XPDUTL(STR)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLR458 1585 printed Dec 13, 2024@02:04:04 Page 2
LR458 ;DALOI/JMC - LA*5.2*458 KIDS ROUTINE ;9/2/15 11:40
+1 ;;5.2;AUTOMATED LAB INSTRUMENTS;**458**;Sep 27, 1994;Build 10
+2 ;
PRE ;
+1 ; KIDS Pre install for LA*5.2*458
+2 DO BMES("*** Pre install started ***")
+3 ;
+4 ;
+5 DO BMES("*** Pre install completed ***")
+6 ;
+7 QUIT
+8 ;
+9 ;
POST ;
+1 ; KIDS Post install for LA*5.2*458
+2 DO BMES("*** Post install started ***")
+3 ;
+4 IF $GET(^TMP("LA88A",$JOB,1))
DO RESTORE^LA88A
+5 ;
+6 ;
+7 DO BMES("*** Post install completed ***")
+8 DO BMES("Sending install completion alert to mail group G.LMI")
+9 SET STR="Installation of patch "_$GET(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($HOROLOG)
+10 DO ALERT(STR)
+11 ;
+12 QUIT
+13 ;
+14 ;
ALERT(MSG,RECIPS) ;
+1 NEW DA,DIK,XQA,XQAMSG
+2 SET XQAMSG=$GET(MSG)
+3 IF '$$GOTLOCAL^XMXAPIG("LMI")
SET XQA("G.LMI")=""
+4 IF '$TEST
SET XQA(DUZ)=""
+5 IF $DATA(RECIPS)
MERGE XQA=RECIPS
+6 DO SETUP^XQALERT
+7 QUIT
+8 ;
+9 ;
BMES(STR) ;
+1 ; Write string
+2 DO BMES^XPDUTL($$TRIM^XLFSTR($$CJ^XLFSTR(STR,$GET(IOM,80)),"R"," "))
+3 QUIT
+4 ;
+5 ;
PROGRESS(LAST) ;
+1 ; Prints a "." when NOW > LAST + INT
+2 ; Input
+3 ; LAST : <byref> The last $H when "." was shown
+4 NEW INT
+5 ;interval in seconds
SET INT=1
+6 IF $PIECE($HOROLOG,",",2)>(+$PIECE(LAST,",",2)+INT)
SET LAST=$HOROLOG
WRITE "."
+7 QUIT
+8 ;
+9 ;
PTG ;
+1 ; Pre-Transport Global routine
+2 QUIT
+3 ;
+4 ;
MES(STR,CJ,LM) ;
+1 ; Display a string using MES^XPDUTL
+2 ; Inputs
+3 ; STR: String to display
+4 ; CJ: Center text? 1=yes 0=1 <dflt=1>
+5 ; LM: Left Margin (padding)
+6 NEW X
+7 SET STR=$GET(STR)
+8 SET CJ=$GET(CJ,1)
+9 SET LM=$GET(LM)
+10 IF CJ
SET STR=$$TRIM^XLFSTR($$CJ^XLFSTR(STR,$GET(IOM,80)),"R"," ")
+11 IF 'CJ
IF LM
SET X=""
SET $PIECE(X," ",LM)=" "
SET STR=X_STR
+12 DO MES^XPDUTL(STR)
+13 QUIT