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

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1DIPKINIT ; ; 30-MAR-1999
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5 K DIF,DIFQ,DIFQR,DIFQN,DIK,DDF,DDT,DTO,D0,DLAYGO,DIC,DIDUZ,DIR,DA,DIFROM,DFR,DTN,DIX,DZ,DIRUT,DTOUT,DUOUT
6 S DIOVRD=1,U="^",DIFQ=0,DIFROM="22.0" W !,"This version (#22.0) of 'DIPKINIT' was created on 30-MAR-1999"
7 W !?9,"(at FILEMAN 22 DEVELOPMENT AREA, by VA FileMan V.22.0T4)",!
8 I $D(^DD("VERSION")),^("VERSION")'<22 G GO
9 ;W !,"FIRST, I'LL FRESHEN UP YOUR VA FILEMAN...." D N^DINIT
10 I ^DD("VERSION")<22 W !,"but I need version 22 of the VA FileMan!" G Q
11GO ;
12EN ; ENTER HERE TO BYPASS THE PRE-INIT PROGRAM
13 S DIFQ=0 K DIRUT,DTOUT,DUOUT
14 F DIFRIR=1:1:1 S DIFRRTN="^DIPKINI"_$E("5",DIFRIR) D @DIFRRTN
15 W:1 !,"I AM GOING TO SET UP THE FOLLOWING FILES:" F I=1:2:2 S DIF(I)=^UTILITY("DIF",$J,I) D 1 G Q:DIFQ!$D(DIRUT) K DIF(I)
16 S DIFROM="22.0" D PKG:'$D(DIFROM(0)),^DIPKINI1 G Q:'$D(DIFQ) S DIK(0)="AB"
17 F DIF=1:2:2 S %=^UTILITY("DIF",$J,DIF),DIK=$P(%,";",5),N=$P(%,";",3),D=$P(%,";",4)_U_N D D K DIFQ(N)
18 K DIFQR D ^DIPKINI2,^DIPKINI3
19 L S DUZ=DIDUZ W:1 !,$C(7),"OK, I'M DONE.",!,"NO"_$P("TE THAT FILE",U,DSEC)_" SECURITY-CODE PROTECTION HAS BEEN MADE"
20 I DIFROM F DIF=1:2:2 S %=^UTILITY("DIF",$J,DIF),N=+$P(%,";",3) I N,$P(%,";",8)="y" S ^DD(N,0,"VR")=DIFROM
21 I DIFROM(0)>0 F %="PRE","INI","INIT" S:$D(DIFROM(%)) $P(^DIC(9.4,DIFROM(0),%),U,2)=DIFROM(%)
22 I $G(DIFQN) S $P(^(0),U,3,4)=$P(DIFQN,U,2)_U_($P(^DIC(0),U,4)+DIFQN) K DIFQN
23 I DIFROM,$D(^%ZTSK) S X="DIPKINIS" X ^%ZOSF("TEST") D:$T PAC^DIPKINIS($T(IXF),.DIFROM)
24 S:DIFROM(0)>0 ^DIC(9.4,DIFROM(0),"VERSION")=DIFROM G Q^DIFROM0
25D S:$D(^DIC(+N,0))[0 ^(0)=D S X=$D(@(DIK_"0)")),^(0)=D_U_$S(X#2:$P(^(0),U,3,9),1:U)
26 S DIFQR=DIFQR(+N) I ^DD("VERSION")>17.5,$D(^DD(+N,0,"DIK"))#2 S X=^("DIK"),Y=+N,DMAX=^DD("ROU") D EN^DIKZ
27 I DIFQR D IXALL^DIK:$O(@(DIK_"0)")) W "."
28 Q
29R G REP^DIPKINI2
30 ;
311 S N=+$P(DIF(I),";",3),DIF=$P(DIF(I),";",4),S=$P(DIF(I),";",5)
32 W !!?3,N,?13,DIF,$P(" (Partial Definition)",U,$P(DIF(I),";",6)),$P(" (including data)",U,$P(DIF(I),";",13)="y") S Z=$S($D(^DIC(N,0))#2:^(0),1:"")
33 I Z="" S DIFQ(N)=1,DIFQN=$G(DIFQN)+1_U_N G S
34 I $L($P(Z,DIF)) W $C(7),!,"*BUT YOU ALREADY HAVE '",$P(Z,U),"' AS FILE #",N,"!" D R Q:DIFQ G S:$D(DIFKEP(N)),1
35 S DIFQ(N)=$P(DIF(I),";",7)'="n"
36 I $L(Z) W $C(7),!,"Note: You already have the '",$P(Z,U),"' File." S DIFQ(0)=1
37 S %=$E(^UTILITY("DIF",$J,I+1),4,245) I %]"" X % S DIFQ(N)=$T W:'$T !,"Screen on this Data Dictionary did not pass--DD will not be installed!" G S
38 I $L(Z),$P(DIF(I),";",10)="y" S DIR("A")="Shall I write over the existing Data Definition",DIR("??")="^D DD^DIFROMH1",DIR("B")="YES",DIR(0)="Y" D ^DIR S DIFQ(N)=Y
39S S DIFQR(N)=0 Q:$P(DIF(I),";",13)'="y"!$D(DIRUT)
40 I $P(DIF(I),";",15)="y",$O(@(S_"0)"))>0 S DIF=$P(DIF(I),";",14)="o",DIR("A")="Want my data "_$P("merged with^to overwrite",U,DIF+1)_" yours",DIR("??")="^D DTA^DIFROMH1",DIR(0)="Y" D ^DIR S DIFQR(N)=$S('Y:Y,1:Y+DIF) Q
41 S %=$P(DIF(I),";",14)="o" W !,$C(7),"I will ",$P("MERGE^OVERWRITE",U,%+1)," your data with mine." S DIFQR(N)=%+1
42 Q
43Q W $C(7),!!,"NO UPDATING HAS OCCURRED!" G Q^DIFROM0
44 ;
45PKG S X=$P($T(IXF),";",3),DIC="^DIC(9.4,",DIC(0)="",DIC("S")="I $P(^(0),U,2)="""_$P(X,U,2)_"""",X=$P(X,U) D ^DIC S DIFROM(0)=+Y K DIC
46 Q
47 ;
48IXF ;;DIPK (PACKAGE FILE INIT)^DIPK;3
Note: See TracBrowser for help on using the repository browser.