RGPDENV ;B'HAM/PTD-CIRN PD build environment check routine ;4/15/99
;;1.0; CLINICAL INFO RESOURCE NETWORK ;;30 Apr 99
PSJ ;Determine which version of Inpatient Medications is installed.
S RGOUT="^",RGVER=$$VERSION^XPDUTL("PSJ")
;If version not 4.5 or 5.0, abort install.
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
;If version 5.0 installed, we're ok; go to PSO.
I RGVER="5.0" G PSO
;If version 4.5 installed, check for patch PSJ*4.5*43.
I RGVER="4.5" S RGPCH=$$PATCH^XPDUTL("PSJ*4.5*43")
;If patch PSJ*4.5*43 is installed, continue with PSO.
I RGPCH=1 G PSO
;Else PSJ*4.5*43 is missing; continue with PSO.
S RGOUT=RGOUT_"INP^",XPDQUIT=2
;
PSO ;Determine which version of Outpatient Pharmacy is installed.
S RGVER=$$VERSION^XPDUTL("PSO")
;If version not 6.0 or 7.0, abort install.
I (RGVER'="6.0"),(RGVER'="7.0") W !!,"Outpatient Pharmacy version 6.0 or 7.0 must be installed." S XPDQUIT=2 G END
I RGVER="7.0" G PSO7
PSO6 ;If version 6.0 installed, check for patch PSO*6*156.
I RGVER="6.0" S RGPCH=$$PATCH^XPDUTL("PSO*6.0*156")
;If patch PSO*6*156 is installed, quit.
I RGPCH=1 G END
;Else PSO*6*156 is missing.
S RGOUT=RGOUT_"OUT6^",XPDQUIT=2 G END
PSO7 ;If version 7.0 installed, check for patch PSO*7*11.
I RGVER="7.0" S RGPCH=$$PATCH^XPDUTL("PSO*7.0*11")
;If patch PSO*7*11 is installed, quit.
I RGPCH=1 G END
;Else PSO*7*11 is missing.
S RGOUT=RGOUT_"OUT7^",XPDQUIT=2
;
END ;Write install message based on set conditions.
;Patch PSJ*4.5*43 missing.
I RGOUT["IMP" W !!,"You must have patch PSJ*4.5*43 installed for Inpatient Medications."
;Patch PSO*6*156 missing.
I RGOUT["OUT6" W !!,"You must have patch PSO*6*156 installed for Outpatient Pharmacy."
;Patch PSO*7*11 missing.
I RGOUT["OUT7" W !!,"You must have patch PSO*7*11 installed for Outpatient Pharmacy."
;All conditions are OK.
I '$D(XPDQUIT) W !!,"Environment check is ok.",!
K RGOUT,RGPCH,RGVER
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGPDENV 2029 printed Nov 22, 2024@16:52:51 Page 2
RGPDENV ;B'HAM/PTD-CIRN PD build environment check routine ;4/15/99
+1 ;;1.0; CLINICAL INFO RESOURCE NETWORK ;;30 Apr 99
PSJ ;Determine which version of Inpatient Medications is installed.
+1 SET RGOUT="^"
SET RGVER=$$VERSION^XPDUTL("PSJ")
+2 ;If version not 4.5 or 5.0, abort install.
+3 IF (RGVER'="4.5")
IF (RGVER'="5.0")
WRITE !!,"Inpatient Medications version 4.5 or 5.0 must be installed."
SET XPDQUIT=2
KILL RGVER
GOTO PSO
+4 ;If version 5.0 installed, we're ok; go to PSO.
+5 IF RGVER="5.0"
GOTO PSO
+6 ;If version 4.5 installed, check for patch PSJ*4.5*43.
+7 IF RGVER="4.5"
SET RGPCH=$$PATCH^XPDUTL("PSJ*4.5*43")
+8 ;If patch PSJ*4.5*43 is installed, continue with PSO.
+9 IF RGPCH=1
GOTO PSO
+10 ;Else PSJ*4.5*43 is missing; continue with PSO.
+11 SET RGOUT=RGOUT_"INP^"
SET XPDQUIT=2
+12 ;
PSO ;Determine which version of Outpatient Pharmacy is installed.
+1 SET RGVER=$$VERSION^XPDUTL("PSO")
+2 ;If version not 6.0 or 7.0, abort install.
+3 IF (RGVER'="6.0")
IF (RGVER'="7.0")
WRITE !!,"Outpatient Pharmacy version 6.0 or 7.0 must be installed."
SET XPDQUIT=2
GOTO END
+4 IF RGVER="7.0"
GOTO PSO7
PSO6 ;If version 6.0 installed, check for patch PSO*6*156.
+1 IF RGVER="6.0"
SET RGPCH=$$PATCH^XPDUTL("PSO*6.0*156")
+2 ;If patch PSO*6*156 is installed, quit.
+3 IF RGPCH=1
GOTO END
+4 ;Else PSO*6*156 is missing.
+5 SET RGOUT=RGOUT_"OUT6^"
SET XPDQUIT=2
GOTO END
PSO7 ;If version 7.0 installed, check for patch PSO*7*11.
+1 IF RGVER="7.0"
SET RGPCH=$$PATCH^XPDUTL("PSO*7.0*11")
+2 ;If patch PSO*7*11 is installed, quit.
+3 IF RGPCH=1
GOTO END
+4 ;Else PSO*7*11 is missing.
+5 SET RGOUT=RGOUT_"OUT7^"
SET XPDQUIT=2
+6 ;
END ;Write install message based on set conditions.
+1 ;Patch PSJ*4.5*43 missing.
+2 IF RGOUT["IMP"
WRITE !!,"You must have patch PSJ*4.5*43 installed for Inpatient Medications."
+3 ;Patch PSO*6*156 missing.
+4 IF RGOUT["OUT6"
WRITE !!,"You must have patch PSO*6*156 installed for Outpatient Pharmacy."
+5 ;Patch PSO*7*11 missing.
+6 IF RGOUT["OUT7"
WRITE !!,"You must have patch PSO*7*11 installed for Outpatient Pharmacy."
+7 ;All conditions are OK.
+8 IF '$DATA(XPDQUIT)
WRITE !!,"Environment check is ok.",!
+9 KILL RGOUT,RGPCH,RGVER
+10 QUIT
+11 ;