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

LR334P.m

Go to the documentation of this file.
LR334P ;VA/DALOI/FHS - LR*5.2*334 POST INSTALL ROUTINE;31-AUG-2001
 ;;5.2;LAB SERVICE;**1028**;NOV 01, 1997;Build 53
 ;;5.2;LAB SERVICE;**334**;Sep 27, 1994;Build 45
 ;Resolve preinstall data saved in XTMP("LR334",FILE#,IEN,FIELD)=Free Text  - 
EN ;
 Q:'$D(XPDNM)
DD ;Purge .001 from installed files
 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 LRGLB,LRFDA,LRDATA
 I '$G(^XTMP("LR334",1,0)) D  Q
 . D BMES^LR334("ERROR CONDITION - Preinstall historical data maybe incomplete.")
 . D BMES^LR334("Post-Install repointing process aborted.")
 S LRGLB="^XTMP(""LR334"",2)",LRCNT=0,LRFILE=""
 K LRFDA
LOOP ;Loop through historical data and restore file
 F  S LRGLB=$Q(@LRGLB) Q:$QS(LRGLB,1)'="LR334"  Q:'$QS(LRGLB,2)  D
 . I $G(LRFILE)'=$QS(LRGLB,2) D
 . . S LRFILE=$QS(LRGLB,2) D BMES^LR334("Processing data for File/Subfile #"_LRFILE)
 . S LRIEN=$QS(LRGLB,3),LRFLD=$QS(LRGLB,4),LRDATA=@LRGLB,LRCNT=$G(LRCNT)+1
 . Q:$S('$G(LRIEN):1,'LRFLD:1,'$L(LRDATA):1,1:0)
 . I LRFILE=64.2 D
 . . N LR642,ERR
 . . S LR642=$G(^XTMP("LR334",LRFILE,LRIEN,1))
 . . S LRIEN=$$FIND1^DIC(LRFILE,"","XO",LR642_" ","C","","ERR")
 . . I '$G(LRIEN) K LRIEN Q
 . . S LRIEN=LRIEN_","
 . Q:'$G(LRIEN)
 . I LRFILE=64.2,LRFLD=1 Q
 . S LRFDA(LRCNT,LRFILE,LRIEN,LRFLD)=LRDATA
 . I LRCNT#200=0 W "."
 . I $G(LRDBUG)=2 W "LRFDA("_LRCNT_","_LRFILE_","_LRIEN_","_LRFLD_") = "_@LRGLB,! Q
 . K LRERR
 . D FILE^DIE("KSE","LRFDA("_LRCNT_")","LRERR")
 . I $D(LRERR) D ERR Q
 . K LRFDA(LRCNT)
 . I '$G(LRDBUG) K ^XTMP("LR334",LRFILE,LRIEN,LRFLD)
 . S $P(^XTMP("LR334",1,0),U,3)=LRCNT
 . S ^XTMP("LR334",1,LRFILE)=LRIEN
 D BMES^LR334("Historical data restored")
 D
 . N LRIEN
 . S LRIEN="" F  S LRIEN=$O(^XTMP("LR334",64.2,LRIEN)) Q:LRIEN=""  D
 . . Q:$O(^XTMP("LR334",64.2,LRIEN,1))
 . . K ^XTMP("LR334",64.2,LRIEN)
 D MESLMI
 Q
ERR ;Record data update error
 W !,"ERROR" S ^XTMP("LR334","LRERR",LRCNT)=LRFILE_U_LRIEN_U_LRFLD_U_LRDATA
 K LRFDA(LRCNT)
 Q
MESLMI ; Notify LIM patch is installed.
 N XQA,XQAMSG
 D BMES^LR334("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
 ;
 S XQAMSG="LIM: Review description for "_$G(XPDNM,"Unknown patch")_" use KIDS:Utilities:Build File Print"
 S XQA("G.LMI")=""
 D SETUP^XQALERT
 Q