source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LR334.m@ 862

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

initial load of WorldVistAEHR

File size: 3.1 KB
RevLine 
[613]1LR334 ;DALOI/FHS - LR*5.2*334 PATCH ENVIRONMENT CHECK ROUTINE;31-AUG-2001
2 ;;5.2;LAB SERVICE;**334**;Sep 27, 1994;Build 12
3 ;; IA# 4640 Set file/field implementation statusSet file/field implementation status
4ENV ; Does not prevent loading of the transport global.
5 ; Environment check is done only during the install.
6 ;
7 N XQA,XQAMSG
8 ;
9CHKNM ; Make sure the patch name exist
10 S XUMF=1
11 I '$D(XPDNM) D G EXIT
12 . D BMES("No valid patch name exist")
13 . S XPDQUIT=2
14 ;
15 D CHECK
16 D EXIT
17 Q
18 ;
19CHECK ; Perform environment check
20 I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) D
21 . D BMES("Terminal Device is not defined")
22 . S XPDQUIT=2
23 I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) D
24 . D BMES("Please log in to set local DUZ... variables")
25 . S XPDQUIT=2
26 I $P($$ACTIVE^XUSER(DUZ),"^")'=1 D
27 . D BMES("You are not a valid user on this system")
28 . S XPDQUIT=2
29 S XPDIQ("XPZ1","B")="NO" Q
30EXIT ;
31 N XQA
32 I $G(XPDQUIT) D BMES("--- Install Environment Check FAILED ---") Q
33 D BMES("--- Environment Check is Ok ---")
34 S XQAMSG="Loading of patch "_$G(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($H)
35 D BMES("Sending install loaded alert to mail group G.LMI")
36 S XQA("G.LMI")=""
37 D SETUP^XQALERT
38 H 5
39 Q
40 ;
41PRE ;Pre-install entry point
42 Q:'$D(XPDNM)
43 ;Remove old data
44 D
45 . N DIK,DA,DIU
46 . S DIK="^DD(60,",DA(1)=60,DA=64 D ^DIK K DIK
47 . S DIK="^DD(64,",DA(1)=64,DA=25 D ^DIK K DIK
48 . S DIU="^LAB(64.81,",DIU(0)="DS" D EN^DIU2
49 . K DIU
50 . S DIU="^LAB(95.3,",DIU(0)="DS" D EN^DIU2
51 . K DIU
52 . S DIU="^LAB(95.31,",DIU(0)="DS" D EN^DIU2
53 . K DIU
54 . S DIU="^LAB(64.061,",DIU(0)="DS" D EN^DIU2
55 . K DIU
56 . S DIU="^LAB(64.2,",DIU(0)="DS" D EN^DIU2
57 . K DIU
58 . S DIU="^LAB(64.3,",DIU(0)="DS" D EN^DIU2
59 . K DIU
60 . S DIU="^LAB(64.062",DIU(0)="DS" D EN^DIU2
61 . K DIU
62 D BMES("*** Preinstall completed ***")
63 Q
64POST ;Post install
65 D POST^LR334PO
66DD ;Purge .001 from installed files
67 I '$G(LRDBUG) D
68 . F LRDA=64.2,64.3,64.061,64.062,95.3,95.31 D
69 . . N DA,DIK
70 . . S DA(1)=LRDA,DA=.001,DIK="^DD("_LRDA_","
71 . . D ^DIK
72 . N DIK
73 . S DIK="^LAM(" D IXALL^DIK
74 D
75 . S $P(^LAM(0),U,3)=99999,LRVR="2.14"_$T(+2)
76 . S ^LAM("VR")=LRVR
77 . N LRI
78 . F LRI=64.061,64.2,64.21,64.22,64.3,95.3,95.31 I $D(^LAB(LRI,0))#2 S ^LAB(LRI,"VR")=LRVR
79 I $T(SETSTAT^HDISVF01)'="" D
80 . D SETSTAT^HDISVF01(95.3,"",6,"")
81 D
82 . D BMES("Sending install completion alert to mail group G.LMI")
83 . S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")_" completed on "_$$HTE^XLFDT($H)
84 . S XQA("G.LMI")=""
85 . D SETUP^XQALERT
86 K LRDA,LRPRT,LRVR
87 Q
88BMES(STR) ;Write BMES^XPDUTL statements
89 D BMES^XPDUTL($$CJ^XLFSTR(STR,IOM))
90 Q
91MAIL ;Send message to G.LMI local mail group of added 64 codes
92 N DIFROM,XMSUB,XMDUZ,XMTEXT,XMY,LRIEN,LRN
93NEWLST ;Build list of added WKLD CODES
94 ;D BMES("Building List Of Added NLT CODEs")
95 K LRLAST64
96 I '$O(^XTMP("LRNLT","LR334",1,3)) D
97 . I '$G(LRPRT) D
98 . . D SCR^LR334PO("No WKLD CODES Added to Database")
99 D BMES("Sending message to LMI Mail Group.")
100 D
101 . NEW XMSUB,XMY,XMTEST,XMDUZ
102 . S XMSUB="ADDED WKLD CODE REPORT "_$$FMTE^XLFDT($$NOW^XLFDT,"1S")
103 . S XMY("G.LMI")="",XMTEXT="^XTMP(""LRNLT"",""LR334"",1,",XMDUZ=.5
104 . D ^XMD
105 . D BMES("List Of Added WKLD CODEs Complete")
106 Q
Note: See TracBrowser for help on using the repository browser.