source: FOIAVistA/tag/r/CMOP-PSX/PSXRENV.m@ 628

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

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1PSXRENV ;BIR/BAB-CMOP Pre-Initialization ;[ 04/08/97 2:06 PM ]
2 ;;2.0;CMOP;;11 Apr 97
3START I ^XMB("NETNAME")?1"CMOP-".E S XPDQUIT=1 Q
4 S XQABT1=$H
5 I ^XMB("NETNAME")'?1"CMOP-".E W !!,"Consolidated Mail Outpatient Pharmacy Install for Remote Medical Center.",!!
6DUZ 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
7CKDT I '$D(DT) S %DT="",X="T" D ^%DT S DT=Y
8 I ($G(^PSX(550,0))["CMOP SYSTEM^550I")&($P($G(^PSX(550,0)),"^",3)>0) G CKU
9 I XPDENV=0 G CKU
10 W !!,"This install of the Consolidated Mail Outpatient Pharmacy",!,"software at your medical center requires that you select the CMOP Host",!,"Facility which will be receiving your Outpatient Pharmacy prescription data.",!!
11 S DIR(0)="SX^B:BEDFORD;D:DALLAS;L:LEAVENWORTH;W:WEST LA;M:MURFREESBORO;H:HINES",DIR("A")="Select the CMOP to RECEIVE YOUR DATA " D ^DIR K DIR
12 I "BDLWMH"'[$E(X) S XPDABORT=2 Q
13 S ^TMP("PSXCMOP",$J)="CMOP-"_$S($E(X)="L":"LEAV",$E(X)="B":"BED",$E(X)="D":"DAL",$E(X)="W":"WLA",$E(X)="M":"MURF",$E(X)="H":"HINES")_".MED.VA.GOV"
14 D BMES^XPDUTL("You have chosen "_Y(0)_" CMOP to receive your transmissions.")
15 I '$O(^DIC(4.2,"B",^TMP("PSXCMOP",$J),0)) D BMES^XPDUTL("There is no Mailmain Domain entry for "_Y(0)_". Please add this domain to your system and re-run the CMOP installation. Discontinuing installation....") S XPDABORT=2 Q
16CKU S PSX=0 I $D(DUZ),DUZ(0)="@",$D(DT),$D(U),PSXDZ=0 D RXC G QUIT:ERROR D ENV G DONE
17QUIT ;
18 S XPDABORT=2 I $G(ERROR)=1 K PSX,PSXDZ,ERROR Q
19DONE I $G(PSXDZ)=0,HOST=0,OP=1,NDF=1,KNL=1 S PSX=1
20 S:ERROR=1 PSX=0 K ERROR
21 I PSX=0 S XPDABORT=2 W !,"INITIALIZATION ABORTED"
22 K PSX,PKG,KNL,NDF,OP,HOST,PSXDZ,ERROR
23 S (XQABT2,XQABT3)=$H
24 S XPDQUIT("CMOPH 2.0T5")=1
25 Q
26ENV ;
27 S (HOST,OP,NDF,KNL)=0
28 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
29 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."
30 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
31 I KNL'=1 W !,"Kernel Version 8.0 (or greater) not found. This version is required to continue CMOP installation."
32 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
33 I NDF'=1 W !,"National Drug File Version 3.16 (or greater) not found. This version is required to continue CMOP installation."
34 Q
35RXC ;
36 W !!,"Validating required RX CONSULT FILE entries......"
37 I $G(^DIC(54,0,"GL"))'["^PS(54," W !!,"You must have Outpatient Pharmacy patch PSO*6*148 installed before installing CMOP Software.",!,"...INITIALIZATION ABORTED!",!! S ERROR=1 Q
38 S (ERROR,RXC)=0 I '$D(^PS(54)) W !!,"You do not have an RX CONSULT FILE........INITIALIZATION ABORTED!",!! S ERROR=1 Q
39 F XC=1:1:20 S YC=$P($T(CON+XC),";;",2) I $P(^PS(54,XC,0),"^")'=YC S ERROR=1 W !,"Your RX CONSULT File entry # "_$G(XC)_" is invalid.!!"
40 W:ERROR=1 !!,"INITIALIZATION ABORTED!",!! K RXC,XC,YC
41 Q
42CON ;
43 ;;DROWSINESS
44 ;;FINISH
45 ;;EMPTY STOMACH
46 ;;NO DAIRY PRODUCTS
47 ;;WATER
48 ;;DISCOLORATION
49 ;;DIURETIC K
50 ;;NO ALCOHOL
51 ;;ADVICE
52 ;;WITH FOOD
53 ;;SUNLIGHT
54 ;;SHAKE WELL
55 ;;EXTERNAL
56 ;;STRENGTH
57 ;;REFRIGERATE
58 ;;DUPLICATE
59 ;;EXPIRATION DATE
60 ;;NO REFILL
61 ;;SAME DRUG
62 ;;NO TRANSFER
Note: See TracBrowser for help on using the repository browser.