source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DINIT6.m@ 1589

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1DINIT6 ;SFISC/XAK-INITIALIZE VA FILEMAN ;2:13 PM 2 Nov 1998
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 I $D(^DD("OS"))[0 D OS^DINIT
5 W !!,"The following files have been installed:",!
6 F X=0:0 S X=$O(^DIC(X)) Q:X>1.9999 Q:'X W $E(" ",1,(3-$L($P(X,"."))))_X,?11,$P($G(^DIC(X,0)),U),! S ^DD(X,0,"VR")=VERSION
7 S ^DD("VERSION")=VERSION,X=^DD("OS",^DD("OS"),0)
8 S ^DD("ROU")=$P(X,U,4) K ^DD("SUB")
9 D 1
10 D ^DINITPST
11E W !,"INITIALIZATION COMPLETED IN "_($P($H,",",2)-DIT)_" SECONDS."
12 D KL Q
13 ;
141 N DIT
15 D KL,PKG,DIINIT
16 Q
17 ;
18KL K %,%H,%X,%Y,DD,DH,DIC,DIK,DIT,DITZS,D,DA,VERSION,DU,F,I,J,P,X,Y,DIRUT,DTOUT,DUOUT
19 Q
20PKG ;
21 I $D(^DIC(9.4,0))#2,($P(^DIC(9.4,0),U,1)'="PACKAGE") D Q
22 . W !!,"You have a file #9.4 that is not the 'Package' file."
23 . W !,"Therefore, the Package file will not be initialized on your system."
24 . W !,"You cannot use VA FileMan's package export utility, DIFROM."
25 . Q
26 I $$ROUEXIST^DILIBF("XPDUTL"),$$VERSION^XPDUTL("XU")'<8 Q
27 K ^DD(9.4,913.5,2),^DD(9.4,914.5,2),^DD(9.4,916.5,2),^DD(9.44,222.7,2),^DD(9.44,222.9,2),^DD(9.44,1909)
28 W !!,"Your Package file will now be updated.",!!
29 D EN^DIPKINIT
30 ;
31 ;Update DIPK Package file entry
32 N DIDATE,DIERR,DINDESC,DINIEN,DINFDA,DINMSG,DIVERS,X,Y,%DT
33 S DIVERS=$P($T(V^DINIT),";",3)
34 S X=$P($T(V^DINIT),";",6),%DT="" D ^%DT S DIDATE=Y
35 S DINFDA(9.4,"?+1,",.01)="DIPK (PACKAGE FILE INIT)"
36 S DINFDA(9.4,"?+1,",1)="DIPK"
37 S DINFDA(9.4,"?+1,",2)="FileMan Init of Package File"
38 S DINDESC(1,0)="Init of Package file to be used by VA FileMan sites that wish to export"
39 S DINDESC(2,0)="software using DIFROM."
40 S DINFDA(9.4,"?+1,",3)="DINDESC"
41 S DINFDA(9.4,"?+1,",13)=DIVERS
42 S DINFDA(9.49,"?+2,?+1,",.01)=DIVERS
43 S:DIDATE>0 DINFDA(9.49,"?+2,?+1,",1)=DIDATE
44 S DINFDA(9.49,"?+2,?+1,",2)=DT
45 S:$G(DUZ) DINFDA(9.49,"?+2,?+1,",3)=DUZ
46 D UPDATE^DIE("","DINFDA","DINIEN","DINMSG")
47 Q
48DIINIT ;Update VA FileMan package entry
49 N DIDATE,DIERR,DINIEN,DINFDA,DINMSG,DIVERS,X,Y,%DT
50 S DIVERS=$P($T(V^DINIT),";",3)
51 S X=$P($T(V^DINIT),";",6),%DT="" D ^%DT S DIDATE=Y
52 S DINFDA(9.4,"?+1,",.01)="VA FILEMAN"
53 S DINFDA(9.4,"?+1,",1)="DI"
54 S DINFDA(9.4,"?+1,",2)="FM INIT"
55 S DINFDA(9.4,"?+1,",13)=DIVERS
56 S DINFDA(9.49,"?+2,?+1,",.01)=DIVERS
57 S:DIDATE>0 DINFDA(9.49,"?+2,?+1,",1)=DIDATE
58 S DINFDA(9.49,"?+2,?+1,",2)=DT
59 S:$G(DUZ) DINFDA(9.49,"?+2,?+1,",3)=DUZ
60 D UPDATE^DIE("","DINFDA","DINIEN","DINMSG")
61 I $G(DIERR),$D(DINMSG("DIERR","E",299)) D
62 . W !!,$C(7),"WARNING: There is more than one 'VA FILEMAN' entry in the Package file (#9.4)."
63 . W !," I am unable to determine which is the correct entry to update with"
64 . W !," current installation data."
65 . W !!," You can delete or edit erroneous entries and run DINIT again."
66 . N DIR,DTOUT,DUOUT,DIRUT,DIROUT
67 . S DIR(0)="E"
68 . W ! D ^DIR
69 ;
70 ;Put PACKAGE pointer into FM DIALOG entries, re-index file
71 N DIPKG,DIREC S DIPKG=$G(DINIEN(1))
72 W !!,"Re-indexing entries in the DIALOG file."
73 F DIREC=0:0 S DIREC=$O(^DI(.84,DIREC)) Q:'DIREC!(DIREC>10000) D
74 . S $P(^DI(.84,DIREC,0),U,4)=DIPKG
75 K DA S DIK="^DI(.84," D IXALL^DIK
76 Q
77 ;
78 ;Install FileMan options, keys, remote procedures, and DI package
79 ;I $P($G(^DIC(19,0)),U,1)="OPTION",$P($G(^DIC(19.1,0)),U,1)="SECURITY KEY" D
80 ;. W !!,"Options, security keys, and remote procedures will now be added to your system.",!!
81 ;. D EN^DIINIT
82 ;. I $$FIND1^DIC(19,"","","DDMP IMPORT") D
83 ;. . N DIOK
84 ;. . S DIOK=$$ADD^XPDMENU("DIOTHER","DDMP IMPORT","",8)
85 ;. . I 'DIOK W !,"The DDMP IMPORT option was not added to the DIOTHER menu.",!
86 ;. Q
87 Q
Note: See TracBrowser for help on using the repository browser.