1 | RGPDENV ;B'HAM/PTD-CIRN PD build environment check routine ;4/15/99
|
---|
2 | ;;1.0; CLINICAL INFO RESOURCE NETWORK ;;30 Apr 99
|
---|
3 | PSJ ;Determine which version of Inpatient Medications is installed.
|
---|
4 | S RGOUT="^",RGVER=$$VERSION^XPDUTL("PSJ")
|
---|
5 | ;If version not 4.5 or 5.0, abort install.
|
---|
6 | I (RGVER'="4.5"),(RGVER'="5.0") W !!,"Inpatient Medications version 4.5 or 5.0 must be installed." S XPDQUIT=2 K RGVER G PSO
|
---|
7 | ;If version 5.0 installed, we're ok; go to PSO.
|
---|
8 | I RGVER="5.0" G PSO
|
---|
9 | ;If version 4.5 installed, check for patch PSJ*4.5*43.
|
---|
10 | I RGVER="4.5" S RGPCH=$$PATCH^XPDUTL("PSJ*4.5*43")
|
---|
11 | ;If patch PSJ*4.5*43 is installed, continue with PSO.
|
---|
12 | I RGPCH=1 G PSO
|
---|
13 | ;Else PSJ*4.5*43 is missing; continue with PSO.
|
---|
14 | S RGOUT=RGOUT_"INP^",XPDQUIT=2
|
---|
15 | ;
|
---|
16 | PSO ;Determine which version of Outpatient Pharmacy is installed.
|
---|
17 | S RGVER=$$VERSION^XPDUTL("PSO")
|
---|
18 | ;If version not 6.0 or 7.0, abort install.
|
---|
19 | I (RGVER'="6.0"),(RGVER'="7.0") W !!,"Outpatient Pharmacy version 6.0 or 7.0 must be installed." S XPDQUIT=2 G END
|
---|
20 | I RGVER="7.0" G PSO7
|
---|
21 | PSO6 ;If version 6.0 installed, check for patch PSO*6*156.
|
---|
22 | I RGVER="6.0" S RGPCH=$$PATCH^XPDUTL("PSO*6.0*156")
|
---|
23 | ;If patch PSO*6*156 is installed, quit.
|
---|
24 | I RGPCH=1 G END
|
---|
25 | ;Else PSO*6*156 is missing.
|
---|
26 | S RGOUT=RGOUT_"OUT6^",XPDQUIT=2 G END
|
---|
27 | PSO7 ;If version 7.0 installed, check for patch PSO*7*11.
|
---|
28 | I RGVER="7.0" S RGPCH=$$PATCH^XPDUTL("PSO*7.0*11")
|
---|
29 | ;If patch PSO*7*11 is installed, quit.
|
---|
30 | I RGPCH=1 G END
|
---|
31 | ;Else PSO*7*11 is missing.
|
---|
32 | S RGOUT=RGOUT_"OUT7^",XPDQUIT=2
|
---|
33 | ;
|
---|
34 | END ;Write install message based on set conditions.
|
---|
35 | ;Patch PSJ*4.5*43 missing.
|
---|
36 | I RGOUT["IMP" W !!,"You must have patch PSJ*4.5*43 installed for Inpatient Medications."
|
---|
37 | ;Patch PSO*6*156 missing.
|
---|
38 | I RGOUT["OUT6" W !!,"You must have patch PSO*6*156 installed for Outpatient Pharmacy."
|
---|
39 | ;Patch PSO*7*11 missing.
|
---|
40 | I RGOUT["OUT7" W !!,"You must have patch PSO*7*11 installed for Outpatient Pharmacy."
|
---|
41 | ;All conditions are OK.
|
---|
42 | I '$D(XPDQUIT) W !!,"Environment check is ok.",!
|
---|
43 | K RGOUT,RGPCH,RGVER
|
---|
44 | Q
|
---|
45 | ;
|
---|