source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LR317.m@ 1604

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1LR317 ;DALOI/KLL - LR*5.2*317 PATCH ENVIRONMENT CHECK ROUTINE ;09/21/02
2 ;;5.2;LAB SERVICE;**317**;Sep 27, 1994
3EN ; Does not prevent loading of the transport global.
4 ; Environment check is done only during the install.
5 ;
6 I '$G(XPDENV) D Q
7 .N XQA,XQAMSG
8 .S XQAMSG="Transport global for patch "_$G(XPDNM,"Unknown patch")
9 .S XQAMSG=XQAMSG_" loaded on "_$$HTE^XLFDT($H)
10 .S XQA("G.LMI")=""
11 .D SETUP^XQALERT
12 .S MSG="Sending transport global loaded alert to mail group G.LMI"
13 .D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
14 ;
15 D CHECK
16 D EXIT
17 Q
18 ;
19CHECK ; Perform environment check
20 ;
21 I $S('$G(IOM):1,'$G(IOSL):1,$G(U)'="^":1,1:0) D Q
22 .D BMES^XPDUTL($$CJ^XLFSTR("Terminal Device is not defined",80))
23 .S XPDQUIT=2
24 ;
25 I $S('$G(DUZ):1,$D(DUZ)[0:1,$D(DUZ(0))[0:1,1:0) D Q
26 .S MSG="Please log in to set local DUZ... variables"
27 .D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
28 .S XPDQUIT=2
29 ;
30 I '$D(^VA(200,$G(DUZ),0))#2 D Q
31 .S MSG="You are not a valid user on this system"
32 .D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
33 .S XPDQUIT=2
34 ;
35 S XPDIQ("XPZ1","B")="NO"
36 ;
37 Q:'$$PROD^XUPROD ;LINE ADDED FOR TEST SITES
38 ;CHECK FOR UNRELEASED SUPPLEMENTARY REPORTS FROM JUNE 7,2004
39 S MSG="Unreleased supplemental report(s) from July 23,2003 until present- must be released before install."
40 D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
41 S LRSS="AU",LRSDT=3030723-.01 D S LRSS="CY",LRSDT=3030723-.01 D S LRSS="EM",LRSDT=3030723-.01 D S LRSS="SP",LRSDT=3030723-.01 D
42 .S LRXR="A"_LRSS
43 .F S LRSDT=$O(^LR(LRXR,LRSDT)) Q:'LRSDT S LRDFN=0 F S LRDFN=$O(^LR(LRXR,LRSDT,LRDFN)) Q:'LRDFN D
44 ..S LRI=0 F S LRI=$O(^LR(LRXR,LRSDT,LRDFN,LRI)) Q:'LRI D
45 ...S LRNUM=0 F S LRNUM=$O(^LR(LRDFN,LRSS,LRI,1.2,LRNUM)) Q:'LRNUM D
46 ....I LRSS'="AU" S LRX=$G(^LR(LRDFN,LRSS,LRI,1.2,LRNUM,0))
47 ....I LRSS="AU" S LRX=$G(^LR(LRDFN,84,LRNUM,0))
48 ....S LRRLS2=+$P(LRX,"^",2)
49 ....I 'LRRLS2 D
50 .....I $G(^LR(LRDFN,0)) S LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3)
51 .....I LRDPF=2 S PNM=$P(^DPT(DFN,0),U)
52 .....I LRDPF'=2 D
53 ......S X=$$GET1^DID(1,LRDPF,"","GLOBAL NAME","ANS","ANS1")
54 ......S X=X_DFN_",0)",X=$S($D(@X):@X,1:"") S PNM=$P(X,U)
55 .....S MSG="Name: "_PNM_" Accession: "_$P(^LR(LRDFN,LRSS,LRI,0),U,6)
56 .....D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
57 .....S XPDQUIT=2
58 ;
59 Q
60 ;
61EXIT ;
62 I $G(XPDQUIT) D
63 .S MSG="--- Install Environment Check FAILED ---"
64 .D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
65 I '$G(XPDQUIT) D
66 .D BMES^XPDUTL($$CJ^XLFSTR("--- Environment Check is Ok ---",80))
67 Q
68 ;
69PRE ; KIDS Pre install for LR*5.2*317
70 ;
71 N XQA,XQAMSG
72 S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")
73 S XQAMSG=XQAMSG_" started on "_$$HTE^XLFDT($H)
74 S XQA("G.LMI")=""
75 D SETUP^XQALERT
76 ;
77 S MSG="Sending install started alert to mail group G.LMI"
78 D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
79 ;
80 D BMES^XPDUTL($$CJ^XLFSTR("*** Pre install started ***",80))
81 ;
82 S Y=$$OPTDE^XPDUTL("LRAP",2)
83 S MSG="Disabling Anatomic Pathology [LRAP] option"
84 D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
85 ;
86 D BMES^XPDUTL($$CJ^XLFSTR("*** Pre install completed ***",80))
87 ;
88 Q
89 ;
90POST ; KIDS Post install for LR*5.2*317
91 ;
92 N XQA,XQAMSG
93 D BMES^XPDUTL($$CJ^XLFSTR("*** Post install started ***",80))
94 ;
95 S Y=$$OPTDE^XPDUTL("LRAP",1)
96 S MSG="Enabling Anatomic Pathology [LRAP] option"
97 D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
98 ;
99 D BMES^XPDUTL($$CJ^XLFSTR("*** Post install completed ***",80))
100 ;
101 S XQAMSG="Installation of patch "_$G(XPDNM,"Unknown patch")
102 S XQAMSG=XQAMSG_" completed on "_$$HTE^XLFDT($H)
103 S XQA("G.LMI")=""
104 D SETUP^XQALERT
105 ;
106 S MSG="Sending install completion alert to mail group G.LMI"
107 D BMES^XPDUTL($$CJ^XLFSTR(MSG,80)) K MSG
108 ;
109 Q
Note: See TracBrowser for help on using the repository browser.