PRC5INS1 ;WISC/RFJ-version 5 IFCAP installation continued ; 29 Jun 94
;;5.0;IFCAP;;4/21/95
; environmental check for variable prc5inst
I '$G(PRC5INST) K DIFQ Q
I '$G(DUZ)!($G(DUZ(0))'["@") D ERROR("USER 'DUZ' VARIABLES **NOT** CORRECTLY DEFINED.") Q
I +$$VERSION^XPDUTL("GEC")<2 D ERROR("GENERIC CODE SHEETS VERSION 2 NEEDS TO BE INSTALLED FIRST.") Q
I +$$VERSION^XPDUTL("DG")<5.3 D ERROR("PIMS VERSION 5.3 NEEDS TO BE INSTALLED FIRST.") Q
I +$$VERSION^XPDUTL("OR")<2.5 D ERROR("ORDER ENTRY VERSION 2.5 NEEDS TO BE INSTALLED FIRST.") Q
I +$$VERSION^XPDUTL("VALM")<1 D ERROR("LIST MANAGER VERSION 1 NEEDS TO BE INSTALLED FIRST.") Q
Q
;
;
ERROR(MSG) ; do not allow installation of package
W !!,"PLEASE FOLLOW INSTALLATION INSTRUCTIONS EXACTLY.",!,MSG
K DIFQ,PRC5INST
Q
;
;
CONTINUE ; continue with installation of version 5
W !!,"==================== *** STARTING IFCAP INSTALLATION *** ===================="
; install part 1, inventory
W !,"|",?78,"|",!,"|",?30,"----- PART 1 -----",?78,"|"
W !,"PART 1: INSTALLING Generic Inventory Package ..."
S (PRCPFLAG,PRCINSTL)=0
I $P(PRC5INS1,"^",3)'="" D I PRCPFLAG Q
. S XP=" THIS PART HAS ALREADY BEEN INSTALLED. DO YOU WANT TO RE-INSTALL IT",XH=" ENTER 'YES' TO RE-INSTALL THE PART, 'NO' TO GO TO THE NEXT PART, '^' TO EXIT." S %=$$YN^PRCPUYN I %=2 S PRCINSTL=1 Q
. I %'=1 S PRCPFLAG=1 Q
I 'PRCINSTL D
. D NOW^%DTC S Y=% D DD^%DT S PRCSTART=$J(Y,20) W ! D ^PRCPINIT
. D NOW^%DTC S Y=% D DD^%DT S PRCEND=$J(Y,20)
. S PRCTEXT(10,0)="PART 1: Generic Inventory Package "_PRCSTART_" "_PRCEND
; verify it was installed
S DA=+$O(^DIC(9.4,"C","PRCP",0)),PRC5PRCP=DA_"^"_$G(^DIC(9.4,DA,"VERSION"))
I +$P(PRC5PRCP,"^",2)=5,$P($G(^DIC(9.4,DA,22,+$O(^DIC(9.4,DA,22,"B",PRCVERS,0)),0)),"^",3) S Y=$P(^(0),"^",3) D DD^%DT S $P(PRC5INS1,"^",3)=Y
I $P(PRC5INS1,"^",3)="" D NO Q
;
; install part 2, ifcap
W !!,"|",?78,"|",!,"|",?30,"----- PART 2 -----",?78,"|"
W !,"PART 2: INSTALLING IFCAP Main System ..."
S (PRCPFLAG,PRCINSTL)=0
I $P(PRC5INS2,"^",3)'="" D I PRCPFLAG Q
. S XP=" THIS PART HAS ALREADY BEEN INSTALLED. DO YOU WANT TO RE-INSTALL IT",XH=" ENTER 'YES' TO RE-INSTALL THE PART, 'NO' TO GO TO THE NEXT PART, '^' TO EXIT." S %=$$YN^PRCPUYN(2) I %=2 S PRCINSTL=1 Q
. I %'=1 S PRCPFLAG=1 Q
I 'PRCINSTL D
. D NOW^%DTC S Y=% D DD^%DT S PRCSTART=$J(Y,20) W ! D ^PRCINIT
. D NOW^%DTC S Y=% D DD^%DT S PRCEND=$J(Y,20)
. S PRCTEXT(11,0)="PART 2: IFCAP Main System "_PRCSTART_" "_PRCEND
; verify it was installed
S DA=+$O(^DIC(9.4,"C","PRC",0)),PRC5PRC=DA_"^"_$G(^DIC(9.4,DA,"VERSION"))
I +$P(PRC5PRC,"^",2)=5,$P($G(^DIC(9.4,DA,22,+$O(^DIC(9.4,DA,22,"B",PRCVERS,0)),0)),"^",3) S Y=$P(^(0),"^",3) D DD^%DT S $P(PRC5INS2,"^",3)=Y
I $P(PRC5INS2,"^",3)="" D NO Q
;
;
; fire off mailman message
D INSTALL^PRCPXTRM("IFCAP "_PRCVERS_" INSTALL","version "_PRCVERS,.PRCTEXT)
W !!,"================== *** INSTALLATION OPTION 1 COMPLETED *** ================="
W !,"CONGRATULATIONS ! IFCAP Version ",PRCVERS," - OPTION 1 COMPLETED."
S %="",$P(%,"=",80)="" W !,%
Q
NO ; not installed
W !!,"********************* === UNSUCCESSFUL INSTALLATION !! === ********************"
K X S X(1)="You will not be able to continue with the installation of IFCAP until this part has been successfully installed." D DISPLAY^PRCPUX2(1,78,.X)
W !,"PLEASE RE-RUN 'PRC5PKG' TO COMPLETE THE INSTALLATION !!"
W !,"*******************************************************************************"
Q
;
;
DESCRIP(FILESTRT,FILEEND) ; remove ifcap file descriptions (node 21)
; from filestrt to fileend.
S FILESTRT=FILESTRT-.00001 F S FILESTRT=$O(^DD(FILESTRT)) Q:'FILESTRT!(FILESTRT>FILEEND) S FIELD=0 F S FIELD=$O(^DD(FILESTRT,FIELD)) Q:'FIELD!(FIELD>1007) K ^DD(FILESTRT,FIELD,21)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRC5INS1 3866 printed Dec 13, 2024@02:00:02 Page 2
PRC5INS1 ;WISC/RFJ-version 5 IFCAP installation continued ; 29 Jun 94
+1 ;;5.0;IFCAP;;4/21/95
+2 ; environmental check for variable prc5inst
+3 IF '$GET(PRC5INST)
KILL DIFQ
QUIT
+4 IF '$GET(DUZ)!($GET(DUZ(0))'["@")
DO ERROR("USER 'DUZ' VARIABLES **NOT** CORRECTLY DEFINED.")
QUIT
+5 IF +$$VERSION^XPDUTL("GEC")<2
DO ERROR("GENERIC CODE SHEETS VERSION 2 NEEDS TO BE INSTALLED FIRST.")
QUIT
+6 IF +$$VERSION^XPDUTL("DG")<5.3
DO ERROR("PIMS VERSION 5.3 NEEDS TO BE INSTALLED FIRST.")
QUIT
+7 IF +$$VERSION^XPDUTL("OR")<2.5
DO ERROR("ORDER ENTRY VERSION 2.5 NEEDS TO BE INSTALLED FIRST.")
QUIT
+8 IF +$$VERSION^XPDUTL("VALM")<1
DO ERROR("LIST MANAGER VERSION 1 NEEDS TO BE INSTALLED FIRST.")
QUIT
+9 QUIT
+10 ;
+11 ;
ERROR(MSG) ; do not allow installation of package
+1 WRITE !!,"PLEASE FOLLOW INSTALLATION INSTRUCTIONS EXACTLY.",!,MSG
+2 KILL DIFQ,PRC5INST
+3 QUIT
+4 ;
+5 ;
CONTINUE ; continue with installation of version 5
+1 WRITE !!,"==================== *** STARTING IFCAP INSTALLATION *** ===================="
+2 ; install part 1, inventory
+3 WRITE !,"|",?78,"|",!,"|",?30,"----- PART 1 -----",?78,"|"
+4 WRITE !,"PART 1: INSTALLING Generic Inventory Package ..."
+5 SET (PRCPFLAG,PRCINSTL)=0
+6 IF $PIECE(PRC5INS1,"^",3)'=""
Begin DoDot:1
+7 SET XP=" THIS PART HAS ALREADY BEEN INSTALLED. DO YOU WANT TO RE-INSTALL IT"
SET XH=" ENTER 'YES' TO RE-INSTALL THE PART, 'NO' TO GO TO THE NEXT PART, '^' TO EXIT."
SET %=$$YN^PRCPUYN
IF %=2
SET PRCINSTL=1
QUIT
+8 IF %'=1
SET PRCPFLAG=1
QUIT
End DoDot:1
IF PRCPFLAG
QUIT
+9 IF 'PRCINSTL
Begin DoDot:1
+10 DO NOW^%DTC
SET Y=%
DO DD^%DT
SET PRCSTART=$JUSTIFY(Y,20)
WRITE !
DO ^PRCPINIT
+11 DO NOW^%DTC
SET Y=%
DO DD^%DT
SET PRCEND=$JUSTIFY(Y,20)
+12 SET PRCTEXT(10,0)="PART 1: Generic Inventory Package "_PRCSTART_" "_PRCEND
End DoDot:1
+13 ; verify it was installed
+14 SET DA=+$ORDER(^DIC(9.4,"C","PRCP",0))
SET PRC5PRCP=DA_"^"_$GET(^DIC(9.4,DA,"VERSION"))
+15 IF +$PIECE(PRC5PRCP,"^",2)=5
IF $PIECE($GET(^DIC(9.4,DA,22,+$ORDER(^DIC(9.4,DA,22,"B",PRCVERS,0)),0)),"^",3)
SET Y=$PIECE(^(0),"^",3)
DO DD^%DT
SET $PIECE(PRC5INS1,"^",3)=Y
+16 IF $PIECE(PRC5INS1,"^",3)=""
DO NO
QUIT
+17 ;
+18 ; install part 2, ifcap
+19 WRITE !!,"|",?78,"|",!,"|",?30,"----- PART 2 -----",?78,"|"
+20 WRITE !,"PART 2: INSTALLING IFCAP Main System ..."
+21 SET (PRCPFLAG,PRCINSTL)=0
+22 IF $PIECE(PRC5INS2,"^",3)'=""
Begin DoDot:1
+23 SET XP=" THIS PART HAS ALREADY BEEN INSTALLED. DO YOU WANT TO RE-INSTALL IT"
SET XH=" ENTER 'YES' TO RE-INSTALL THE PART, 'NO' TO GO TO THE NEXT PART, '^' TO EXIT."
SET %=$$YN^PRCPUYN(2)
IF %=2
SET PRCINSTL=1
QUIT
+24 IF %'=1
SET PRCPFLAG=1
QUIT
End DoDot:1
IF PRCPFLAG
QUIT
+25 IF 'PRCINSTL
Begin DoDot:1
+26 DO NOW^%DTC
SET Y=%
DO DD^%DT
SET PRCSTART=$JUSTIFY(Y,20)
WRITE !
DO ^PRCINIT
+27 DO NOW^%DTC
SET Y=%
DO DD^%DT
SET PRCEND=$JUSTIFY(Y,20)
+28 SET PRCTEXT(11,0)="PART 2: IFCAP Main System "_PRCSTART_" "_PRCEND
End DoDot:1
+29 ; verify it was installed
+30 SET DA=+$ORDER(^DIC(9.4,"C","PRC",0))
SET PRC5PRC=DA_"^"_$GET(^DIC(9.4,DA,"VERSION"))
+31 IF +$PIECE(PRC5PRC,"^",2)=5
IF $PIECE($GET(^DIC(9.4,DA,22,+$ORDER(^DIC(9.4,DA,22,"B",PRCVERS,0)),0)),"^",3)
SET Y=$PIECE(^(0),"^",3)
DO DD^%DT
SET $PIECE(PRC5INS2,"^",3)=Y
+32 IF $PIECE(PRC5INS2,"^",3)=""
DO NO
QUIT
+33 ;
+34 ;
+35 ; fire off mailman message
+36 DO INSTALL^PRCPXTRM("IFCAP "_PRCVERS_" INSTALL","version "_PRCVERS,.PRCTEXT)
+37 WRITE !!,"================== *** INSTALLATION OPTION 1 COMPLETED *** ================="
+38 WRITE !,"CONGRATULATIONS ! IFCAP Version ",PRCVERS," - OPTION 1 COMPLETED."
+39 SET %=""
SET $PIECE(%,"=",80)=""
WRITE !,%
+40 QUIT
NO ; not installed
+1 WRITE !!,"********************* === UNSUCCESSFUL INSTALLATION !! === ********************"
+2 KILL X
SET X(1)="You will not be able to continue with the installation of IFCAP until this part has been successfully installed."
DO DISPLAY^PRCPUX2(1,78,.X)
+3 WRITE !,"PLEASE RE-RUN 'PRC5PKG' TO COMPLETE THE INSTALLATION !!"
+4 WRITE !,"*******************************************************************************"
+5 QUIT
+6 ;
+7 ;
DESCRIP(FILESTRT,FILEEND) ; remove ifcap file descriptions (node 21)
+1 ; from filestrt to fileend.
+2 SET FILESTRT=FILESTRT-.00001
FOR
SET FILESTRT=$ORDER(^DD(FILESTRT))
if 'FILESTRT!(FILESTRT>FILEEND)
QUIT
SET FIELD=0
FOR
SET FIELD=$ORDER(^DD(FILESTRT,FIELD))
if 'FIELD!(FIELD>1007)
QUIT
KILL ^DD(FILESTRT,FIELD,21)
+3 QUIT