source: WorldVistAEHR/trunk/r/NATIONAL_DRUG_FILE-PSN/PSNPRE.m@ 1724

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

initial load of WorldVistAEHR

File size: 4.6 KB
Line 
1PSNPRE ;BIR/WRT-pre-init routine to ask question to kill off old reference files sent with the package ;29 Sep 98 / 12:07 PM
2 ;;4.0; NATIONAL DRUG FILE;; 30 Oct 98
3CKDUZ 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
4 I $D(^PS(59.7,1,10)) G MESSGE
5 ;following check for a virgin install
6 ;
7 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
8 D PATCHCHK
9 Q
10 ;end of check for virgin install
11MESSGE 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)"
12 W !?5,"PACKAGE TYPE (50.608)",!?5,"PACKAGE SIZE (50.609)",!?5,"DRUG MANUFACTURER (55.95)"
13 W !!,"If you wish to retain a copy of these files, you may wish to backup these files",!,"before going any further."
14 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
15 I 'Y S XPDQUIT=2 Q
16GLB0 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
17VR31 I $$VERSION^XPDUTL("NATIONAL DRUG FILE")<3.18 D BMES^XPDUTL("You must have installed at least version 3.18") S XPDQUIT=1
18 ;
19PATCHCHK 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
20 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
21 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
22 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
23 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
24 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
25 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
26 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
27 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
28 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
29 S NDF=$$VERSION^XPDUTL("CMOP") I NDF,NDF<2 D BMES^XPDUTL("You must have at least version 2 of CMOP") S XPDQUIT=1
30 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
31 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
32 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
33 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
34 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
35 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
36 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
37 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
38 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
39 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
40 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
41 K NDF
42 Q
Note: See TracBrowser for help on using the repository browser.