DGJ1INIT ;ALB/MRY - Env/Pre/Post-install of DGJ v1.0 ;[ 06/25/01 15:51 pm]
;;1.0;Incomplete Records Tracking;;Jun 25, 2001
;
EN ;
S XPDABORT=""
I '$G(DUZ)!($G(DUZ(0))'="@")!('$G(DT))!($G(U)'="^") D G ABRT
. D BMES^XPDUTL("*****")
. D MES^XPDUTL("Your programming variables are not set up properly.")
. D MES^XPDUTL("Installation aborted.")
; Verify Registration v5.3 exists, else Quit.
I $$VERSION^XPDUTL("DG")'=5.3 D G ABRT
. D BMES^XPDUTL("*****")
. D MES^XPDUTL("VERSION 5.3 OF REGISTRATION HAS NOT BEEN LOADED.")
. D MES^XPDUTL("Installation aborted.")
;
; Verify 'DGJ' was removed from Additional Prefixes of REGISTRATION.
N DIC
S DIC="^DIC(9.4,",DIC(0)="X",X="REGISTRATION"
D ^DIC I Y<0 D G ABRT
. D BMES^XPDUTL("*****")
. D MES^XPDUTL("REGISTRATION PACKAGE HAS NOT BEEN FOUND")
. D MES^XPDUTL("CONTACT - PIMS National VISTA Support Team for assistance!")
. D MES^XPDUTL("Installation aborted.")
S DA(1)=+Y,DIC=DIC_DA(1)_",14,"
S DIC(0)="X",DIC("P")=$P(^DD(9.4,14,0),"^",2),X="DGJ"
D ^DIC I Y>0 D G ABRT
. D BMES^XPDUTL("*****")
. D MES^XPDUTL("'DGJ' must be removed from REGISTRATION's Additional Prefix field.")
. D MES^XPDUTL("Follow INSTALLATION instructions found in the Installation Guide.")
. D MES^XPDUTL("Installation aborted.")
K DA,DIC
;
; If previous beta version with different name, then correct name.
D FIND^DIC(9.4,"","@;1;.01","P","DGJ","","C","","","DGJARRY")
S DGJI=0
F S DGJI=$O(DGJARRY("DILIST",DGJI)) Q:'DGJI D
. S X=$G(DGJARRY("DILIST",DGJI,0)),DGJIEN=$P(X,"^",1)
. I $P(X,"^",2)="DGJ",$P(X,"^",3)'="INCOMPLETE RECORDS TRACKING" D
. . ; Correct old name to this version name.
. . S FDATA(9.4,DGJIEN_",",.01)="INCOMPLETE RECORDS TRACKING"
. . D FILE^DIE("E","FDATA","ERR")
K DGJI,DGJIEN,X,FDATA,ERR,DGJARRY
;
OK K DIE,DR,DA,Y
;
W !!,"Environment check completed and okay."
Q
;
POST ; - Run Post-init to Update Package entry for 'DGJ'.
D ^DGJ1INIP
Q
ABRT S XPDABORT=2 Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGJ1INIT 2002 printed Nov 22, 2024@17:10:33 Page 2
DGJ1INIT ;ALB/MRY - Env/Pre/Post-install of DGJ v1.0 ;[ 06/25/01 15:51 pm]
+1 ;;1.0;Incomplete Records Tracking;;Jun 25, 2001
+2 ;
EN ;
+1 SET XPDABORT=""
+2 IF '$GET(DUZ)!($GET(DUZ(0))'="@")!('$GET(DT))!($GET(U)'="^")
Begin DoDot:1
+3 DO BMES^XPDUTL("*****")
+4 DO MES^XPDUTL("Your programming variables are not set up properly.")
+5 DO MES^XPDUTL("Installation aborted.")
End DoDot:1
GOTO ABRT
+6 ; Verify Registration v5.3 exists, else Quit.
+7 IF $$VERSION^XPDUTL("DG")'=5.3
Begin DoDot:1
+8 DO BMES^XPDUTL("*****")
+9 DO MES^XPDUTL("VERSION 5.3 OF REGISTRATION HAS NOT BEEN LOADED.")
+10 DO MES^XPDUTL("Installation aborted.")
End DoDot:1
GOTO ABRT
+11 ;
+12 ; Verify 'DGJ' was removed from Additional Prefixes of REGISTRATION.
+13 NEW DIC
+14 SET DIC="^DIC(9.4,"
SET DIC(0)="X"
SET X="REGISTRATION"
+15 DO ^DIC
IF Y<0
Begin DoDot:1
+16 DO BMES^XPDUTL("*****")
+17 DO MES^XPDUTL("REGISTRATION PACKAGE HAS NOT BEEN FOUND")
+18 DO MES^XPDUTL("CONTACT - PIMS National VISTA Support Team for assistance!")
+19 DO MES^XPDUTL("Installation aborted.")
End DoDot:1
GOTO ABRT
+20 SET DA(1)=+Y
SET DIC=DIC_DA(1)_",14,"
+21 SET DIC(0)="X"
SET DIC("P")=$PIECE(^DD(9.4,14,0),"^",2)
SET X="DGJ"
+22 DO ^DIC
IF Y>0
Begin DoDot:1
+23 DO BMES^XPDUTL("*****")
+24 DO MES^XPDUTL("'DGJ' must be removed from REGISTRATION's Additional Prefix field.")
+25 DO MES^XPDUTL("Follow INSTALLATION instructions found in the Installation Guide.")
+26 DO MES^XPDUTL("Installation aborted.")
End DoDot:1
GOTO ABRT
+27 KILL DA,DIC
+28 ;
+29 ; If previous beta version with different name, then correct name.
+30 DO FIND^DIC(9.4,"","@;1;.01","P","DGJ","","C","","","DGJARRY")
+31 SET DGJI=0
+32 FOR
SET DGJI=$ORDER(DGJARRY("DILIST",DGJI))
if 'DGJI
QUIT
Begin DoDot:1
+33 SET X=$GET(DGJARRY("DILIST",DGJI,0))
SET DGJIEN=$PIECE(X,"^",1)
+34 IF $PIECE(X,"^",2)="DGJ"
IF $PIECE(X,"^",3)'="INCOMPLETE RECORDS TRACKING"
Begin DoDot:2
+35 ; Correct old name to this version name.
+36 SET FDATA(9.4,DGJIEN_",",.01)="INCOMPLETE RECORDS TRACKING"
+37 DO FILE^DIE("E","FDATA","ERR")
End DoDot:2
End DoDot:1
+38 KILL DGJI,DGJIEN,X,FDATA,ERR,DGJARRY
+39 ;
OK KILL DIE,DR,DA,Y
+1 ;
+2 WRITE !!,"Environment check completed and okay."
+3 QUIT
+4 ;
POST ; - Run Post-init to Update Package entry for 'DGJ'.
+1 DO ^DGJ1INIP
+2 QUIT
ABRT SET XPDABORT=2
QUIT