DINIT2A0 ;SFISC/MKO-KEY AND INDEX FILES ;10:50 AM 30 Mar 1999
;;22.2;VA FileMan;;Jan 05, 2016;Build 42
;;Per VA Directive 6402, this routine should not be modified.
;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
;;Licensed under the terms of the Apache License, Version 2.0.
;
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 ^DINIT2A1
Q Q
;;^DIC(.11,0,"GL")
;;=^DD("IX",
;;^DIC("B","INDEX",.11)
;;=
;;^DIC(.11,"%D",0)
;;=^^5^5^2980911^
;;^DIC(.11,"%D",1,0)
;;=This file stores information about new-style cross-references defined on a
;;^DIC(.11,"%D",2,0)
;;=file. Whereas traditional cross-references are stored under the 1 nodes of
;;^DIC(.11,"%D",3,0)
;;=the ^DD for a particular field, new-style cross-references are stored in
;;^DIC(.11,"%D",4,0)
;;=this file and can consist of one field (simple cross-references), as well
;;^DIC(.11,"%D",5,0)
;;=as more than one field (compound cross-references).
;;^DD(.11,0)
;;=FIELD^^11.1^20
;;^DD(.11,0,"DDA")
;;=N
;;^DD(.11,0,"DT")
;;=2980908
;;^DD(.11,0,"ID","DI SHORT DESCRIPTION 50")
;;=D EN^DDIOL($E($P(^(0),U,3),1,50),"","?0")
;;^DD(.11,0,"IX","AC",.11,.51)
;;=
;;^DD(.11,0,"IX","B",.11,.01)
;;=
;;^DD(.11,0,"NM","INDEX")
;;=
;;^DD(.11,0,"PT",.31,3)
;;=
;;^DD(.11,.01,0)
;;=FILE^RNJ20,7^^0;1^K:+X'=X!(X>999999999999)!(X<0)!(X?.E1"."8N.N) X
;;^DD(.11,.01,1,0)
;;=^.1^^-1
;;^DD(.11,.01,1,1,0)
;;=.11^B
;;^DD(.11,.01,1,1,1)
;;=S ^DD("IX","B",$E(X,1,30),DA)=""
;;^DD(.11,.01,1,1,2)
;;=K ^DD("IX","B",$E(X,1,30),DA)
;;^DD(.11,.01,1,1,3)
;;=Lets developers pick indexes by file number
;;^DD(.11,.01,1,1,"%D",0)
;;=^^2^2^2980911^
;;^DD(.11,.01,1,1,"%D",1,0)
;;=The B index, on the .01 (File) of the Index file, lets developers pick
;;^DD(.11,.01,1,1,"%D",2,0)
;;=indexes by the numbers of the files they cross-reference.
;;^DD(.11,.01,3)
;;=Answer must be between 0 and 999999999999, with up to 7 decimal digits. Answer '??' for more help.
;;^DD(.11,.01,21,0)
;;=^^3^3^2980910^^
;;^DD(.11,.01,21,1,0)
;;=Answer should be the number of the file cross-referenced by this index.
;;^DD(.11,.01,21,2,0)
;;=For whole file cross-references on subfiles, answer with the number of
;;^DD(.11,.01,21,3,0)
;;=the file where the index physically resides, not the subfile number.
;;^DD(.11,.01,"DT")
;;=2980611
;;^DD(.11,.02,0)
;;=NAME^RF^^0;2^K:$L(X)>30!($L(X)<1)!'(X?1A.AN) X
;;^DD(.11,.02,1,0)
;;=^.1^^0
;;^DD(.11,.02,3)
;;=Answer must be 1-30 characters in length. Answer '??' for more help.
;;^DD(.11,.02,21,0)
;;=^^4^4^2980911^
;;^DD(.11,.02,21,1,0)
;;=Answer must be the name of the index. For example, the name of the default
;;^DD(.11,.02,21,2,0)
;;=lookup index on a file's .01 field is B, the name of the uniqueness index
;;^DD(.11,.02,21,3,0)
;;=of a compound key is BB, and the name of an index not used for lookup must
;;^DD(.11,.02,21,4,0)
;;=start with A.
;;^DD(.11,.02,"DT")
;;=2990303
;;^DD(.11,.1,0)
;;=DESCRIPTION^.1101^^.1;0
;;^DD(.11,.11,0)
;;=SHORT DESCRIPTION^RF^^0;3^K:$L(X)>79!($L(X)<1) X
;;^DD(.11,.11,3)
;;=Answer must be 1-79 characters in length. Answer '??' for more help.
;;^DD(.11,.11,21,0)
;;=^^2^2^2980910^
;;^DD(.11,.11,21,1,0)
;;=Answer should be text briefly explaining the function of this
;;^DD(.11,.11,21,2,0)
;;=cross-reference.
;;^DD(.11,.11,"DT")
;;=2960216
;;^DD(.11,.2,0)
;;=TYPE^RS^R:REGULAR;MU:MUMPS;^0;4^Q
;;^DD(.11,.2,3)
;;=Answer '??' for more help.
;;^DD(.11,.2,21,0)
;;=^^5^5^2980911^
;;^DD(.11,.2,21,1,0)
;;=REGULAR - One or more field values are stored in an index on the file. The
;;^DD(.11,.2,21,2,0)
;;=index can be used for sorting, or optionally, looking up entries.
;;^DD(.11,.2,21,3,0)
;;=
;;^DD(.11,.2,21,4,0)
;;=MUMPS - Customizable M code executes whenever a field that makes up the
;;^DD(.11,.2,21,5,0)
;;=cross-references changes.
;;^DD(.11,.2,"DT")
;;=2970718
;;^DD(.11,.4,0)
;;=EXECUTION^RS^F:FIELD;R:RECORD;^0;6^Q
;;^DD(.11,.4,1,0)
;;=^.1^^0
;;^DD(.11,.4,3)
;;=Answer '??' for more help.
;;^DD(.11,.4,21,0)
;;=^^7^7^2980911^^
;;^DD(.11,.4,21,1,0)
;;=Answer with the code that indicates whether the cross reference logic
;;^DD(.11,.4,21,2,0)
;;=should be executed after a field in the index changes, or only after all
;;^DD(.11,.4,21,3,0)
;;=fields in a record are updated. The logic for most simple (single-field)
;;^DD(.11,.4,21,4,0)
;;=indexes should be executed immediately after the field changes, and so
;;^DD(.11,.4,21,5,0)
;;=should get the code 'F'. The logic for most compound indexes should be
;;^DD(.11,.4,21,6,0)
;;=executed only once after a transaction on the entire record is complete,
;;^DD(.11,.4,21,7,0)
;;=and so should get the code 'R'. Exceptions to this rule are rare.
;;^DD(.11,.4,"DT")
;;=2980611
;;^DD(.11,.41,0)
;;=ACTIVITY^FX^^0;7^K:$L(X)>2!($L(X)<1)!($TR(X,"IR")]"") X
;;^DD(.11,.41,3)
;;=Answer must be 2 characters in length. Answer '??' for more help.
;;^DD(.11,.41,21,0)
;;=^^15^15^2990225^
;;^DD(.11,.41,21,1,0)
;;=Answer with the flags that control whether FileMan fires this
;;^DD(.11,.41,21,2,0)
;;=cross-reference during an installation and a re-cross-referencing
;;^DD(.11,.41,21,3,0)
;;=operation. The possible flags are:
;;^DD(.11,.41,21,4,0)
;;=
;;^DD(.11,.41,21,5,0)
;;= I = Installing an entry at a site
;;^DD(.11,.41,21,6,0)
;;= R = Re-cross-referencing this index
;;^DD(.11,.41,21,7,0)
;;=
;;^DD(.11,.41,21,8,0)
;;=FileMan automatically fires cross-references during an edit, regardless of
;;^DD(.11,.41,21,9,0)
;;=Activity, though you can control whether a cross-reference is fired by
;;^DD(.11,.41,21,10,0)
;;=entering Set and Kill Conditions.
;;^DD(.11,.41,21,11,0)
;;=
;;^DD(.11,.41,21,12,0)
;;=Also, if you explicity select a cross-reference in an EN^DIK, EN1^DIK, or
;;^DD(.11,.41,21,13,0)
;;=ENALL^DIK call, or in the UTILITY FUNCTIONS/RE-INDEX FILE option on the VA
;;^DD(.11,.41,21,14,0)
;;=FileMan menu, that cross-reference will be fired whether or not its
;;^DD(.11,.41,21,15,0)
;;=Activity contains an "R".
;;^DD(.11,.41,"DT")
;;=2980611
;;^DD(.11,.42,0)
;;=USE^S^LS:LOOKUP & SORTING;S:SORTING ONLY;A:ACTION;^0;14^Q
;;^DD(.11,.42,3)
;;=Controls how the index will be used by Classic FileMan Lookup (^DIC), Finder (FIND^DIC and $$FIND1^DIC) and Sort/Print (EN1^DIP). Answer '??' for more help.
;;^DD(.11,.42,21,0)
;;=^^15^15^2980911^^
;;^DD(.11,.42,21,1,0)
;;=LOOKUP & SORTING - The index name starts with "B" or a letter that
;;^DD(.11,.42,21,2,0)
;;=alphabetically follows "B". Calls to Classic FileMan lookup (^DIC) or the
;;^DD(.11,.42,21,3,0)
;;=Finder (FIND^DIC or $$FIND1^DIC) where the index is not specified will
;;^DD(.11,.42,21,4,0)
;;=include this index in the search. The index will be available for use by
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDINIT2A0 7165 printed Dec 13, 2024@02:51:24 Page 2
DINIT2A0 ;SFISC/MKO-KEY AND INDEX FILES ;10:50 AM 30 Mar 1999
+1 ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
+4 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
+5 ;;Licensed under the terms of the Apache License, Version 2.0.
+6 ;
+7 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
+8 GOTO ^DINIT2A1
Q QUIT
+1 ;;^DIC(.11,0,"GL")
+2 ;;=^DD("IX",
+3 ;;^DIC("B","INDEX",.11)
+4 ;;=
+5 ;;^DIC(.11,"%D",0)
+6 ;;=^^5^5^2980911^
+7 ;;^DIC(.11,"%D",1,0)
+8 ;;=This file stores information about new-style cross-references defined on a
+9 ;;^DIC(.11,"%D",2,0)
+10 ;;=file. Whereas traditional cross-references are stored under the 1 nodes of
+11 ;;^DIC(.11,"%D",3,0)
+12 ;;=the ^DD for a particular field, new-style cross-references are stored in
+13 ;;^DIC(.11,"%D",4,0)
+14 ;;=this file and can consist of one field (simple cross-references), as well
+15 ;;^DIC(.11,"%D",5,0)
+16 ;;=as more than one field (compound cross-references).
+17 ;;^DD(.11,0)
+18 ;;=FIELD^^11.1^20
+19 ;;^DD(.11,0,"DDA")
+20 ;;=N
+21 ;;^DD(.11,0,"DT")
+22 ;;=2980908
+23 ;;^DD(.11,0,"ID","DI SHORT DESCRIPTION 50")
+24 ;;=D EN^DDIOL($E($P(^(0),U,3),1,50),"","?0")
+25 ;;^DD(.11,0,"IX","AC",.11,.51)
+26 ;;=
+27 ;;^DD(.11,0,"IX","B",.11,.01)
+28 ;;=
+29 ;;^DD(.11,0,"NM","INDEX")
+30 ;;=
+31 ;;^DD(.11,0,"PT",.31,3)
+32 ;;=
+33 ;;^DD(.11,.01,0)
+34 ;;=FILE^RNJ20,7^^0;1^K:+X'=X!(X>999999999999)!(X<0)!(X?.E1"."8N.N) X
+35 ;;^DD(.11,.01,1,0)
+36 ;;=^.1^^-1
+37 ;;^DD(.11,.01,1,1,0)
+38 ;;=.11^B
+39 ;;^DD(.11,.01,1,1,1)
+40 ;;=S ^DD("IX","B",$E(X,1,30),DA)=""
+41 ;;^DD(.11,.01,1,1,2)
+42 ;;=K ^DD("IX","B",$E(X,1,30),DA)
+43 ;;^DD(.11,.01,1,1,3)
+44 ;;=Lets developers pick indexes by file number
+45 ;;^DD(.11,.01,1,1,"%D",0)
+46 ;;=^^2^2^2980911^
+47 ;;^DD(.11,.01,1,1,"%D",1,0)
+48 ;;=The B index, on the .01 (File) of the Index file, lets developers pick
+49 ;;^DD(.11,.01,1,1,"%D",2,0)
+50 ;;=indexes by the numbers of the files they cross-reference.
+51 ;;^DD(.11,.01,3)
+52 ;;=Answer must be between 0 and 999999999999, with up to 7 decimal digits. Answer '??' for more help.
+53 ;;^DD(.11,.01,21,0)
+54 ;;=^^3^3^2980910^^
+55 ;;^DD(.11,.01,21,1,0)
+56 ;;=Answer should be the number of the file cross-referenced by this index.
+57 ;;^DD(.11,.01,21,2,0)
+58 ;;=For whole file cross-references on subfiles, answer with the number of
+59 ;;^DD(.11,.01,21,3,0)
+60 ;;=the file where the index physically resides, not the subfile number.
+61 ;;^DD(.11,.01,"DT")
+62 ;;=2980611
+63 ;;^DD(.11,.02,0)
+64 ;;=NAME^RF^^0;2^K:$L(X)>30!($L(X)<1)!'(X?1A.AN) X
+65 ;;^DD(.11,.02,1,0)
+66 ;;=^.1^^0
+67 ;;^DD(.11,.02,3)
+68 ;;=Answer must be 1-30 characters in length. Answer '??' for more help.
+69 ;;^DD(.11,.02,21,0)
+70 ;;=^^4^4^2980911^
+71 ;;^DD(.11,.02,21,1,0)
+72 ;;=Answer must be the name of the index. For example, the name of the default
+73 ;;^DD(.11,.02,21,2,0)
+74 ;;=lookup index on a file's .01 field is B, the name of the uniqueness index
+75 ;;^DD(.11,.02,21,3,0)
+76 ;;=of a compound key is BB, and the name of an index not used for lookup must
+77 ;;^DD(.11,.02,21,4,0)
+78 ;;=start with A.
+79 ;;^DD(.11,.02,"DT")
+80 ;;=2990303
+81 ;;^DD(.11,.1,0)
+82 ;;=DESCRIPTION^.1101^^.1;0
+83 ;;^DD(.11,.11,0)
+84 ;;=SHORT DESCRIPTION^RF^^0;3^K:$L(X)>79!($L(X)<1) X
+85 ;;^DD(.11,.11,3)
+86 ;;=Answer must be 1-79 characters in length. Answer '??' for more help.
+87 ;;^DD(.11,.11,21,0)
+88 ;;=^^2^2^2980910^
+89 ;;^DD(.11,.11,21,1,0)
+90 ;;=Answer should be text briefly explaining the function of this
+91 ;;^DD(.11,.11,21,2,0)
+92 ;;=cross-reference.
+93 ;;^DD(.11,.11,"DT")
+94 ;;=2960216
+95 ;;^DD(.11,.2,0)
+96 ;;=TYPE^RS^R:REGULAR;MU:MUMPS;^0;4^Q
+97 ;;^DD(.11,.2,3)
+98 ;;=Answer '??' for more help.
+99 ;;^DD(.11,.2,21,0)
+100 ;;=^^5^5^2980911^
+101 ;;^DD(.11,.2,21,1,0)
+102 ;;=REGULAR - One or more field values are stored in an index on the file. The
+103 ;;^DD(.11,.2,21,2,0)
+104 ;;=index can be used for sorting, or optionally, looking up entries.
+105 ;;^DD(.11,.2,21,3,0)
+106 ;;=
+107 ;;^DD(.11,.2,21,4,0)
+108 ;;=MUMPS - Customizable M code executes whenever a field that makes up the
+109 ;;^DD(.11,.2,21,5,0)
+110 ;;=cross-references changes.
+111 ;;^DD(.11,.2,"DT")
+112 ;;=2970718
+113 ;;^DD(.11,.4,0)
+114 ;;=EXECUTION^RS^F:FIELD;R:RECORD;^0;6^Q
+115 ;;^DD(.11,.4,1,0)
+116 ;;=^.1^^0
+117 ;;^DD(.11,.4,3)
+118 ;;=Answer '??' for more help.
+119 ;;^DD(.11,.4,21,0)
+120 ;;=^^7^7^2980911^^
+121 ;;^DD(.11,.4,21,1,0)
+122 ;;=Answer with the code that indicates whether the cross reference logic
+123 ;;^DD(.11,.4,21,2,0)
+124 ;;=should be executed after a field in the index changes, or only after all
+125 ;;^DD(.11,.4,21,3,0)
+126 ;;=fields in a record are updated. The logic for most simple (single-field)
+127 ;;^DD(.11,.4,21,4,0)
+128 ;;=indexes should be executed immediately after the field changes, and so
+129 ;;^DD(.11,.4,21,5,0)
+130 ;;=should get the code 'F'. The logic for most compound indexes should be
+131 ;;^DD(.11,.4,21,6,0)
+132 ;;=executed only once after a transaction on the entire record is complete,
+133 ;;^DD(.11,.4,21,7,0)
+134 ;;=and so should get the code 'R'. Exceptions to this rule are rare.
+135 ;;^DD(.11,.4,"DT")
+136 ;;=2980611
+137 ;;^DD(.11,.41,0)
+138 ;;=ACTIVITY^FX^^0;7^K:$L(X)>2!($L(X)<1)!($TR(X,"IR")]"") X
+139 ;;^DD(.11,.41,3)
+140 ;;=Answer must be 2 characters in length. Answer '??' for more help.
+141 ;;^DD(.11,.41,21,0)
+142 ;;=^^15^15^2990225^
+143 ;;^DD(.11,.41,21,1,0)
+144 ;;=Answer with the flags that control whether FileMan fires this
+145 ;;^DD(.11,.41,21,2,0)
+146 ;;=cross-reference during an installation and a re-cross-referencing
+147 ;;^DD(.11,.41,21,3,0)
+148 ;;=operation. The possible flags are:
+149 ;;^DD(.11,.41,21,4,0)
+150 ;;=
+151 ;;^DD(.11,.41,21,5,0)
+152 ;;= I = Installing an entry at a site
+153 ;;^DD(.11,.41,21,6,0)
+154 ;;= R = Re-cross-referencing this index
+155 ;;^DD(.11,.41,21,7,0)
+156 ;;=
+157 ;;^DD(.11,.41,21,8,0)
+158 ;;=FileMan automatically fires cross-references during an edit, regardless of
+159 ;;^DD(.11,.41,21,9,0)
+160 ;;=Activity, though you can control whether a cross-reference is fired by
+161 ;;^DD(.11,.41,21,10,0)
+162 ;;=entering Set and Kill Conditions.
+163 ;;^DD(.11,.41,21,11,0)
+164 ;;=
+165 ;;^DD(.11,.41,21,12,0)
+166 ;;=Also, if you explicity select a cross-reference in an EN^DIK, EN1^DIK, or
+167 ;;^DD(.11,.41,21,13,0)
+168 ;;=ENALL^DIK call, or in the UTILITY FUNCTIONS/RE-INDEX FILE option on the VA
+169 ;;^DD(.11,.41,21,14,0)
+170 ;;=FileMan menu, that cross-reference will be fired whether or not its
+171 ;;^DD(.11,.41,21,15,0)
+172 ;;=Activity contains an "R".
+173 ;;^DD(.11,.41,"DT")
+174 ;;=2980611
+175 ;;^DD(.11,.42,0)
+176 ;;=USE^S^LS:LOOKUP & SORTING;S:SORTING ONLY;A:ACTION;^0;14^Q
+177 ;;^DD(.11,.42,3)
+178 ;;=Controls how the index will be used by Classic FileMan Lookup (^DIC), Finder (FIND^DIC and $$FIND1^DIC) and Sort/Print (EN1^DIP). Answer '??' for more help.
+179 ;;^DD(.11,.42,21,0)
+180 ;;=^^15^15^2980911^^
+181 ;;^DD(.11,.42,21,1,0)
+182 ;;=LOOKUP & SORTING - The index name starts with "B" or a letter that
+183 ;;^DD(.11,.42,21,2,0)
+184 ;;=alphabetically follows "B". Calls to Classic FileMan lookup (^DIC) or the
+185 ;;^DD(.11,.42,21,3,0)
+186 ;;=Finder (FIND^DIC or $$FIND1^DIC) where the index is not specified will
+187 ;;^DD(.11,.42,21,4,0)
+188 ;;=include this index in the search. The index will be available for use by