[613] | 1 | PSXPRE ;BIR/BAB-CMOP Pre-Initialization ;[ 02/22/96 1:09 PM ]
|
---|
| 2 | ;;1.0;CONSOLIDATED MAIL OUTPATIENT PHARMACY;**3**;10 May 95
|
---|
| 3 | START S XQABT1=$H
|
---|
| 4 | I ^XMB("NETNAME")?1"CMOP-".E W !!,"Consolidated Mail Outpatient Pharmacy Install for Host Facility.",!!
|
---|
| 5 | I ^XMB("NETNAME")'?1"CMOP-".E W !!,"Consolidated Mail Outpatient Pharmacy Install for Remote Medical Center.",!!
|
---|
| 6 | DUZ 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!!",!! K DIFQ Q
|
---|
| 7 | CKDT I '$D(DT) S %DT="",X="T" D ^%DT S DT=Y
|
---|
| 8 | ASK I ^XMB("NETNAME")?1"CMOP-".E G CKU
|
---|
| 9 | I ($G(^PSX(550,0))["CMOP SYSTEM^550I")&($P($G(^PSX(550,0)),"^",3)>0) G CKU
|
---|
| 10 | W !!,*7,"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",DIR("A")="Select the CMOP to RECEIVE YOUR DATA " D ^DIR K DIR
|
---|
| 12 | I "BDLW"'[$E(X) K DIFQ Q
|
---|
| 13 | S ^TMP("PSXCMOP",$J)="CMOP-"_$S($E(X)="L":"LEAV",$E(X)="B":"BED",$E(X)="D":"DAL",$E(X)="W":"WLA")_".MED.VA.GOV"
|
---|
| 14 | CKU S PSX=0 I $D(DUZ),DUZ(0)="@",$D(DT),$D(U),PSXDZ=0 D RXC G QUIT:ERROR D ENV G DONE
|
---|
| 15 | QUIT ;
|
---|
| 16 | K DIFQ I $G(ERROR)=1 K PSX,PSXDZ,ERROR Q
|
---|
| 17 | DONE I $G(PSXDZ)=0,HOST=1,OP=0,NDF=1,KNL=1 S PSX=1
|
---|
| 18 | I $G(PSXDZ)=0,HOST=0,OP=1,NDF=1,KNL=1 S PSX=1
|
---|
| 19 | S:ERROR=1 PSX=0 K ERROR
|
---|
| 20 | K:PSX=0 DIFQ
|
---|
| 21 | K PSX,PKG,KNL,NDF,OP,HOST,PSXDZ,ERROR
|
---|
| 22 | S (XQABT2,XQABT3)=$H
|
---|
| 23 | Q
|
---|
| 24 | ENV ;
|
---|
| 25 | S (HOST,OP,NDF,KNL)=0
|
---|
| 26 | S:^XMB("NETNAME")?1"CMOP-".E HOST=1
|
---|
| 27 | I $D(^DIC(9.4,"B","OUTPATIENT PHARMACY")) S PKG=$O(^DIC(9.4,"B","OUTPATIENT PHARMACY",0)) S:$G(^DIC(9.4,+PKG,"VERSION"))="6.0" OP=1
|
---|
| 28 | I $D(^DIC(9.4,"B","KERNEL")) S PKG=$O(^DIC(9.4,"B","KERNEL",0)) S:$G(^DIC(9.4,+PKG,"VERSION"))'<7.1 KNL=1
|
---|
| 29 | I $D(^DIC(9.4,"B","NATIONAL DRUG FILE")) S PKG=$O(^DIC(9.4,"B","NATIONAL DRUG FILE",0)) S:$G(^DIC(9.4,+PKG,"VERSION"))["3.1" NDF=1
|
---|
| 30 | Q
|
---|
| 31 | RXC ;
|
---|
| 32 | I $P(^XMB("NETNAME"),"-")="CMOP" S ERROR=0 Q
|
---|
| 33 | W !!,"Validating required RX CONSULT FILE entries......"
|
---|
| 34 | 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
|
---|
| 35 | K ^TMP("PSXDIC",$J),^TMP("PSXDD",$J),^TMP("PSXPS",$J)
|
---|
| 36 | S (ERROR,RXC)=0 I '$D(^PS(54)) W !!,"You do not have an RX CONSULT FILE........INITIALIZATION ABORTED!",!! S ERROR=1 Q
|
---|
| 37 | F X=1:1:20 S Y=$P($T(CON+X),";;",2) I $P(^PS(54,X,0),"^")'=Y S ERROR=1 W !,"Your RX CONSULT File entry # "_X_" is invalid.!!"
|
---|
| 38 | W:ERROR=1 !!,"INITIALIZATION ABORTED!",!! K RXC,X,Y
|
---|
| 39 | N %X,%Y S %X="^DIC(54,",%Y="^TMP(""PSXDIC"",$J," D %XY^%RCR
|
---|
| 40 | N %X,%Y S %X="^DD(54,",%Y="^TMP(""PSXDD"",$J," D %XY^%RCR
|
---|
| 41 | N %X,%Y S %X="^PS(54,",%Y="^TMP(""PSXPS"",$J," D %XY^%RCR
|
---|
| 42 | Q
|
---|
| 43 | CON ;
|
---|
| 44 | ;;DROWSINESS
|
---|
| 45 | ;;FINISH
|
---|
| 46 | ;;EMPTY STOMACH
|
---|
| 47 | ;;NO DAIRY PRODUCTS
|
---|
| 48 | ;;WATER
|
---|
| 49 | ;;DISCOLORATION
|
---|
| 50 | ;;DIURETIC K
|
---|
| 51 | ;;NO ALCOHOL
|
---|
| 52 | ;;ADVICE
|
---|
| 53 | ;;WITH FOOD
|
---|
| 54 | ;;SUNLIGHT
|
---|
| 55 | ;;SHAKE WELL
|
---|
| 56 | ;;EXTERNAL
|
---|
| 57 | ;;STRENGTH
|
---|
| 58 | ;;REFRIGERATE
|
---|
| 59 | ;;DUPLICATE
|
---|
| 60 | ;;EXPIRATION DATE
|
---|
| 61 | ;;NO REFILL
|
---|
| 62 | ;;SAME DRUG
|
---|
| 63 | ;;NO TRANSFER
|
---|