source: WorldVistAEHR/trunk/r/CMOP-PSX/PSXHENV.m@ 771

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1PSXHENV ;BIR/BAB-CMOP Environment Check-HOST ;[ 04/08/97 2:06 PM ]
2 ;;2.0;CMOP;;11 Apr 97
3START I ^XMB("NETNAME")'["CMOP-" S XPDQUIT=1 Q
4 S XQABT1=$H
5 S ERROR=0
6 I ^XMB("NETNAME")?1"CMOP-".E W !!,"Consolidated Mail Outpatient Pharmacy Install for Host Facility.",!!
7 E S XPDABORT=2 Q
8DUZ S PSXDZ=$S(('($D(DUZ)#2)):1,'$D(^VA(200,DUZ,0)):1,'$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) I PSXDZ=1 W !!,"You must be a valid user and ",!,"DUZ(0) must be set to the ""@"" sign!!",!! S XPDABORT=2 Q
9CKDT I '$D(DT) S %DT="",X="T" D ^%DT S DT=Y
10CKU S PSX=0 I $D(DUZ),DUZ(0)="@",$D(DT),$D(U),PSXDZ=0 G QUIT:$G(ERROR) D ENV G DONE
11QUIT ;
12 S XPDABORT=2 I $G(ERROR)=1 K PSX,PSXDZ,ERROR Q
13DONE I $G(PSXDZ)=0,HOST=1,OP=0,NDF=1,KNL=1 S PSX=1
14 I $G(PSXDZ)=0,HOST=0,OP=1,NDF=1,KNL=1 S PSX=1
15 S:ERROR=1 PSX=0 K ERROR
16 I PSX=0 S XPDABORT=2 W !,"INITIALIZATION ABORTED"
17 K PSX,PKG,KNL,NDF,OP,HOST,PSXDZ,ERROR
18 S (XQABT2,XQABT3)=$H
19 Q
20ENV ;
21 S (HOST,OP,NDF,KNL)=0
22 S:^XMB("NETNAME")?1"CMOP-".E HOST=1
23 ;I $D(^DIC(9.4,"B","OUTPATIENT PHARMACY")) S PKG=$O(^DIC(9.4,"B","OUTPATIENT PHARMACY",0)) I $G(^DIC(9.4,+PKG,"VERSION"))'<"6.0" S OP=1
24 ;I OP'=1,(^XMB("NETNAME")'?1"CMOP-".E) W !,"Outpatient Pharmacy Version 6.0 (or greater) not found. This version is required to continue CMOP installation."
25 I $D(^DIC(9.4,"B","KERNEL")) S PKG=$O(^DIC(9.4,"B","KERNEL",0)) I $G(^DIC(9.4,+PKG,"VERSION"))'<"8.0" S KNL=1
26 I KNL'=1 W !,"Kernel Version 8.0 (or greater) not found. This version is required to continue CMOP installation."
27 I $D(^DIC(9.4,"B","NATIONAL DRUG FILE")) S PKG=$O(^DIC(9.4,"B","NATIONAL DRUG FILE",0)) I $G(^DIC(9.4,+PKG,"VERSION"))'<"3.16" S NDF=1
28 I NDF'=1 W !,"National Drug File Version 3.16 (or greater) not found. This version is required to continue CMOP installation."
29 Q
Note: See TracBrowser for help on using the repository browser.