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

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1DIU ;SFISC/GFT-UTILITY FUNCTIONS ;1:01 PM 29 Dec 1998
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 K DIU
50 S DIC="^DOPT(""DIU"","
6 G OPT:$D(^DOPT("DIU",11)) S ^(0)="UTILITY OPTION^1.01" K ^("B")
7 F X=1:1:11 S ^DOPT("DIU",X,0)=$P($T(@X),";;",2)
8 S DIK=DIC D IXALL^DIK S ^DOPT("DICR",0)="TYPE OF INDEXING^1.01"
9 F X=1:1:7 S ^DOPT("DICR",X,0)=$P("REGULAR^KWIC^MNEMONIC^MUMPS^SOUNDEX^TRIGGER^BULLETIN",U,X)
10 S DIK="^DOPT(""DICR""," D IXALL^DIK G 0
11OPT ;
12 S DIC(0)="AEQIZ" S:DUZ(0)'="@" DIC("S")="I Y-5"
13 D ^DIC G Q:Y<0 S DI=Y D EN G 0
14 ;
15EN ;
16 I +DI=2 D G:'$D(DI) Q
17 . W ! S Y=$$TYPE^DIKCUTL2 Q:Y=1
18 . D:Y=2 MOD^DIKCUTL
19 . K DI
20 D D^DICRW G Q:Y<0 I '$D(DIC) D DIE^DIB G Q:'$D(DG) S DIC=DG
21 S DIU=DIC,DIU(0)="EDT" K DICS
22 K DIC,I,J S Y=DI,N=0,DI=+$P($G(@(DIU_"0)")),U,2),J(0)=DI,I(0)=DIU
23 I 'DI W $C(7),!,"Missing or incomplete global node "_DIU_"0)",! G Q
24 K DDA I $D(^DD(DI,0,"DDA")),^("DDA")["Y" S DDA=""
25 D @+Y W !!
26Q K %,DIUF,DG,DGG,DIC,DIU,DJJ,DIK,DI,DA,I,J,X,Y,DICD,DICDF,DDA,DIFLD,DTOUT,DUOUT,DR Q
27 ;
281 ;;VERIFY FIELDS
29 G ^DIV
30 ;
312 ;;CROSS-REFERENCE A FIELD OR FILE
32 S X="CW" D DI Q:Y<.002 G ^DICD
33 ;
343 ;;IDENTIFIER
35 S X="CW.01" D DIAX Q:'$T D DI Q:Y<0 G 3^DIU3
36 ;
374 ;;RE-INDEX FILE
38 G 4^DIU1
39 ;
405 ;;INPUT TRANSFORM (SYNTAX)
41 S X="W" D DIAX Q:'$T D DI Q:Y<0 G 5^DIU31
42 ;
436 ;;EDIT FILE
44 G 6^DIU0
45 ;
467 ;;OUTPUT TRANSFORM
47 S X="CW" D DI Q:Y<0 G O^DIU31
48 ;
498 ;;TEMPLATE EDIT
50 G 0^DIBT
51 ;
529 ;;UNEDITABLE DATA
53 S X="WC" D DIAX Q:'$T D DI Q:Y<0 G 9^DIU31
54 ;
5510 ;;MANDATORY/REQUIRED FIELD CHECK
56 G ^DIVRE
57 ;
5811 ;;KEY DEFINITION
59 G MOD^DIKKUTL
60 ;
6199 ;;SPECIFIER
62 S X="CW",N=0 D DI Q:Y<0 G ^DIU4
63 ;
64DI ;
65 S DIC(0)="ZQEAI"
66D ;
67 S DIC="^DD("_DI_",",DIC("W")="S %=$P(^(0),U,2) I % W $S($P(^DD(+%,.01,0),U,2)[""W"":"" (word-processing)"",1:"" (multiple)"")"
68 S DIC("S")="S %=$P(^(0),U,2) I 1"_$P(",%'[""C""",U,X["C")_$P(",$P(^DD(+%,.01,0),U,2)'[""W""",9,X["W")_$P(",Y-.01",U,X[.01),DA=X
69 D ^DIC K DIC("S") I Y>0,$P(Y(0),U,2) S N=N+1,X=$P($P(Y(0),U,4),";",1),DI=$E("""",+X'=X),I(N)=DI_X_DI,(DI,J(N))=+$P(Y(0),U,2),X=DA G DI
70 Q
71DIAX I '$D(^DD(DI,0,"DI"))!($P($G(^("DI")),U)'["Y")!($P($G(^("DI")),U)["Y"&'$P(@(^DIC(DI,0,"GL")_"0)"),U,4))
72 W:'$T !!,$C(7),"THIS DATA DICTIONARY CHANGE IS NOT ALLOWED ON AN ARCHIVE FILE!"
73 Q
Note: See TracBrowser for help on using the repository browser.