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

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

initial load of WorldVistAEHR

File size: 6.6 KB
Line 
1DINIT2A1 ;SFISC/MKO-KEY AND INDEX FILES ;8:42 AM 4 Jun 1999
2 ;;22.0;VA FileMan;**1**;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 F I=1:2 S X=$T(Q+I) Q:X="" S Y=$E($T(Q+I+1),4,999),X=$E(X,4,999) S:$A(Y)=126 I=I+1,Y=$E(Y,2,999)_$E($T(Q+I+1),5,99) S:$A(Y)=61 Y=$E(Y,2,999) S @X=Y
5 G ^DINIT2A2
6Q Q
7 ;;^DD(.11,.42,21,5,0)
8 ;;=the FileMan Sort and Print (EN1^DIP).
9 ;;^DD(.11,.42,21,6,0)
10 ;;=
11 ;;^DD(.11,.42,21,7,0)
12 ;;=SORTING ONLY - The index name starts with "A". Calls to Classic FileMan
13 ;;^DD(.11,.42,21,8,0)
14 ;;=lookup (^DIC) or the Finder (FIND^DIC or $$FIND1^DIC) will not use this
15 ;;^DD(.11,.42,21,9,0)
16 ;;=index unless it is specified in the input parameters. The index will be
17 ;;^DD(.11,.42,21,10,0)
18 ;;=available for use by the FileMan Sort and Print (EN1^DIP).
19 ;;^DD(.11,.42,21,11,0)
20 ;;=
21 ;;^DD(.11,.42,21,12,0)
22 ;;=ACTION - The index name starts with "A". This is used for M code that
23 ;;^DD(.11,.42,21,13,0)
24 ;;=performs some actions and does NOT build an index. Therefore, it is not
25 ;;^DD(.11,.42,21,14,0)
26 ;;=available for use by either the Classic FileMan lookup (^DIC), the Finder
27 ;;^DD(.11,.42,21,15,0)
28 ;;=(FIND^DIC or $$FIND1^DIC) or the Sort and Print (EN1^DIP).
29 ;;^DD(.11,.42,"DT")
30 ;;=2980416
31 ;;^DD(.11,.5,0)
32 ;;=ROOT TYPE^S^I:INDEX FILE;W:WHOLE FILE;^0;8^Q
33 ;;^DD(.11,.5,3)
34 ;;=Answer '??' for more help.
35 ;;^DD(.11,.5,21,0)
36 ;;=^^6^6^2980911^
37 ;;^DD(.11,.5,21,1,0)
38 ;;=Answer 'I' if the fields that make up the file are defined at the same
39 ;;^DD(.11,.5,21,2,0)
40 ;;=level at which the index is located.
41 ;;^DD(.11,.5,21,3,0)
42 ;;=
43 ;;^DD(.11,.5,21,4,0)
44 ;;=Answer 'W' if this is a whole file cross-reference in which the fields
45 ;;^DD(.11,.5,21,5,0)
46 ;;=that make up the index are defined in a subfile, but the index is
47 ;;^DD(.11,.5,21,6,0)
48 ;;=physically located at a parent file level.
49 ;;^DD(.11,.5,"DT")
50 ;;=2980908
51 ;;^DD(.11,.51,0)
52 ;;=ROOT FILE^RNJ20,7^^0;9^K:+X'=X!(X>999999999999)!(X<0)!(X?.E1"."8N.N) X
53 ;;^DD(.11,.51,1,0)
54 ;;=^.1
55 ;;^DD(.11,.51,1,1,0)
56 ;;=.11^AC
57 ;;^DD(.11,.51,1,1,1)
58 ;;=S ^DD("IX","AC",$E(X,1,30),DA)=""
59 ;;^DD(.11,.51,1,1,2)
60 ;;=K ^DD("IX","AC",$E(X,1,30),DA)
61 ;;^DD(.11,.51,1,1,3)
62 ;;=Lets FileMan find indexes defined on fields from a particular file
63 ;;^DD(.11,.51,1,1,"DT")
64 ;;=2980929
65 ;;^DD(.11,.51,3)
66 ;;=Type a Number between 0 and 999999999999, 7 Decimal Digits. Answer '??' for more help.
67 ;;^DD(.11,.51,21,0)
68 ;;=^^3^3^2980910^
69 ;;^DD(.11,.51,21,1,0)
70 ;;=Answer with the number of the file or subfile where this index is defined.
71 ;;^DD(.11,.51,21,2,0)
72 ;;=For whole file indexes, answer with the subfile number, not the number of
73 ;;^DD(.11,.51,21,3,0)
74 ;;=the file where the index physically resides.
75 ;;^DD(.11,.51,"DT")
76 ;;=2980929
77 ;;^DD(.11,1.1,0)
78 ;;=SET LOGIC^RK^^1;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
79 ;;^DD(.11,1.1,3)
80 ;;=Answer must be Standard M code. Answer '??' for more help.
81 ;;^DD(.11,1.1,9)
82 ;;=@
83 ;;^DD(.11,1.1,21,0)
84 ;;=^^16^16^2990430^^
85 ;;^DD(.11,1.1,21,1,0)
86 ;;=Answer with the M code that FileMan should execute when the values of
87 ;;^DD(.11,1.1,21,2,0)
88 ;;=fields that make up the cross-reference are set or changed. When field
89 ;;^DD(.11,1.1,21,3,0)
90 ;;=values are changed, FileMan executes first the KILL LOGIC, then the SET
91 ;;^DD(.11,1.1,21,4,0)
92 ;;=LOGIC.
93 ;;^DD(.11,1.1,21,5,0)
94 ;;=
95 ;;^DD(.11,1.1,21,6,0)
96 ;;=Assume the DA array describes the record to be cross-referenced, and that
97 ;;^DD(.11,1.1,21,7,0)
98 ;;=the X(order#) array contains values after the transform for storage is
99 ;;^DD(.11,1.1,21,8,0)
100 ;;=applied, but before the truncation to the maximum length. The variable X
101 ;;^DD(.11,1.1,21,9,0)
102 ;;=also equals X(order#) of the lowest order number.
103 ;;^DD(.11,1.1,21,10,0)
104 ;;=
105 ;;^DD(.11,1.1,21,11,0)
106 ;;=When fields that make up a cross-reference are edited and the kill and set
107 ;;^DD(.11,1.1,21,12,0)
108 ;;=logic are executed, the X1(order#) array contains the old field values,
109 ;;^DD(.11,1.1,21,13,0)
110 ;;=and the X2(order#) array contains the new field values. If a record is
111 ;;^DD(.11,1.1,21,14,0)
112 ;;=being added, and there is an X1(order#) array element that corresponds to
113 ;;^DD(.11,1.1,21,15,0)
114 ;;=the .01 field, it is set to null. When a record is deleted, all X2(order#)
115 ;;^DD(.11,1.1,21,16,0)
116 ;;=array elements are null.
117 ;;^DD(.11,1.1,"DT")
118 ;;=2960116
119 ;;^DD(.11,1.2,0)
120 ;;=OVERFLOW SET LOGIC^.111^^1.2;0
121 ;;^DD(.11,1.2,"DT")
122 ;;=2960124
123 ;;^DD(.11,1.3,0)
124 ;;=SET CONDITION^F^^1.3;E1,245^K:$L(X)>245!($L(X)<1) X
125 ;;^DD(.11,1.3,3)
126 ;;=Answer must be a valid FileMan computed expression. Answer '??' for more help.
127 ;;^DD(.11,1.3,21,0)
128 ;;=^^5^5^2960124^
129 ;;^DD(.11,1.3,21,1,0)
130 ;;=Answer with a FileMan computed expression that will evaluate to Boolean
131 ;;^DD(.11,1.3,21,2,0)
132 ;;=true (according to the M rules for Boolean interpretation). FileMan will
133 ;;^DD(.11,1.3,21,3,0)
134 ;;=evaluate this expression whenever it would normally execute the
135 ;;^DD(.11,1.3,21,4,0)
136 ;;=cross-reference's Set Logic, and will not execute the Set Logic unless
137 ;;^DD(.11,1.3,21,5,0)
138 ;;=this condition evaluates to true.
139 ;;^DD(.11,1.3,"DT")
140 ;;=2960116
141 ;;^DD(.11,1.4,0)
142 ;;=SET CONDITION CODE^K^^1.4;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
143 ;;^DD(.11,1.4,3)
144 ;;=This is Standard MUMPS code. Answer '??' for more help.
145 ;;^DD(.11,1.4,9)
146 ;;=@
147 ;;^DD(.11,1.4,21,0)
148 ;;=^^15^15^2990430^
149 ;;^DD(.11,1.4,21,1,0)
150 ;;=This is MUMPS code that sets the variable X. The SET LOGIC is executed
151 ;;^DD(.11,1.4,21,2,0)
152 ;;=only if the SET CONDTION, if present, sets X to Boolean true (according to
153 ;;^DD(.11,1.4,21,3,0)
154 ;;=M rules for Boolean interpretation).
155 ;;^DD(.11,1.4,21,4,0)
156 ;;=
157 ;;^DD(.11,1.4,21,5,0)
158 ;;=Assume the DA array describes the record to be cross-referenced, and that
159 ;;^DD(.11,1.4,21,6,0)
160 ;;=the X(order#) array contains values after the transform for storage is
161 ;;^DD(.11,1.4,21,7,0)
162 ;;=applied, but before the truncation to the maximum length. The variable X
163 ;;^DD(.11,1.4,21,8,0)
164 ;;=also equals X(order#) of the lowest order number.
165 ;;^DD(.11,1.4,21,9,0)
166 ;;=
167 ;;^DD(.11,1.4,21,10,0)
168 ;;=When fields that make up a cross-reference are edited and the kill and set
169 ;;^DD(.11,1.4,21,11,0)
170 ;;=conditions are executed, the X1(order#) array contains the old field
171 ;;^DD(.11,1.4,21,12,0)
172 ;;=values, and the X2(order#) array contains the new field values. If a
173 ;;^DD(.11,1.4,21,13,0)
174 ;;=record is being added, and there is an X1(order#) array element that
175 ;;^DD(.11,1.4,21,14,0)
176 ;;=corresponds to the .01 field, it is set to null. When a record is deleted,
177 ;;^DD(.11,1.4,21,15,0)
178 ;;=all X2(order#) array elements are null.
179 ;;^DD(.11,1.4,"DT")
180 ;;=2970117
181 ;;^DD(.11,2.1,0)
182 ;;=KILL LOGIC^RK^^2;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
183 ;;^DD(.11,2.1,3)
184 ;;=Answer must be Standard M code. Answer '??' for more help.
Note: See TracBrowser for help on using the repository browser.