DINIT2A2 ;SFISC/MKO-KEY AND INDEX FILES ;11:29 AM 19 Nov 2012
;;22.0;VA FileMan;**1,167**;Mar 30, 1999;Build 20
;Per VHA Directive 2004-038, this routine should not be modified.
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
G ^DINIT2A3
Q Q
;;^DD(.11,2.1,9)
;;=@
;;^DD(.11,2.1,21,0)
;;=^^16^16^2990430^
;;^DD(.11,2.1,21,1,0)
;;=Answer with the M code that FileMan should execute when the values of
;;^DD(.11,2.1,21,2,0)
;;=fields that make up the cross-reference are changed or deleted. When field
;;^DD(.11,2.1,21,3,0)
;;=values are changed, FileMan executes first the KILL LOGIC, then the SET
;;^DD(.11,2.1,21,4,0)
;;=LOGIC.
;;^DD(.11,2.1,21,5,0)
;;=
;;^DD(.11,2.1,21,6,0)
;;=Assume the DA array describes the record to be cross-referenced, and that
;;^DD(.11,2.1,21,7,0)
;;=the X(order#) array contains values after the transform for storage is
;;^DD(.11,2.1,21,8,0)
;;=applied, but before the truncation to the maximum length. The variable X
;;^DD(.11,2.1,21,9,0)
;;=also equals X(order#) of the lowest order number.
;;^DD(.11,2.1,21,10,0)
;;=
;;^DD(.11,2.1,21,11,0)
;;=When fields that make up a cross-reference are edited and the kill and set
;;^DD(.11,2.1,21,12,0)
;;=logic are executed, the X1(order#) array contains the old field values,
;;^DD(.11,2.1,21,13,0)
;;=and the X2(order#) array contains the new field values. If a record is
;;^DD(.11,2.1,21,14,0)
;;=being added, and there is an X1(order#) array element that corresponds to
;;^DD(.11,2.1,21,15,0)
;;=the .01 field, it is set to null. When a record is deleted, all X2(order#)
;;^DD(.11,2.1,21,16,0)
;;=array elements are null.
;;^DD(.11,2.1,"DT")
;;=2960116
;;^DD(.11,2.2,0)
;;=OVERFLOW KILL LOGIC^.112^^2.2;0
;;^DD(.11,2.2,"DT")
;;=2960124
;;^DD(.11,2.3,0)
;;=KILL CONDITION^F^^2.3;E1,245^K:$L(X)>245!($L(X)<1) X
;;^DD(.11,2.3,3)
;;=Answer must be a valid FileMan computed expression. Answer '??' for more help.
;;^DD(.11,2.3,21,0)
;;=^^5^5^2960124^
;;^DD(.11,2.3,21,1,0)
;;=Answer with a FileMan computed expression that will evaluate to Boolean
;;^DD(.11,2.3,21,2,0)
;;=true (according to the M rules for Boolean interpretation). FileMan will
;;^DD(.11,2.3,21,3,0)
;;=evaluate this expression whenever it would normally execute the
;;^DD(.11,2.3,21,4,0)
;;=cross-reference's Kill Logic, and will not execute the Kill Logic unless
;;^DD(.11,2.3,21,5,0)
;;=this condition evaluates to true.
;;^DD(.11,2.3,"DT")
;;=2960116
;;^DD(.11,2.4,0)
;;=KILL CONDITION CODE^K^^2.4;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
;;^DD(.11,2.4,3)
;;=This is Standard MUMPS code. Answer '??' for more help.
;;^DD(.11,2.4,9)
;;=@
;;^DD(.11,2.4,21,0)
;;=^^15^15^2990430^
;;^DD(.11,2.4,21,1,0)
;;=This is MUMPS code, that sets the variable X. The KILL LOGIC is executed
;;^DD(.11,2.4,21,2,0)
;;=only if the KILL CONDITION, if present, sets X such the X evaluates to
;;^DD(.11,2.4,21,3,0)
;;=true, (according to M rules for Boolean interpretation)
;;^DD(.11,2.4,21,4,0)
;;=
;;^DD(.11,2.4,21,5,0)
;;=Assume the DA array describes the record to be cross-referenced, and that
;;^DD(.11,2.4,21,6,0)
;;=the X(order#) array contains values after the transform for storage is
;;^DD(.11,2.4,21,7,0)
;;=applied, but before the truncation to the maximum length. The variable X
;;^DD(.11,2.4,21,8,0)
;;=also equals X(order#) of the lowest order number.
;;^DD(.11,2.4,21,9,0)
;;=
;;^DD(.11,2.4,21,10,0)
;;=When fields that make up a cross-reference are edited and the kill and set
;;^DD(.11,2.4,21,11,0)
;;=conditions are executed, the X1(order#) array contains the old field
;;^DD(.11,2.4,21,12,0)
;;=values, and the X2(order#) array contains the new field values. If a
;;^DD(.11,2.4,21,13,0)
;;=record is being added, and there is an X1(order#) array element that
;;^DD(.11,2.4,21,14,0)
;;=corresponds to the .01 field, it is set to null. When a record is deleted,
;;^DD(.11,2.4,21,15,0)
;;=all X2(order#) array elements are null.
;;^DD(.11,2.4,"DT")
;;=2970117
;;^DD(.11,2.5,0)
;;=KILL ENTIRE INDEX CODE^K^^2.5;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
;;^DD(.11,2.5,3)
;;=This is Standard MUMPS code. Answer '??' for more help.
;;^DD(.11,2.5,9)
;;=@
;;^DD(.11,2.5,21,0)
;;=^^4^4^2980911^
;;^DD(.11,2.5,21,1,0)
;;=This is a kill statement that can be executed to remove an entire index for
;;^DD(.11,2.5,21,2,0)
;;=all records in a file. When an entire file is reindexed, FileMan executes
;;^DD(.11,2.5,21,3,0)
;;=this code instead of looping through all the entries in a file and
;;^DD(.11,2.5,21,4,0)
;;=executing the kill logic once for each entry.
;;^DD(.11,666,0)
;;=RE-INDEXING^SI^1:NO RE-INDEXING ALLOWED;0:ALLOW REINDEXING^NOREINDEX;1
;;^DD(.11,666,3)
;;=Should the re-indexing of this cross reference be prohibited?
;;^DD(.11,666,21,0)
;;=^^5^5
;;^DD(.11,666,21,1,0)
;;=If you answer '1', this cross reference will not be re-indexed during a
;;^DD(.11,666,21,2,0)
;;=general re-indexing of this file, whether it's done via API or
;;^DD(.11,666,21,3,0)
;;=interactively. If you answer '0', which is the default, it will.
;;^DD(.11,666,21,4,0)
;;=A 'NO RE-INDEXING' cross-reference will ONLY be re-indexed
;;^DD(.11,666,21,5,0)
;;=if it is specifically named in an API call
;;^DD(.11,11.1,0)
;;=CROSS-REFERENCE VALUES^.114IA^^11.1;0
;;^DD(.11,11.1,"DT")
;;=2960221
;;^DD(.1101,0)
;;=DESCRIPTION SUB-FIELD^^.01^1
;;^DD(.1101,0,"DT")
;;=2960116
;;^DD(.1101,0,"NM","DESCRIPTION")
;;=
;;^DD(.1101,0,"UP")
;;=.11
;;^DD(.1101,.01,0)
;;=DESCRIPTION^W^^0;1^Q
;;^DD(.1101,.01,3)
;;=Answer '??' for more help.
;;^DD(.1101,.01,21,0)
;;=^^3^3^2960123^
;;^DD(.1101,.01,21,1,0)
;;=Answer should describe the purpose of this index, along with any technical
;;^DD(.1101,.01,21,2,0)
;;=information that might be useful to advanced users, developers,
;;^DD(.1101,.01,21,3,0)
;;=troubleshooters, or system managers.
;;^DD(.1101,.01,"DT")
;;=2960116
;;^DD(.111,0)
;;=OVERFLOW SET LOGIC SUB-FIELD^^1^2
;;^DD(.111,0,"DT")
;;=2960124
;;^DD(.111,0,"NM","OVERFLOW SET LOGIC")
;;=
;;^DD(.111,0,"UP")
;;=.11
;;^DD(.111,.01,0)
;;=OVERFLOW SET LOGIC NODE^MNJ6,0X^^0;1^K:+X'=X!(X>999999)!(X<1)!(X?.E1"."1N.N) X S:$D(X) DINUM=X
;;^DD(.111,.01,3)
;;=Type a Number between 1 and 999999, 0 Decimal Digits. Answer '??' for more help.
;;^DD(.111,.01,21,0)
;;=^^3^3^2980911^
;;^DD(.111,.01,21,1,0)
;;=Answer must be the number of the node under which the additional line of
;;^DD(.111,.01,21,2,0)
;;=set logic will be filed. Use the overflow nodes if the set logic is too
;;^DD(.111,.01,21,3,0)
;;=long to fit in the SET LOGIC field.
;;^DD(.111,.01,"DT")
;;=2980910
;;^DD(.111,1,0)
;;=OVERFLOW SET LOGIC^RK^^1;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
;;^DD(.111,1,3)
;;=Answer must be Standard M code. Answer '??' for more help.
;;^DD(.111,1,9)
;;=@
;;^DD(.111,1,21,0)
;;=^^6^6^2980911^
;;^DD(.111,1,21,1,0)
;;=Answer with the M code of the additional set logic stored at this node.
;;^DD(.111,1,21,2,0)
;;=FileMan will not automatically execute this additional code, so the set
;;^DD(.111,1,21,3,0)
;;=logic must invoke the additional code stored in this overflow node.
;;^DD(.111,1,21,4,0)
;;=
;;^DD(.111,1,21,5,0)
;;=The M code can assume that DIXR contains the internal entry number of the
DINIT2A2 ;SFISC/MKO-KEY AND INDEX FILES ;11:29 AM 19 Nov 2012
+1 ;;22.0;VA FileMan;**1,167**;Mar 30, 1999;Build 20
+2 ;Per VHA Directive 2004-038, this routine should not be modified.
+3 FOR I=1:2
SET X=$TEXT(Q+I)
IF X=""
QUIT
SET Y=$EXTRACT($TEXT(Q+I+1),4,999)
SET X=$EXTRACT(X,4,999)
IF $ASCII(Y)=126
SET I=I+1
SET Y=$EXTRACT(Y,2,999)_$EXTRACT($TEXT(Q+I+1),5,99)
IF $ASCII(Y)=61
SET Y=$EXTRACT(Y,2,999)
SET @X=Y
+4 GOTO ^DINIT2A3
Q QUIT
+1 ;;^DD(.11,2.1,9)
+2 ;;=@
+3 ;;^DD(.11,2.1,21,0)
+4 ;;=^^16^16^2990430^
+5 ;;^DD(.11,2.1,21,1,0)
+6 ;;=Answer with the M code that FileMan should execute when the values of
+7 ;;^DD(.11,2.1,21,2,0)
+8 ;;=fields that make up the cross-reference are changed or deleted. When field
+9 ;;^DD(.11,2.1,21,3,0)
+10 ;;=values are changed, FileMan executes first the KILL LOGIC, then the SET
+11 ;;^DD(.11,2.1,21,4,0)
+12 ;;=LOGIC.
+13 ;;^DD(.11,2.1,21,5,0)
+14 ;;=
+15 ;;^DD(.11,2.1,21,6,0)
+16 ;;=Assume the DA array describes the record to be cross-referenced, and that
+17 ;;^DD(.11,2.1,21,7,0)
+18 ;;=the X(order#) array contains values after the transform for storage is
+19 ;;^DD(.11,2.1,21,8,0)
+20 ;;=applied, but before the truncation to the maximum length. The variable X
+21 ;;^DD(.11,2.1,21,9,0)
+22 ;;=also equals X(order#) of the lowest order number.
+23 ;;^DD(.11,2.1,21,10,0)
+24 ;;=
+25 ;;^DD(.11,2.1,21,11,0)
+26 ;;=When fields that make up a cross-reference are edited and the kill and set
+27 ;;^DD(.11,2.1,21,12,0)
+28 ;;=logic are executed, the X1(order#) array contains the old field values,
+29 ;;^DD(.11,2.1,21,13,0)
+30 ;;=and the X2(order#) array contains the new field values. If a record is
+31 ;;^DD(.11,2.1,21,14,0)
+32 ;;=being added, and there is an X1(order#) array element that corresponds to
+33 ;;^DD(.11,2.1,21,15,0)
+34 ;;=the .01 field, it is set to null. When a record is deleted, all X2(order#)
+35 ;;^DD(.11,2.1,21,16,0)
+36 ;;=array elements are null.
+37 ;;^DD(.11,2.1,"DT")
+38 ;;=2960116
+39 ;;^DD(.11,2.2,0)
+40 ;;=OVERFLOW KILL LOGIC^.112^^2.2;0
+41 ;;^DD(.11,2.2,"DT")
+42 ;;=2960124
+43 ;;^DD(.11,2.3,0)
+44 ;;=KILL CONDITION^F^^2.3;E1,245^K:$L(X)>245!($L(X)<1) X
+45 ;;^DD(.11,2.3,3)
+46 ;;=Answer must be a valid FileMan computed expression. Answer '??' for more help.
+47 ;;^DD(.11,2.3,21,0)
+48 ;;=^^5^5^2960124^
+49 ;;^DD(.11,2.3,21,1,0)
+50 ;;=Answer with a FileMan computed expression that will evaluate to Boolean
+51 ;;^DD(.11,2.3,21,2,0)
+52 ;;=true (according to the M rules for Boolean interpretation). FileMan will
+53 ;;^DD(.11,2.3,21,3,0)
+54 ;;=evaluate this expression whenever it would normally execute the
+55 ;;^DD(.11,2.3,21,4,0)
+56 ;;=cross-reference's Kill Logic, and will not execute the Kill Logic unless
+57 ;;^DD(.11,2.3,21,5,0)
+58 ;;=this condition evaluates to true.
+59 ;;^DD(.11,2.3,"DT")
+60 ;;=2960116
+61 ;;^DD(.11,2.4,0)
+62 ;;=KILL CONDITION CODE^K^^2.4;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
+63 ;;^DD(.11,2.4,3)
+64 ;;=This is Standard MUMPS code. Answer '??' for more help.
+65 ;;^DD(.11,2.4,9)
+66 ;;=@
+67 ;;^DD(.11,2.4,21,0)
+68 ;;=^^15^15^2990430^
+69 ;;^DD(.11,2.4,21,1,0)
+70 ;;=This is MUMPS code, that sets the variable X. The KILL LOGIC is executed
+71 ;;^DD(.11,2.4,21,2,0)
+72 ;;=only if the KILL CONDITION, if present, sets X such the X evaluates to
+73 ;;^DD(.11,2.4,21,3,0)
+74 ;;=true, (according to M rules for Boolean interpretation)
+75 ;;^DD(.11,2.4,21,4,0)
+76 ;;=
+77 ;;^DD(.11,2.4,21,5,0)
+78 ;;=Assume the DA array describes the record to be cross-referenced, and that
+79 ;;^DD(.11,2.4,21,6,0)
+80 ;;=the X(order#) array contains values after the transform for storage is
+81 ;;^DD(.11,2.4,21,7,0)
+82 ;;=applied, but before the truncation to the maximum length. The variable X
+83 ;;^DD(.11,2.4,21,8,0)
+84 ;;=also equals X(order#) of the lowest order number.
+85 ;;^DD(.11,2.4,21,9,0)
+86 ;;=
+87 ;;^DD(.11,2.4,21,10,0)
+88 ;;=When fields that make up a cross-reference are edited and the kill and set
+89 ;;^DD(.11,2.4,21,11,0)
+90 ;;=conditions are executed, the X1(order#) array contains the old field
+91 ;;^DD(.11,2.4,21,12,0)
+92 ;;=values, and the X2(order#) array contains the new field values. If a
+93 ;;^DD(.11,2.4,21,13,0)
+94 ;;=record is being added, and there is an X1(order#) array element that
+95 ;;^DD(.11,2.4,21,14,0)
+96 ;;=corresponds to the .01 field, it is set to null. When a record is deleted,
+97 ;;^DD(.11,2.4,21,15,0)
+98 ;;=all X2(order#) array elements are null.
+99 ;;^DD(.11,2.4,"DT")
+100 ;;=2970117
+101 ;;^DD(.11,2.5,0)
+102 ;;=KILL ENTIRE INDEX CODE^K^^2.5;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
+103 ;;^DD(.11,2.5,3)
+104 ;;=This is Standard MUMPS code. Answer '??' for more help.
+105 ;;^DD(.11,2.5,9)
+106 ;;=@
+107 ;;^DD(.11,2.5,21,0)
+108 ;;=^^4^4^2980911^
+109 ;;^DD(.11,2.5,21,1,0)
+110 ;;=This is a kill statement that can be executed to remove an entire index for
+111 ;;^DD(.11,2.5,21,2,0)
+112 ;;=all records in a file. When an entire file is reindexed, FileMan executes
+113 ;;^DD(.11,2.5,21,3,0)
+114 ;;=this code instead of looping through all the entries in a file and
+115 ;;^DD(.11,2.5,21,4,0)
+116 ;;=executing the kill logic once for each entry.
+117 ;;^DD(.11,666,0)
+118 ;;=RE-INDEXING^SI^1:NO RE-INDEXING ALLOWED;0:ALLOW REINDEXING^NOREINDEX;1
+119 ;;^DD(.11,666,3)
+120 ;;=Should the re-indexing of this cross reference be prohibited?
+121 ;;^DD(.11,666,21,0)
+122 ;;=^^5^5
+123 ;;^DD(.11,666,21,1,0)
+124 ;;=If you answer '1', this cross reference will not be re-indexed during a
+125 ;;^DD(.11,666,21,2,0)
+126 ;;=general re-indexing of this file, whether it's done via API or
+127 ;;^DD(.11,666,21,3,0)
+128 ;;=interactively. If you answer '0', which is the default, it will.
+129 ;;^DD(.11,666,21,4,0)
+130 ;;=A 'NO RE-INDEXING' cross-reference will ONLY be re-indexed
+131 ;;^DD(.11,666,21,5,0)
+132 ;;=if it is specifically named in an API call
+133 ;;^DD(.11,11.1,0)
+134 ;;=CROSS-REFERENCE VALUES^.114IA^^11.1;0
+135 ;;^DD(.11,11.1,"DT")
+136 ;;=2960221
+137 ;;^DD(.1101,0)
+138 ;;=DESCRIPTION SUB-FIELD^^.01^1
+139 ;;^DD(.1101,0,"DT")
+140 ;;=2960116
+141 ;;^DD(.1101,0,"NM","DESCRIPTION")
+142 ;;=
+143 ;;^DD(.1101,0,"UP")
+144 ;;=.11
+145 ;;^DD(.1101,.01,0)
+146 ;;=DESCRIPTION^W^^0;1^Q
+147 ;;^DD(.1101,.01,3)
+148 ;;=Answer '??' for more help.
+149 ;;^DD(.1101,.01,21,0)
+150 ;;=^^3^3^2960123^
+151 ;;^DD(.1101,.01,21,1,0)
+152 ;;=Answer should describe the purpose of this index, along with any technical
+153 ;;^DD(.1101,.01,21,2,0)
+154 ;;=information that might be useful to advanced users, developers,
+155 ;;^DD(.1101,.01,21,3,0)
+156 ;;=troubleshooters, or system managers.
+157 ;;^DD(.1101,.01,"DT")
+158 ;;=2960116
+159 ;;^DD(.111,0)
+160 ;;=OVERFLOW SET LOGIC SUB-FIELD^^1^2
+161 ;;^DD(.111,0,"DT")
+162 ;;=2960124
+163 ;;^DD(.111,0,"NM","OVERFLOW SET LOGIC")
+164 ;;=
+165 ;;^DD(.111,0,"UP")
+166 ;;=.11
+167 ;;^DD(.111,.01,0)
+168 ;;=OVERFLOW SET LOGIC NODE^MNJ6,0X^^0;1^K:+X'=X!(X>999999)!(X<1)!(X?.E1"."1N.N) X S:$D(X) DINUM=X
+169 ;;^DD(.111,.01,3)
+170 ;;=Type a Number between 1 and 999999, 0 Decimal Digits. Answer '??' for more help.
+171 ;;^DD(.111,.01,21,0)
+172 ;;=^^3^3^2980911^
+173 ;;^DD(.111,.01,21,1,0)
+174 ;;=Answer must be the number of the node under which the additional line of
+175 ;;^DD(.111,.01,21,2,0)
+176 ;;=set logic will be filed. Use the overflow nodes if the set logic is too
+177 ;;^DD(.111,.01,21,3,0)
+178 ;;=long to fit in the SET LOGIC field.
+179 ;;^DD(.111,.01,"DT")
+180 ;;=2980910
+181 ;;^DD(.111,1,0)
+182 ;;=OVERFLOW SET LOGIC^RK^^1;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
+183 ;;^DD(.111,1,3)
+184 ;;=Answer must be Standard M code. Answer '??' for more help.
+185 ;;^DD(.111,1,9)
+186 ;;=@
+187 ;;^DD(.111,1,21,0)
+188 ;;=^^6^6^2980911^
+189 ;;^DD(.111,1,21,1,0)
+190 ;;=Answer with the M code of the additional set logic stored at this node.
+191 ;;^DD(.111,1,21,2,0)
+192 ;;=FileMan will not automatically execute this additional code, so the set
+193 ;;^DD(.111,1,21,3,0)
+194 ;;=logic must invoke the additional code stored in this overflow node.
+195 ;;^DD(.111,1,21,4,0)
+196 ;;=
+197 ;;^DD(.111,1,21,5,0)
+198 ;;=The M code can assume that DIXR contains the internal entry number of the