LR302P ;DALOI/FHS - LR*5.2*302 POST INSTALL ROUTINE;31-AUG-2001
;;5.2;LR;**302,1022**;September 20, 2007
;Resolve preinstall data saved in XTMP("LR302",FILE#,IEN,FIELD)=Free Text -
;
; This VA Patch is being included as part of IHS Lab Patch 1022
;
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("LR302",1,0)) D Q
. D BMES^LR302("ERROR CONDITION - Preinstall historical data maybe incomplete.")
. D BMES^LR302("Post-Install repointing process aborted.")
S LRGLB="^XTMP(""LR302"",2)",LRCNT=0,LRFILE=""
K LRFDA
LOOP ;Loop through historical data and restore file
F S LRGLB=$Q(@LRGLB) Q:$QS(LRGLB,1)'="LR302" Q:'$QS(LRGLB,2) D
. I $G(LRFILE)'=$QS(LRGLB,2) D
. . S LRFILE=$QS(LRGLB,2) D BMES^LR302("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("LR302",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("LR302",LRFILE,LRIEN,LRFLD)
. S $P(^XTMP("LR302",1,0),U,3)=LRCNT
. S ^XTMP("LR302",1,LRFILE)=LRIEN
D BMES^LR302("Historical data restored")
D
. N LRIEN
. S LRIEN="" F S LRIEN=$O(^XTMP("LR302",64.2,LRIEN)) Q:LRIEN="" D
. . Q:$O(^XTMP("LR302",64.2,LRIEN,1))
. . K ^XTMP("LR302",64.2,LRIEN)
D MESLMI
Q
ERR ;Record data update error
W !,"ERROR" S ^XTMP("LR302","LRERR",LRCNT)=LRFILE_U_LRIEN_U_LRFLD_U_LRDATA
K LRFDA(LRCNT)
Q
MESLMI ; Notify LIM patch is installed.
N XQA,XQAMSG
D BMES^LR302("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
LR302P ;DALOI/FHS - LR*5.2*302 POST INSTALL ROUTINE;31-AUG-2001
+1 ;;5.2;LR;**302,1022**;September 20, 2007
+2 ;Resolve preinstall data saved in XTMP("LR302",FILE#,IEN,FIELD)=Free Text -
+3 ;
+4 ; This VA Patch is being included as part of IHS Lab Patch 1022
+5 ;
EN ;
+1 IF '$DATA(XPDNM)
QUIT
DD ;Purge .001 from installed files
+1 FOR LRDA=64.2,64.3,64.061,64.062,95.3,95.31
Begin DoDot:1
+2 NEW DA,DIK
+3 SET DA(1)=LRDA
SET DA=.001
SET DIK="^DD("_LRDA_","
+4 DO ^DIK
End DoDot:1
+5 NEW LRGLB,LRFDA,LRDATA
+6 IF '$GET(^XTMP("LR302",1,0))
Begin DoDot:1
+7 DO BMES^LR302("ERROR CONDITION - Preinstall historical data maybe incomplete.")
+8 DO BMES^LR302("Post-Install repointing process aborted.")
End DoDot:1
QUIT
+9 SET LRGLB="^XTMP(""LR302"",2)"
SET LRCNT=0
SET LRFILE=""
+10 KILL LRFDA
LOOP ;Loop through historical data and restore file
+1 FOR
SET LRGLB=$QUERY(@LRGLB)
IF $QSUBSCRIPT(LRGLB,1)'="LR302"
QUIT
IF '$QSUBSCRIPT(LRGLB,2)
QUIT
Begin DoDot:1
+2 IF $GET(LRFILE)'=$QSUBSCRIPT(LRGLB,2)
Begin DoDot:2
+3 SET LRFILE=$QSUBSCRIPT(LRGLB,2)
DO BMES^LR302("Processing data for File/Subfile #"_LRFILE)
End DoDot:2
+4 SET LRIEN=$QSUBSCRIPT(LRGLB,3)
SET LRFLD=$QSUBSCRIPT(LRGLB,4)
SET LRDATA=@LRGLB
SET LRCNT=$GET(LRCNT)+1
+5 IF $SELECT('$GET(LRIEN)
QUIT
+6 IF LRFILE=64.2
Begin DoDot:2
+7 NEW LR642,ERR
+8 SET LR642=$GET(^XTMP("LR302",LRFILE,LRIEN,1))
+9 SET LRIEN=$$FIND1^DIC(LRFILE,"","XO",LR642_" ","C","","ERR")
+10 IF '$GET(LRIEN)
KILL LRIEN
QUIT
+11 SET LRIEN=LRIEN_","
End DoDot:2
+12 IF '$GET(LRIEN)
QUIT
+13 IF LRFILE=64.2
IF LRFLD=1
QUIT
+14 SET LRFDA(LRCNT,LRFILE,LRIEN,LRFLD)=LRDATA
+15 IF LRCNT#200=0
WRITE "."
+16 IF $GET(LRDBUG)=2
WRITE "LRFDA("_LRCNT_","_LRFILE_","_LRIEN_","_LRFLD_") = "_@LRGLB,!
QUIT
+17 KILL LRERR
+18 DO FILE^DIE("KSE","LRFDA("_LRCNT_")","LRERR")
+19 IF $DATA(LRERR)
DO ERR
QUIT
+20 KILL LRFDA(LRCNT)
+21 IF '$GET(LRDBUG)
KILL ^XTMP("LR302",LRFILE,LRIEN,LRFLD)
+22 SET $PIECE(^XTMP("LR302",1,0),U,3)=LRCNT
+23 SET ^XTMP("LR302",1,LRFILE)=LRIEN
End DoDot:1
+24 DO BMES^LR302("Historical data restored")
+25 Begin DoDot:1
+26 NEW LRIEN
+27 SET LRIEN=""
FOR
SET LRIEN=$ORDER(^XTMP("LR302",64.2,LRIEN))
IF LRIEN=""
QUIT
Begin DoDot:2
+28 IF $ORDER(^XTMP("LR302",64.2,LRIEN,1))
QUIT
+29 KILL ^XTMP("LR302",64.2,LRIEN)
End DoDot:2
End DoDot:1
+30 DO MESLMI
+31 QUIT
ERR ;Record data update error
+1 WRITE !,"ERROR"
SET ^XTMP("LR302","LRERR",LRCNT)=LRFILE_U_LRIEN_U_LRFLD_U_LRDATA
+2 KILL LRFDA(LRCNT)
+3 QUIT
MESLMI ; Notify LIM patch is installed.
+1 NEW XQA,XQAMSG
+2 DO BMES^LR302("Sending install completion alert to mail group G.LMI")
+3 ;
+4 SET XQAMSG="Installation of patch "_$GET(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($HOROLOG)
+5 SET XQA("G.LMI")=""
+6 DO SETUP^XQALERT
+7 ;
+8 SET XQAMSG="LIM: Review description for "_$GET(XPDNM,"Unknown patch")_" use KIDS:Utilities:Build File Print"
+9 SET XQA("G.LMI")=""
+10 DO SETUP^XQALERT
+11 QUIT