PSUENV ;BIR/PDW ; PBM V 3.0 ENVIRONMENTAL CHECK ROUTINE
;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
EN ; CHECK ENVIRONMENT
;
;
S (PSUPSJOK,PSUPSOOK,PSUOK,PSUNDFOK)=0
K XPDQUIT
; Check Pharmacy Benefits Managment installed
S X=$$VERSION^XPDUTL("PSS")
I +X'=1 D G END
. Q:$G(ZTQUEUED)
. W !,"**INSTALLATION ABORTED** "
. W "Pharmacy Data Managment Version 1 is REQUIRED for this install !!"
;
S X=$$PATCH^XPDUTL("PSS*1.0*13")
I 'X D G END
. Q:$G(ZTQUEUED)
. W !,"**INSTALLATION ABORTED** "
. W "Patch PSS*1*13 is REQUIRED for this install !!"
;
; Check In Patient version and Patch
S X=$$VERSION^XPDUTL("PSJ")
I +X=0 S PSUPSJOK=1 G OP ; IP not installed.. proceed to OP
I +X=4.5 D
. S Y=$$PATCH^XPDUTL("PSJ*4.5*61")
. I Y S PSUPSJOK=1 Q
. Q:$G(ZTQUEUED)
. W !,"**INSTALLATION ABORTED** "
. W "Patch PSJ*4.5*61 is REQUIRED for this install !!"
;
I +X=5,PSUPSJOK=0 D
. S Y=$$PATCH^XPDUTL("PSJ*5.0*13")
. I Y S PSUPSJOK=1 Q
. Q:$G(ZTQUEUED)
. W !,"**INSTALLATION ABORTED** "
. W "Patch PSJ*5.0*13 is REQUIRED for this install !!"
;
OP ; Check Out Patient Version and Patch
S X=$$VERSION^XPDUTL("PSO")
I "6^7"'[$E(+X) D G END
. W !,"**INSTALLATION ABORTED** "
. W "Version 6 or 7 of Outpatient Pharmacy is REQUIRED for this install !!"
I +X=6 S PSUPSOOK=1
I +X=7 D
. S Y=$$PATCH^XPDUTL("PSO*7.0*11")
. I Y S PSUPSOOK=1 Q
. Q:$G(ZTQUEUED)
. W !,"**INSTALLATION ABORTED** "
. W "Patch PS0*7.0*11 is REQUIRED for this install !!"
;
; Check if proper version of NDF is installed
S X=$$VERSION^XPDUTL("PSN")
I X'>3.17 D G END
. Q:$G(ZTQUEUED)
. W !,"**INSTALLATION ABORTED** ",!
. W "National Drug File Version 3.18 or higher is REQUIRED for this install !!"
S PSUNDFOK=1
;
END ;EP
I PSUPSJOK,PSUPSOOK,PSUNDFOK S PSUOK=1
I 'PSUOK W:'$G(ZTQUEUED) !,"Installation Stopping",! S XPDQUIT=1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSUENV 1917 printed Dec 13, 2024@02:27:51 Page 2
PSUENV ;BIR/PDW ; PBM V 3.0 ENVIRONMENTAL CHECK ROUTINE
+1 ;;4.0;PHARMACY BENEFITS MANAGEMENT;;MARCH, 2005
EN ; CHECK ENVIRONMENT
+1 ;
+2 ;
+3 SET (PSUPSJOK,PSUPSOOK,PSUOK,PSUNDFOK)=0
+4 KILL XPDQUIT
+5 ; Check Pharmacy Benefits Managment installed
+6 SET X=$$VERSION^XPDUTL("PSS")
+7 IF +X'=1
Begin DoDot:1
+8 if $GET(ZTQUEUED)
QUIT
+9 WRITE !,"**INSTALLATION ABORTED** "
+10 WRITE "Pharmacy Data Managment Version 1 is REQUIRED for this install !!"
End DoDot:1
GOTO END
+11 ;
+12 SET X=$$PATCH^XPDUTL("PSS*1.0*13")
+13 IF 'X
Begin DoDot:1
+14 if $GET(ZTQUEUED)
QUIT
+15 WRITE !,"**INSTALLATION ABORTED** "
+16 WRITE "Patch PSS*1*13 is REQUIRED for this install !!"
End DoDot:1
GOTO END
+17 ;
+18 ; Check In Patient version and Patch
+19 SET X=$$VERSION^XPDUTL("PSJ")
+20 ; IP not installed.. proceed to OP
IF +X=0
SET PSUPSJOK=1
GOTO OP
+21 IF +X=4.5
Begin DoDot:1
+22 SET Y=$$PATCH^XPDUTL("PSJ*4.5*61")
+23 IF Y
SET PSUPSJOK=1
QUIT
+24 if $GET(ZTQUEUED)
QUIT
+25 WRITE !,"**INSTALLATION ABORTED** "
+26 WRITE "Patch PSJ*4.5*61 is REQUIRED for this install !!"
End DoDot:1
+27 ;
+28 IF +X=5
IF PSUPSJOK=0
Begin DoDot:1
+29 SET Y=$$PATCH^XPDUTL("PSJ*5.0*13")
+30 IF Y
SET PSUPSJOK=1
QUIT
+31 if $GET(ZTQUEUED)
QUIT
+32 WRITE !,"**INSTALLATION ABORTED** "
+33 WRITE "Patch PSJ*5.0*13 is REQUIRED for this install !!"
End DoDot:1
+34 ;
OP ; Check Out Patient Version and Patch
+1 SET X=$$VERSION^XPDUTL("PSO")
+2 IF "6^7"'[$EXTRACT(+X)
Begin DoDot:1
+3 WRITE !,"**INSTALLATION ABORTED** "
+4 WRITE "Version 6 or 7 of Outpatient Pharmacy is REQUIRED for this install !!"
End DoDot:1
GOTO END
+5 IF +X=6
SET PSUPSOOK=1
+6 IF +X=7
Begin DoDot:1
+7 SET Y=$$PATCH^XPDUTL("PSO*7.0*11")
+8 IF Y
SET PSUPSOOK=1
QUIT
+9 if $GET(ZTQUEUED)
QUIT
+10 WRITE !,"**INSTALLATION ABORTED** "
+11 WRITE "Patch PS0*7.0*11 is REQUIRED for this install !!"
End DoDot:1
+12 ;
+13 ; Check if proper version of NDF is installed
+14 SET X=$$VERSION^XPDUTL("PSN")
+15 IF X'>3.17
Begin DoDot:1
+16 if $GET(ZTQUEUED)
QUIT
+17 WRITE !,"**INSTALLATION ABORTED** ",!
+18 WRITE "National Drug File Version 3.18 or higher is REQUIRED for this install !!"
End DoDot:1
GOTO END
+19 SET PSUNDFOK=1
+20 ;
END ;EP
+1 IF PSUPSJOK
IF PSUPSOOK
IF PSUNDFOK
SET PSUOK=1
+2 IF 'PSUOK
if '$GET(ZTQUEUED)
WRITE !,"Installation Stopping",!
SET XPDQUIT=1
+3 QUIT