PSNPRE ;BIR/WRT-pre-init routine to ask question to kill off old reference files sent with the package ;29 Sep 98 / 12:07 PM [ 07/30/2002 4:02 PM ]
;;4.0; NATIONAL DRUG FILE;; 30 Oct 98
CKDUZ I $S(('($D(DUZ)#2)):1,'$D(^VA(200,DUZ,0)):1,'$D(DUZ(0)):1,DUZ(0)'="@":1,1:0) W !!,"DUZ MUST BE SET TO A VALID USER NUMBER AND",!,"DUZ(0) MUST BE SET TO THE ""@"" SIGN",!! S XPDQUIT=2 Q
I $D(^PS(59.7,1,10)) G MESSGE
;following check for a virgin install
;
I '$D(^PSNDF(50.6)) D BMES^XPDUTL("The PSNDF global needs to be loaded on your system before the Installation"),MES^XPDUTL("can be run.") S XPDQUIT=2
D PATCHCHK
Q
;end of check for virgin install
MESSGE W !!,$C(7),"I need to delete the following files:",!!,?5,"DRUG INGREDIENTS (50.416)",!,?5,"VA DRUG CLASS (50.605)",!,?5,"DRUG UNITS (50.607)"
W !?5,"PACKAGE TYPE (50.608)",!?5,"PACKAGE SIZE (50.609)",!?5,"DRUG MANUFACTURER (55.95)"
W !!,"If you wish to retain a copy of these files, you may wish to backup these files",!,"before going any further."
W !!,"If you start this Installation, you must let it run to completion." S DIR(0)="Y",DIR("A")="Are you sure you want to continue" D ^DIR K DIR I $D(DIRUT) S XPDQUIT=1 Q
I 'Y S XPDQUIT=2 Q
GLB0 I '$D(^PSNDF(50.6)) D BMES^XPDUTL("The PSNDF global needs to be loaded on your system before the Installation"),MES^XPDUTL("can be run.") S XPDQUIT=2
VR31 I $$VERSION^XPDUTL("NATIONAL DRUG FILE")<3.18 D BMES^XPDUTL("You must have installed at least version 3.18") S XPDQUIT=1
;
;IHS/ITSC/ENM 02/15/2002 NEXT TWO LINES C'd OUT
PATCHCHK ;I $$VERSION^XPDUTL("INPATIENT MEDICATIONS")?1"4.5".E,'$$PATCH^XPDUTL("PSJ*4.5*59") D BMES^XPDUTL("You must install patch PSJ*4.5*59") S XPDQUIT=1
;S NDF=$$VERSION^XPDUTL("INPATIENT MEDICATIONS") I NDF,NDF<4.5 D BMES^XPDUTL("You must have at least version 4.5 of Inpatient Medications") S XPDQUIT=1
S NDF=$$VERSION^XPDUTL("OUTPATIENT PHARMACY") I NDF,NDF<6 D BMES^XPDUTL("You must have at least version 6 of Outpatient Pharmacy") S XPDQUIT=1
S NDF=$$VERSION^XPDUTL("ALLERGY TRACKING SYSTEM") I NDF,NDF<4 D BMES^XPDUTL("You must have at least version 4 of Allergy Tracking") S XPDQUIT=1
S NDF=$$VERSION^XPDUTL("ADVERSE REACTION TRACKING") I NDF,NDF<4 D BMES^XPDUTL("You must have at least version 4 of Adverse Reaction Tracking") S XPDQUIT=1
S NDF=$$VERSION^XPDUTL("DSS EXTRACTS") I NDF,NDF<3 D BMES^XPDUTL("You must had at least version 3 os DSS Extracts") S XPDQUIT=1
S NDF=$$VERSION^XPDUTL("DRUG ACCOUNTABILITY") I NDF,NDF<3 D BMES^XPDUTL("You must have at least version 3 of Drug Accountability") S XPDQUIT=1
S NDF=$$VERSION^XPDUTL("PHARMACY DATA MANAGEMENT") I NDF,NDF<1 D BMES^XPDUTL("You must have at least version 1 of PDM") S XPDQUIT=1
S NDF=$$VERSION^XPDUTL("ICR - IMMUNOLOGY CASE REGISTRY") I NDF,NDF<2.1 D BMES^XPDUTL("You must have at least version 2.1 of Immunology Case Registry") S XPDQUIT=1
S NDF=$$VERSION^XPDUTL("ORDER ENTRY/RESULTS REPORTING") I NDF,NDF<2.5 D BMES^XPDUTL("You must have at least version 2.5 of OE/RR") S XPDQUIT=1
S NDF=$$VERSION^XPDUTL("CMOP") I NDF,NDF<2 D BMES^XPDUTL("You must have at least version 2 of CMOP") S XPDQUIT=1
I $$VERSION^XPDUTL("INPATIENT MEDICATIONS")?1"5.0".E F NDF=11,14 I '$$PATCH^XPDUTL("PSJ*5.0*"_NDF) D BMES^XPDUTL("You must install patch PSJ*5*"_NDF) S XPDQUIT=1
;IHS/ITSC/ENM 02/14/2002 NEXT TWO C'd OUT
;I $$VERSION^XPDUTL("OUTPATIENT PHARMACY")?1"6".E,'$$PATCH^XPDUTL("PSO*6.0*173") D BMES^XPDUTL("You must install patch PSO*6*173") S XPDQUIT=1
;I $$VERSION^XPDUTL("OUTPATIENT PHARMACY")?1"6".E,'$$PATCH^XPDUTL("PSO*6.0*4") D BMES^XPDUTL("You must install patch PSO*6*4") S XPDQUIT=1
I $$VERSION^XPDUTL("OUTPATIENT PHARMACY")?1"7".E F NDF=10,11 I '$$PATCH^XPDUTL("PSO*7.0*"_NDF) D BMES^XPDUTL("You must install patch PSO*7*"_NDF) S XPDQUIT=1
;IHS/ITSC/ENM 07/30/02 NEXT 2 LINES DISABLED
;I $$VERSION^XPDUTL("ALLERGY TRACKING SYSTEM")?1"4".E,'$$PATCH^XPDUTL("GMRA*4.0*13") D BMES^XPDUTL("You must install patch GMRA*4*13") S XPDQUIT=1
;I $$VERSION^XPDUTL("ADVERSE REACTION TRACKING")?1"4".E,'$$PATCH^XPDUTL("GMRA*4.0*13") D BMES^XPDUTL("You must install patch GMRA*4*13") S XPDQUIT=1
I $$VERSION^XPDUTL("DSS EXTRACTS")?1"3".E,'$$PATCH^XPDUTL("ECX*3.0*10") D BMES^XPDUTL("You must install patch ECX*3*10") S XPDQUIT=1
I $$VERSION^XPDUTL("DRUG ACCOUNTABILITY")?1"3".E,'$$PATCH^XPDUTL("PSA*3.0*8") D BMES^XPDUTL("You must install patch PSA*3*8") S XPDQUIT=1
;I $$VERSION^XPDUTL("PHARMACY DATA MANAGEMENT")?1"1".E,'$$PATCH^XPDUTL("PSS*1.0*15") D BMES^XPDUTL("You must install patch PSS*1*15") S XPDQUIT=1
I $$VERSION^XPDUTL("ICR - IMMUNOLOGY CASE REGISTRY")?1"2.1".E,'$$PATCH^XPDUTL("IMR*2.1*3") D BMES^XPDUTL("You must install patch IMR*2.1*3") S XPDQUIT=1
I $$VERSION^XPDUTL("ORDER ENTRY/RESULTS REPORTING")?1"3".E,'$$PATCH^XPDUTL("OR*3.0*33") D BMES^XPDUTL("You must install patch OR*3*33") S XPDQUIT=1
I $$VERSION^XPDUTL("CMOP")?1"2".E,'$$PATCH^XPDUTL("PSX*2.0*18") D BMES^XPDUTL("You must install patch PSX*2*18") S XPDQUIT=1
K NDF
Q
PSNPRE ;BIR/WRT-pre-init routine to ask question to kill off old reference files sent with the package ;29 Sep 98 / 12:07 PM [ 07/30/2002 4:02 PM ]
+1 ;;4.0; NATIONAL DRUG FILE;; 30 Oct 98
CKDUZ IF $SELECT(('($DATA(DUZ)#2)):1,'$DATA(^VA(200,DUZ,0)):1,'$DATA(DUZ(0)):1,DUZ(0)'="@":1,1:0)
WRITE !!,"DUZ MUST BE SET TO A VALID USER NUMBER AND",!,"DUZ(0) MUST BE SET TO THE ""@"" SIGN",!!
SET XPDQUIT=2
QUIT
+1 IF $DATA(^PS(59.7,1,10))
GOTO MESSGE
+2 ;following check for a virgin install
+3 ;
+4 IF '$DATA(^PSNDF(50.6))
DO BMES^XPDUTL("The PSNDF global needs to be loaded on your system before the Installation")
DO MES^XPDUTL("can be run.")
SET XPDQUIT=2
+5 DO PATCHCHK
+6 QUIT
+7 ;end of check for virgin install
MESSGE WRITE !!,$CHAR(7),"I need to delete the following files:",!!,?5,"DRUG INGREDIENTS (50.416)",!,?5,"VA DRUG CLASS (50.605)",!,?5,"DRUG UNITS (50.607)"
+1 WRITE !?5,"PACKAGE TYPE (50.608)",!?5,"PACKAGE SIZE (50.609)",!?5,"DRUG MANUFACTURER (55.95)"
+2 WRITE !!,"If you wish to retain a copy of these files, you may wish to backup these files",!,"before going any further."
+3 WRITE !!,"If you start this Installation, you must let it run to completion."
SET DIR(0)="Y"
SET DIR("A")="Are you sure you want to continue"
DO ^DIR
KILL DIR
IF $DATA(DIRUT)
SET XPDQUIT=1
QUIT
+4 IF 'Y
SET XPDQUIT=2
QUIT
GLB0 IF '$DATA(^PSNDF(50.6))
DO BMES^XPDUTL("The PSNDF global needs to be loaded on your system before the Installation")
DO MES^XPDUTL("can be run.")
SET XPDQUIT=2
VR31 IF $$VERSION^XPDUTL("NATIONAL DRUG FILE")<3.18
DO BMES^XPDUTL("You must have installed at least version 3.18")
SET XPDQUIT=1
+1 ;
+2 ;IHS/ITSC/ENM 02/15/2002 NEXT TWO LINES C'd OUT
PATCHCHK ;I $$VERSION^XPDUTL("INPATIENT MEDICATIONS")?1"4.5".E,'$$PATCH^XPDUTL("PSJ*4.5*59") D BMES^XPDUTL("You must install patch PSJ*4.5*59") S XPDQUIT=1
+1 ;S NDF=$$VERSION^XPDUTL("INPATIENT MEDICATIONS") I NDF,NDF<4.5 D BMES^XPDUTL("You must have at least version 4.5 of Inpatient Medications") S XPDQUIT=1
+2 SET NDF=$$VERSION^XPDUTL("OUTPATIENT PHARMACY")
IF NDF
IF NDF<6
DO BMES^XPDUTL("You must have at least version 6 of Outpatient Pharmacy")
SET XPDQUIT=1
+3 SET NDF=$$VERSION^XPDUTL("ALLERGY TRACKING SYSTEM")
IF NDF
IF NDF<4
DO BMES^XPDUTL("You must have at least version 4 of Allergy Tracking")
SET XPDQUIT=1
+4 SET NDF=$$VERSION^XPDUTL("ADVERSE REACTION TRACKING")
IF NDF
IF NDF<4
DO BMES^XPDUTL("You must have at least version 4 of Adverse Reaction Tracking")
SET XPDQUIT=1
+5 SET NDF=$$VERSION^XPDUTL("DSS EXTRACTS")
IF NDF
IF NDF<3
DO BMES^XPDUTL("You must had at least version 3 os DSS Extracts")
SET XPDQUIT=1
+6 SET NDF=$$VERSION^XPDUTL("DRUG ACCOUNTABILITY")
IF NDF
IF NDF<3
DO BMES^XPDUTL("You must have at least version 3 of Drug Accountability")
SET XPDQUIT=1
+7 SET NDF=$$VERSION^XPDUTL("PHARMACY DATA MANAGEMENT")
IF NDF
IF NDF<1
DO BMES^XPDUTL("You must have at least version 1 of PDM")
SET XPDQUIT=1
+8 SET NDF=$$VERSION^XPDUTL("ICR - IMMUNOLOGY CASE REGISTRY")
IF NDF
IF NDF<2.1
DO BMES^XPDUTL("You must have at least version 2.1 of Immunology Case Registry")
SET XPDQUIT=1
+9 SET NDF=$$VERSION^XPDUTL("ORDER ENTRY/RESULTS REPORTING")
IF NDF
IF NDF<2.5
DO BMES^XPDUTL("You must have at least version 2.5 of OE/RR")
SET XPDQUIT=1
+10 SET NDF=$$VERSION^XPDUTL("CMOP")
IF NDF
IF NDF<2
DO BMES^XPDUTL("You must have at least version 2 of CMOP")
SET XPDQUIT=1
+11 IF $$VERSION^XPDUTL("INPATIENT MEDICATIONS")?1"5.0".E
FOR NDF=11,14
IF '$$PATCH^XPDUTL("PSJ*5.0*"_NDF)
DO BMES^XPDUTL("You must install patch PSJ*5*"_NDF)
SET XPDQUIT=1
+12 ;IHS/ITSC/ENM 02/14/2002 NEXT TWO C'd OUT
+13 ;I $$VERSION^XPDUTL("OUTPATIENT PHARMACY")?1"6".E,'$$PATCH^XPDUTL("PSO*6.0*173") D BMES^XPDUTL("You must install patch PSO*6*173") S XPDQUIT=1
+14 ;I $$VERSION^XPDUTL("OUTPATIENT PHARMACY")?1"6".E,'$$PATCH^XPDUTL("PSO*6.0*4") D BMES^XPDUTL("You must install patch PSO*6*4") S XPDQUIT=1
+15 IF $$VERSION^XPDUTL("OUTPATIENT PHARMACY")?1"7".E
FOR NDF=10,11
IF '$$PATCH^XPDUTL("PSO*7.0*"_NDF)
DO BMES^XPDUTL("You must install patch PSO*7*"_NDF)
SET XPDQUIT=1
+16 ;IHS/ITSC/ENM 07/30/02 NEXT 2 LINES DISABLED
+17 ;I $$VERSION^XPDUTL("ALLERGY TRACKING SYSTEM")?1"4".E,'$$PATCH^XPDUTL("GMRA*4.0*13") D BMES^XPDUTL("You must install patch GMRA*4*13") S XPDQUIT=1
+18 ;I $$VERSION^XPDUTL("ADVERSE REACTION TRACKING")?1"4".E,'$$PATCH^XPDUTL("GMRA*4.0*13") D BMES^XPDUTL("You must install patch GMRA*4*13") S XPDQUIT=1
+19 IF $$VERSION^XPDUTL("DSS EXTRACTS")?1"3".E
IF '$$PATCH^XPDUTL("ECX*3.0*10")
DO BMES^XPDUTL("You must install patch ECX*3*10")
SET XPDQUIT=1
+20 IF $$VERSION^XPDUTL("DRUG ACCOUNTABILITY")?1"3".E
IF '$$PATCH^XPDUTL("PSA*3.0*8")
DO BMES^XPDUTL("You must install patch PSA*3*8")
SET XPDQUIT=1
+21 ;I $$VERSION^XPDUTL("PHARMACY DATA MANAGEMENT")?1"1".E,'$$PATCH^XPDUTL("PSS*1.0*15") D BMES^XPDUTL("You must install patch PSS*1*15") S XPDQUIT=1
+22 IF $$VERSION^XPDUTL("ICR - IMMUNOLOGY CASE REGISTRY")?1"2.1".E
IF '$$PATCH^XPDUTL("IMR*2.1*3")
DO BMES^XPDUTL("You must install patch IMR*2.1*3")
SET XPDQUIT=1
+23 IF $$VERSION^XPDUTL("ORDER ENTRY/RESULTS REPORTING")?1"3".E
IF '$$PATCH^XPDUTL("OR*3.0*33")
DO BMES^XPDUTL("You must install patch OR*3*33")
SET XPDQUIT=1
+24 IF $$VERSION^XPDUTL("CMOP")?1"2".E
IF '$$PATCH^XPDUTL("PSX*2.0*18")
DO BMES^XPDUTL("You must install patch PSX*2*18")
SET XPDQUIT=1
+25 KILL NDF
+26 QUIT