PSDINPRE ;BIR/DMA-Pre Init for Controlled Substances ; 18 May 92
;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
S XQABT1=$H
I $D(DUZ),$D(DUZ)#2,$D(^VA(200,+DUZ,0)),$D(DUZ(0)),DUZ(0)="@" S (XQABT2,XQABT3)=$H G CHECK
W !!,$C(7),"You must be a defined user with DUZ(0)=""@""",!
S XPDQUIT=2 Q
CHECK ;check for required packages
N PSD S PSD(1)=" is required"
I $$VERSION^XPDUTL("XU")<8 W !,"KERNEL VERSION 3.0",PSD(1),!! S PSD=1
I $$VERSION^XPDUTL("VA FILEMAN")<21 W !,"VA FILEMAN VERSION 21.0",PSD(1),!! S PSD=1
I $$VERSION^XPDUTL("XM")<7.1 W !,"MAILMAN VERSION 7.1",PSD(1),!! S PSD=1
I $$VERSION^XPDUTL("NUR")<2.5 W !,"NURSING VERSION 2.5",PSD(1),!! S PSD=1
I $$VERSION^XPDUTL("PSO")<6 W !,"OUTPATIENT PHARMACY VERSION 6.0",PSD(1),!! S PSD=1
I $$VERSION^XPDUTL("AUTO REPLENISHMENT/WARD STOCK")<2.2 W !,"AUTO REPLENISHMENT/WARD STOCK VERSION 2.2",PSD(1),!! S PSD=1
I $$VERSION^XPDUTL("INPATIENT MEDICATIONS")<4 W !,"INPATIENT MEDICATIONS VERSION 4.0",PSD(1),!! S PSD=1
I $$VERSION^XPDUTL("PSA")<2 W !,"DRUG ACCOUNTABILITY VERSION 2.0",PSD(1),!! S PSD=1
I $$VERSION^XPDUTL("IB")<2 W !,"INTEGRATED BILLING VERSION 2.0",PSD(1),!! S PSD=1
I $$VERSION^XPDUTL("HL")<1.6 W !,"HEALTH LEVEL 7 VERSION 1.6",PSD(1),!! S PSD=1
I $G(PSD) W "for CONTROLLED SUBSTANCES VERSION 3.0.",!!,"Installation cannot proceed.",! S XPDQUIT=1
Q
PSDINPRE ;BIR/DMA-Pre Init for Controlled Substances ; 18 May 92
+1 ;;3.0; CONTROLLED SUBSTANCES ;;13 Feb 97
+2 SET XQABT1=$HOROLOG
+3 IF $DATA(DUZ)
IF $DATA(DUZ)#2
IF $DATA(^VA(200,+DUZ,0))
IF $DATA(DUZ(0))
IF DUZ(0)="@"
SET (XQABT2,XQABT3)=$HOROLOG
GOTO CHECK
+4 WRITE !!,$CHAR(7),"You must be a defined user with DUZ(0)=""@""",!
+5 SET XPDQUIT=2
QUIT
CHECK ;check for required packages
+1 NEW PSD
SET PSD(1)=" is required"
+2 IF $$VERSION^XPDUTL("XU")<8
WRITE !,"KERNEL VERSION 3.0",PSD(1),!!
SET PSD=1
+3 IF $$VERSION^XPDUTL("VA FILEMAN")<21
WRITE !,"VA FILEMAN VERSION 21.0",PSD(1),!!
SET PSD=1
+4 IF $$VERSION^XPDUTL("XM")<7.1
WRITE !,"MAILMAN VERSION 7.1",PSD(1),!!
SET PSD=1
+5 IF $$VERSION^XPDUTL("NUR")<2.5
WRITE !,"NURSING VERSION 2.5",PSD(1),!!
SET PSD=1
+6 IF $$VERSION^XPDUTL("PSO")<6
WRITE !,"OUTPATIENT PHARMACY VERSION 6.0",PSD(1),!!
SET PSD=1
+7 IF $$VERSION^XPDUTL("AUTO REPLENISHMENT/WARD STOCK")<2.2
WRITE !,"AUTO REPLENISHMENT/WARD STOCK VERSION 2.2",PSD(1),!!
SET PSD=1
+8 IF $$VERSION^XPDUTL("INPATIENT MEDICATIONS")<4
WRITE !,"INPATIENT MEDICATIONS VERSION 4.0",PSD(1),!!
SET PSD=1
+9 IF $$VERSION^XPDUTL("PSA")<2
WRITE !,"DRUG ACCOUNTABILITY VERSION 2.0",PSD(1),!!
SET PSD=1
+10 IF $$VERSION^XPDUTL("IB")<2
WRITE !,"INTEGRATED BILLING VERSION 2.0",PSD(1),!!
SET PSD=1
+11 IF $$VERSION^XPDUTL("HL")<1.6
WRITE !,"HEALTH LEVEL 7 VERSION 1.6",PSD(1),!!
SET PSD=1
+12 IF $GET(PSD)
WRITE "for CONTROLLED SUBSTANCES VERSION 3.0.",!!,"Installation cannot proceed.",!
SET XPDQUIT=1
+13 QUIT