source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LR302P.m@ 1046

Last change on this file since 1046 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1LR302P ;DALOI/FHS - LR*5.2*302 POST INSTALL ROUTINE;31-AUG-2001
2 ;;5.2;LAB SERVICE;**302**;Sep 27, 1994
3 ;Resolve preinstall data saved in XTMP("LR302",FILE#,IEN,FIELD)=Free Text -
4EN ;
5 Q:'$D(XPDNM)
6DD ;Purge .001 from installed files
7 F LRDA=64.2,64.3,64.061,64.062,95.3,95.31 D
8 . N DA,DIK
9 . S DA(1)=LRDA,DA=.001,DIK="^DD("_LRDA_","
10 . D ^DIK
11 N LRGLB,LRFDA,LRDATA
12 I '$G(^XTMP("LR302",1,0)) D Q
13 . D BMES^LR302("ERROR CONDITION - Preinstall historical data maybe incomplete.")
14 . D BMES^LR302("Post-Install repointing process aborted.")
15 S LRGLB="^XTMP(""LR302"",2)",LRCNT=0,LRFILE=""
16 K LRFDA
17LOOP ;Loop through historical data and restore file
18 F S LRGLB=$Q(@LRGLB) Q:$QS(LRGLB,1)'="LR302" Q:'$QS(LRGLB,2) D
19 . I $G(LRFILE)'=$QS(LRGLB,2) D
20 . . S LRFILE=$QS(LRGLB,2) D BMES^LR302("Processing data for File/Subfile #"_LRFILE)
21 . S LRIEN=$QS(LRGLB,3),LRFLD=$QS(LRGLB,4),LRDATA=@LRGLB,LRCNT=$G(LRCNT)+1
22 . Q:$S('$G(LRIEN):1,'LRFLD:1,'$L(LRDATA):1,1:0)
23 . I LRFILE=64.2 D
24 . . N LR642,ERR
25 . . S LR642=$G(^XTMP("LR302",LRFILE,LRIEN,1))
26 . . S LRIEN=$$FIND1^DIC(LRFILE,"","XO",LR642_" ","C","","ERR")
27 . . I '$G(LRIEN) K LRIEN Q
28 . . S LRIEN=LRIEN_","
29 . Q:'$G(LRIEN)
30 . I LRFILE=64.2,LRFLD=1 Q
31 . S LRFDA(LRCNT,LRFILE,LRIEN,LRFLD)=LRDATA
32 . I LRCNT#200=0 W "."
33 . I $G(LRDBUG)=2 W "LRFDA("_LRCNT_","_LRFILE_","_LRIEN_","_LRFLD_") = "_@LRGLB,! Q
34 . K LRERR
35 . D FILE^DIE("KSE","LRFDA("_LRCNT_")","LRERR")
36 . I $D(LRERR) D ERR Q
37 . K LRFDA(LRCNT)
38 . I '$G(LRDBUG) K ^XTMP("LR302",LRFILE,LRIEN,LRFLD)
39 . S $P(^XTMP("LR302",1,0),U,3)=LRCNT
40 . S ^XTMP("LR302",1,LRFILE)=LRIEN
41 D BMES^LR302("Historical data restored")
42 D
43 . N LRIEN
44 . S LRIEN="" F S LRIEN=$O(^XTMP("LR302",64.2,LRIEN)) Q:LRIEN="" D
45 . . Q:$O(^XTMP("LR302",64.2,LRIEN,1))
46 . . K ^XTMP("LR302",64.2,LRIEN)
47 D MESLMI
48 Q
49ERR ;Record data update error
50 W !,"ERROR" S ^XTMP("LR302","LRERR",LRCNT)=LRFILE_U_LRIEN_U_LRFLD_U_LRDATA
51 K LRFDA(LRCNT)
52 Q
53MESLMI ; Notify LIM patch is installed.
54 N XQA,XQAMSG
55 D BMES^LR302("Sending install completion alert to mail group G.LMI")
56 ;
57 S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($H)
58 S XQA("G.LMI")=""
59 D SETUP^XQALERT
60 ;
61 S XQAMSG="LIM: Review description for "_$G(XPDNM,"Unknown patch")_" use KIDS:Utilities:Build File Print"
62 S XQA("G.LMI")=""
63 D SETUP^XQALERT
64 Q
Note: See TracBrowser for help on using the repository browser.