source: WorldVistAEHR/trunk/r/BENEFICIARY_TRAVEL-DGBT/DGBT1PRE.m@ 1604

Last change on this file since 1604 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1DGBT1PRE ;ALB/MRY - Env/Pre/Post-install of DGBT V1.0 ; 9/25/01 10:10 AM
2 ;;1.0;Beneficiary Travel;;September 25, 2001
3 ;
4EN ;
5 S XPDABORT=""
6 I '$G(DUZ)!($G(DUZ(0))'="@")!('$G(DT))!($G(U)'="^") D G ABRT
7 . D BMES^XPDUTL("*****")
8 . D MES^XPDUTL("Your programming variables are not set up properly.")
9 . D MES^XPDUTL("Installation aborted.")
10 ; Verify Registration v5.3 exists, else Quit.
11 I $$VERSION^XPDUTL("DG")'=5.3 D G ABRT
12 . W !!,"VERSION 5.3 OF REGISTRATION HAS NOT BEEN LOADED."
13 W !!,">> Environment check complete and okay."
14 Q
15 ;
16PRE ; Pre-init
17 ; If previous beta version with different name, then correct name.
18 D FIND^DIC(9.4,"","@;1;.01","P","DGBT","","C","","","DGBTARRY")
19 S DGBTI=0
20 F S DGBTI=$O(DGBTARRY("DILIST",DGBTI)) Q:'DGBTI D
21 . S X=$G(DGBTARRY("DILIST",DGBTI,0)),DGBTIEN=$P(X,"^",1)
22 . I $P(X,"^",2)="DGBT",$P(X,"^",3)'="BENEFICIARY TRAVEL" D
23 . . ; Correct old name to this version name.
24 . . S FDATA(9.4,DGBTIEN_",",.01)="BENEFICIARY TRAVEL"
25 . . D FILE^DIE("E","FDATA","ERR")
26 K DGBTI,DGBTIEN,X,FDATA,ERR,DGBTARRY
27 ;
28 ; Remove 'DGBT' from ADDITIONAL PREFIXES of the Registration Package.
29 N DIC
30 S DIC="^DIC(9.4,",DIC(0)="X",X="REGISTRATION"
31 D ^DIC I Y<0 D G ABRT
32 . D BMES^XPDUTL("REGISTRATION PACKAGE HAS NOT BEEN FOUND")
33 . D MES^XPDUTL("CONTACT - PIMS National VISTA Support Team for assistance!")
34APREF ; Delete 'DGBT' from ADDITIONAL PREFIXES Field (#14).
35 S (DA(1),DGBTY)=+Y,DIC=DIC_DA(1)_",14,"
36 S DIC(0)="X",DIC("P")=$P(^DD(9.4,14,0),"^",2),X="DGBT"
37 D ^DIC I Y<0 K DIC,X G XPREF
38 S DIE=DIC K DIC
39 S DA=+Y,DR=".01///@" D ^DIE
40 K DIE,DR,DA,Y
41XPREF ; Add 'DGBT' entry to the EXCLUDED NAME SPACE (#919) field.
42 S DIC="^DIC(9.4,",DA(1)=+DGBTY
43 S DIC=DIC_DA(1)_",""EX"",",DIC(0)="L",DIC("P")=$P(^DD(9.4,919,0),"^",2)
44 S X="DGBT" D ^DIC
45 K DIC,DA,Y,X,DGBT Q
46 ;
47POST ; - Run Post-init to update PACKAGE entry for 'DGBT'.
48 D ^DGBT1POS
49 Q
50 ;
51ABRT S XPDABORT=2 Q
Note: See TracBrowser for help on using the repository browser.