source: FOIAVistA/trunk/r/MEDICINE-MC/MCENV00.m@ 1518

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

initial load of FOIAVistA 6/30/08 version

File size: 4.1 KB
Line 
1MCENV00 ;WISC/DAD-ENVIRONMENT CHECK ROUTINE ;9/9/96 07:38
2 ;;2.3;Medicine;;09/13/1996
3 ;
4 S ^XTMP("MC",0)=$$FMADD^XLFDT(DT,30)_U_DT_U_"Medicine 2.3 Installation"
5 S XPDNOQUE=1 ; *** Prevent user from queing the installation ***
6 D GETVER
7 D FILCHK
8 D PCHCHK
9 I $G(XPDENV)=1 D
10 . D ASKDEL
11 . D ASKDEV
12 . Q
13 Q
14 ;
15GETVER ; Get version of Medicine package installed
16 N VERSION
17 W !!,"Checking for previous version of the medicine package."
18 S VERSION=$P($T(MCARE+1^MCARE),";",3)
19 I VERSION["VERSION" S VERSION=$P(VERSION,"VERSION ",2)
20 S ^XTMP("MC","VER")=VERSION
21 I VERSION]"" D
22 . W !!,"Found Medicine package version ",VERSION,"."
23 . I VERSION<2 D
24 .. W !!,"You are running a version of the Medicine package less"
25 .. W !,"than 2.0. Medicine 2.3 can only install over top of"
26 .. W !,"version 2.0, 2.2, or in a virgin account."
27 .. Q
28 . Q
29 E D
30 . W !!,"Medicine package not found."
31 . Q
32 Q
33 ;
34ASKDEL ; Ask about deletion of Medicine if version is < 2.0
35 N VERSION
36 S VERSION=^XTMP("MC","VER"),^XTMP("MC","DEL")=0
37 I VERSION]"",VERSION<2 D
38 . N DIR
39 . S DIR(0)="Y"
40 . S DIR("A",1)="Cannot install over version "_VERSION_"."
41 . S DIR("A")="Delete old Medicine files and data"
42 . S DIR("B")="No"
43 . S DIR("?")="Please answer YES or NO"
44 . S DIR("?",1)="You are running a version of the Medicine package less"
45 . S DIR("?",2)="than 2.0. Medicine 2.3 can only install over top of"
46 . S DIR("?",3)="version 2.0, 2.2, or in a virgin account. If you"
47 . S DIR("?",4)="answer YES to this question, ALL MEDICINE FILES AND"
48 . S DIR("?",5)="DATA WILL BE DELETED. If you answer NO, the"
49 . S DIR("?",6)="installation will abort."
50 . W ! D ^DIR I Y'=1 S XPDABORT=2 Q
51 . K DIR
52 . S DIR(0)="Y"
53 . S DIR("A",1)="All Medicine files and data will be deleted!"
54 . S DIR("A")="Are you sure"
55 . S DIR("B")="No"
56 . S DIR("?")="Please answer YES or NO"
57 . S DIR("?",1)="Answering YES to this question will cause the deletion"
58 . S DIR("?",2)="of all Medicine files and data."
59 . S DIR("?",3)=""
60 . W ! D ^DIR I Y'=1 S XPDABORT=2 Q
61 . S ^XTMP("MC","DEL")=1
62 . Q
63 Q
64 ;
65FILCHK ; Check to see if required files are present
66 N CHECK,FILENAME,FILENUM,INSVER,LOOP,PACKAGE,REQVER,ABORT
67 W !!,"Checking for minimum required package versions." S ABORT=0
68 F LOOP=1:1 S CHECK=$P($T(REQFILE+LOOP),";;",2) Q:CHECK="" D
69 . S FILENUM=$P(CHECK,U,1),FILENAME=$$GET1^DID(FILENUM,"","","NAME")
70 . S PACKAGE=$P(CHECK,U,2),REQVER=$P(CHECK,U,3)
71 . S INSVER=+$$GET1^DID(FILENUM,"","","VERSION")
72 . I INSVER'>0 S INSVER=$$VERSION^XPDUTL($P(CHECK,U,4))
73 . I ($$VFILE^DILFD(FILENUM)=0)!(INSVER<REQVER) D
74 .. S ABORT=1
75 .. W !!,"The Medicine Package requires the "_FILENAME
76 .. W !,"file (#"_FILENUM_") from the "_PACKAGE
77 .. W !,"package, minimum version "_REQVER_"."
78 .. Q
79 . Q
80 I ABORT D
81 . S XPDABORT=2
82 . W !!,"Missing or insufficient version of"
83 . W "file(s), aborting installation."
84 . Q
85 E D
86 . W !!,"All required files found."
87 . Q
88 Q
89 ;
90PCHCHK ; Check for patch DI*21*25
91 W !!,"Checking for patch DI*21*25."
92 I $$PATCH^XPDUTL("DI*21.0*25")'>0 D
93 . W !,"Patch not found, aborting installation."
94 . S XPDABORT=2
95 . Q
96 E D
97 . W !,"Patch found."
98 . Q
99 Q
100 ;
101ASKDEV ; Ask device to print conversion reports to
102 N VERSION
103 S VERSION=+^XTMP("MC","VER"),^XTMP("MC","DEV")=""
104 I VERSION'=2 Q
105 N %ZIS,IOP,MC,POP
106 F MC=1:1:2 D Q:'POP
107 . K %ZIS,IOP,POP
108 . S %ZIS="NQ",%ZIS("A")="Device for conversion reports (required): "
109 . S %ZIS("B")=""
110 . S %ZIS("S")="I $$GET1^DIQ(3.2,+$P($G(^%ZIS(1,+Y,""SUBTYPE"")),U),.01)?1""P-"".E"
111 . W ! D ^%ZIS
112 . I POP,MC=1 W !!,"You must enter a device name!"
113 . Q
114 I POP D
115 . S XPDABORT=2
116 . W !!,"No device selected, aborting installation."
117 . Q
118 E D
119 . S ^XTMP("MC","DEV")="Q;"_ION_";"_IOST_";"_IOM_";"_IOSL
120 . Q
121 Q
122 ;
123REQFILE ; File# ^ Package_Name ^ Minimum_Required_Version
124 ;;2^PIMS^5.3^DPT
125 ;;50^OUTPATIENT PHARMACY^2.2^PSO
126 ;;55^OUTPATIENT PHARMACY^2.2^PSO
127 ;;61^LAB SERVICE^5.1^LA
128 ;;61.1^LAB SERVICE^5.1^LA
129 ;;61.3^LAB SERVICE^5.1^LA
130 ;;61.5^LAB SERVICE^5.1^LA
131 ;;80^DRG GROUPER^5.3^ICD
132 ;;100^ORDER ENTRY/RESULTS REPORTING^2.5^OR
133 ;;101^ORDER ENTRY/RESULTS REPORTING^2.5^OR
134 ;;120.8^ADVERSE REACTION TRACKING^2.2^GMRA
135 ;;123^CONSULT/REQUEST TRACKING^2.5^GMRC
136 ;;
Note: See TracBrowser for help on using the repository browser.