- DINIT2A4 ;SFISC/MKO-KEY AND INDEX FILES ;3:01 PM 10 Jan 2000 [ 04/02/2003 8:25 AM ]
- ;;22.0;VA FileMan;**1001**;APR 1, 2003
- ;;22.0;VA FileMan;**1,20**;Mar 30, 1999
- ;Per VHA Directive 10-93-142, 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 ^DINIT2A5
- Q Q
- ;;^DD(.114,5.3,0)
- ;;=TRANSFORM FOR LOOKUP^K^^4;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
- ;;^DD(.114,5.3,3)
- ;;=This is Standard MUMPS code. Answer '??' for more help.
- ;;^DD(.114,5.3,9)
- ;;=@
- ;;^DD(.114,5.3,21,0)
- ;;=^^10^10^3000106^
- ;;^DD(.114,5.3,21,1,0)
- ;;=Used only during lookup.
- ;;^DD(.114,5.3,21,2,0)
- ;;=
- ;;^DD(.114,5.3,21,3,0)
- ;;=Answer should be M code that sets the variable X to a new value. X is the
- ;;^DD(.114,5.3,21,4,0)
- ;;=only input variable that is guaranteed to be defined and is equal to the
- ;;^DD(.114,5.3,21,5,0)
- ;;=lookup value entered by the user.
- ;;^DD(.114,5.3,21,6,0)
- ;;=
- ;;^DD(.114,5.3,21,7,0)
- ;;=During lookup, if the lookup value is not found in the index, FileMan will
- ;;^DD(.114,5.3,21,8,0)
- ;;=execute the TRANSFORM FOR LOOKUP code to transform the lookup value X. It
- ;;^DD(.114,5.3,21,9,0)
- ;;=will then search this index looking for a match to the transformed lookup
- ;;^DD(.114,5.3,21,10,0)
- ;;=value.
- ;;^DD(.114,5.3,"DT")
- ;;=3000105
- ;;^DD(.114,5.5,0)
- ;;=TRANSFORM FOR DISPLAY^K^^3;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
- ;;^DD(.114,5.5,3)
- ;;=This is Standard MUMPS code. Answer '??' for more help.
- ;;^DD(.114,5.5,9)
- ;;=@
- ;;^DD(.114,5.5,21,0)
- ;;=^^16^16^3000106^
- ;;^DD(.114,5.5,21,1,0)
- ;;=Used only during lookup.
- ;;^DD(.114,5.5,21,2,0)
- ;;=
- ;;^DD(.114,5.5,21,3,0)
- ;;=Answer should be M code that sets the variable X to a new value. X is the
- ;;^DD(.114,5.5,21,4,0)
- ;;=only variable that is guaranteed to be defined and is equal to the value
- ;;^DD(.114,5.5,21,5,0)
- ;;=of the subscript from the index.
- ;;^DD(.114,5.5,21,6,0)
- ;;=
- ;;^DD(.114,5.5,21,7,0)
- ;;=TRANSFORM FOR DISPLAY should be set only for an index value that has been
- ;;^DD(.114,5.5,21,8,0)
- ;;=transformed using the code in the TRANSFORM FOR STORAGE prior to storing
- ;;^DD(.114,5.5,21,9,0)
- ;;=the value in the index.
- ;;^DD(.114,5.5,21,10,0)
- ;;=
- ;;^DD(.114,5.5,21,11,0)
- ;;=The code should take the internal value from the index subscript X, and
- ;;^DD(.114,5.5,21,12,0)
- ;;=convert it back to a format that can be displayed to an end user. During
- ;;^DD(.114,5.5,21,13,0)
- ;;=lookup, if a match or matches are made to a lookup value that was
- ;;^DD(.114,5.5,21,14,0)
- ;;=transformed using the TRANSFORM FOR LOOKUP code on this index, then
- ;;^DD(.114,5.5,21,15,0)
- ;;=FileMan will execute the TRANSFORM FOR DISPLAY code before displaying the
- ;;^DD(.114,5.5,21,16,0)
- ;;=index value(s) to the end user.
- ;;^DD(.114,5.5,"DT")
- ;;=2980731
- ;;^DD(.114,6,0)
- ;;=MAXIMUM LENGTH^NJ3,0^^0;5^K:+X'=X!(X>240)!(X<1)!(X?.E1"."1N.N) X
- ;;^DD(.114,6,3)
- ;;=Answer must be between 1 and 240, with no decimal digits. Answer '??' for more help.
- ;;^DD(.114,6,21,0)
- ;;=^^7^7^2980911^
- ;;^DD(.114,6,21,1,0)
- ;;=Answer must be the maximum length this cross-reference value should have
- ;;^DD(.114,6,21,2,0)
- ;;=when stored as a subscript in the index. FileMan's lookup utilties
- ;;^DD(.114,6,21,3,0)
- ;;=account for lookup values longer than the maximum length.
- ;;^DD(.114,6,21,4,0)
- ;;=
- ;;^DD(.114,6,21,5,0)
- ;;=Specify a MAXIMUM LENGTH when an untruncated subscript may cause the
- ;;^DD(.114,6,21,6,0)
- ;;=length of a global reference in the index to exceed the M Portability
- ;;^DD(.114,6,21,7,0)
- ;;=Requirements.
- ;;^DD(.114,6,"DT")
- ;;=2960219
- ;;^DD(.114,7,0)
- ;;=COLLATION^S^F:forwards;B:backwards;^0;7^Q
- ;;^DD(.114,7,3)
- ;;=Answer '??' for more help.
- ;;^DD(.114,7,21,0)
- ;;=^^7^7^2980911^
- ;;^DD(.114,7,21,1,0)
- ;;=Answer with the direction FileMan's lookup utilities should $ORDER through
- ;;^DD(.114,7,21,2,0)
- ;;=this subscript when entries are returned or displayed to the user. If for
- ;;^DD(.114,7,21,3,0)
- ;;=example, you have a compound index on a Date of Birth field and a Name
- ;;^DD(.114,7,21,4,0)
- ;;=field, and you specify a COLLATION of 'backwards' on the Date of Birth
- ;;^DD(.114,7,21,5,0)
- ;;=value, the Lister and the Finder will return entries in reverse-date
- ;;^DD(.114,7,21,6,0)
- ;;=order. Likewise, question mark (?) help and partial matches in interactive
- ;;^DD(.114,7,21,7,0)
- ;;=^DIC lookups will display entries in reverse-date order.
- ;;^DD(.114,7,"DT")
- ;;=2970213
- ;;^DD(.114,8,0)
- ;;=LOOKUP PROMPT^F^^0;8^K:$L(X)>30!($L(X)<1) X
- ;;^DD(.114,8,3)
- ;;=Answer must be 1-30 characters in length. Answer '??' for more help.
- ;;^DD(.114,8,21,0)
- ;;=^^3^3^2980911^
- ;;^DD(.114,8,21,1,0)
- ;;=The text entered here will become a prompt for the user when this index is
- ;;^DD(.114,8,21,2,0)
- ;;=used for lookup (i.e., in the Classic FileMan calls to ^DIC.) If the text
- ;;^DD(.114,8,21,3,0)
- ;;=is missing, then the FIELD LABEL will be used as a default.
- ;;^DD(.114,8,"DT")
- ;;=2970506
- DINIT2A4 ;SFISC/MKO-KEY AND INDEX FILES ;3:01 PM 10 Jan 2000 [ 04/02/2003 8:25 AM ]
- +1 ;;22.0;VA FileMan;**1001**;APR 1, 2003
- +2 ;;22.0;VA FileMan;**1,20**;Mar 30, 1999
- +3 ;Per VHA Directive 10-93-142, this routine should not be modified.
- +4 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
- +5 GOTO ^DINIT2A5
- Q QUIT
- +1 ;;^DD(.114,5.3,0)
- +2 ;;=TRANSFORM FOR LOOKUP^K^^4;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
- +3 ;;^DD(.114,5.3,3)
- +4 ;;=This is Standard MUMPS code. Answer '??' for more help.
- +5 ;;^DD(.114,5.3,9)
- +6 ;;=@
- +7 ;;^DD(.114,5.3,21,0)
- +8 ;;=^^10^10^3000106^
- +9 ;;^DD(.114,5.3,21,1,0)
- +10 ;;=Used only during lookup.
- +11 ;;^DD(.114,5.3,21,2,0)
- +12 ;;=
- +13 ;;^DD(.114,5.3,21,3,0)
- +14 ;;=Answer should be M code that sets the variable X to a new value. X is the
- +15 ;;^DD(.114,5.3,21,4,0)
- +16 ;;=only input variable that is guaranteed to be defined and is equal to the
- +17 ;;^DD(.114,5.3,21,5,0)
- +18 ;;=lookup value entered by the user.
- +19 ;;^DD(.114,5.3,21,6,0)
- +20 ;;=
- +21 ;;^DD(.114,5.3,21,7,0)
- +22 ;;=During lookup, if the lookup value is not found in the index, FileMan will
- +23 ;;^DD(.114,5.3,21,8,0)
- +24 ;;=execute the TRANSFORM FOR LOOKUP code to transform the lookup value X. It
- +25 ;;^DD(.114,5.3,21,9,0)
- +26 ;;=will then search this index looking for a match to the transformed lookup
- +27 ;;^DD(.114,5.3,21,10,0)
- +28 ;;=value.
- +29 ;;^DD(.114,5.3,"DT")
- +30 ;;=3000105
- +31 ;;^DD(.114,5.5,0)
- +32 ;;=TRANSFORM FOR DISPLAY^K^^3;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
- +33 ;;^DD(.114,5.5,3)
- +34 ;;=This is Standard MUMPS code. Answer '??' for more help.
- +35 ;;^DD(.114,5.5,9)
- +36 ;;=@
- +37 ;;^DD(.114,5.5,21,0)
- +38 ;;=^^16^16^3000106^
- +39 ;;^DD(.114,5.5,21,1,0)
- +40 ;;=Used only during lookup.
- +41 ;;^DD(.114,5.5,21,2,0)
- +42 ;;=
- +43 ;;^DD(.114,5.5,21,3,0)
- +44 ;;=Answer should be M code that sets the variable X to a new value. X is the
- +45 ;;^DD(.114,5.5,21,4,0)
- +46 ;;=only variable that is guaranteed to be defined and is equal to the value
- +47 ;;^DD(.114,5.5,21,5,0)
- +48 ;;=of the subscript from the index.
- +49 ;;^DD(.114,5.5,21,6,0)
- +50 ;;=
- +51 ;;^DD(.114,5.5,21,7,0)
- +52 ;;=TRANSFORM FOR DISPLAY should be set only for an index value that has been
- +53 ;;^DD(.114,5.5,21,8,0)
- +54 ;;=transformed using the code in the TRANSFORM FOR STORAGE prior to storing
- +55 ;;^DD(.114,5.5,21,9,0)
- +56 ;;=the value in the index.
- +57 ;;^DD(.114,5.5,21,10,0)
- +58 ;;=
- +59 ;;^DD(.114,5.5,21,11,0)
- +60 ;;=The code should take the internal value from the index subscript X, and
- +61 ;;^DD(.114,5.5,21,12,0)
- +62 ;;=convert it back to a format that can be displayed to an end user. During
- +63 ;;^DD(.114,5.5,21,13,0)
- +64 ;;=lookup, if a match or matches are made to a lookup value that was
- +65 ;;^DD(.114,5.5,21,14,0)
- +66 ;;=transformed using the TRANSFORM FOR LOOKUP code on this index, then
- +67 ;;^DD(.114,5.5,21,15,0)
- +68 ;;=FileMan will execute the TRANSFORM FOR DISPLAY code before displaying the
- +69 ;;^DD(.114,5.5,21,16,0)
- +70 ;;=index value(s) to the end user.
- +71 ;;^DD(.114,5.5,"DT")
- +72 ;;=2980731
- +73 ;;^DD(.114,6,0)
- +74 ;;=MAXIMUM LENGTH^NJ3,0^^0;5^K:+X'=X!(X>240)!(X<1)!(X?.E1"."1N.N) X
- +75 ;;^DD(.114,6,3)
- +76 ;;=Answer must be between 1 and 240, with no decimal digits. Answer '??' for more help.
- +77 ;;^DD(.114,6,21,0)
- +78 ;;=^^7^7^2980911^
- +79 ;;^DD(.114,6,21,1,0)
- +80 ;;=Answer must be the maximum length this cross-reference value should have
- +81 ;;^DD(.114,6,21,2,0)
- +82 ;;=when stored as a subscript in the index. FileMan's lookup utilties
- +83 ;;^DD(.114,6,21,3,0)
- +84 ;;=account for lookup values longer than the maximum length.
- +85 ;;^DD(.114,6,21,4,0)
- +86 ;;=
- +87 ;;^DD(.114,6,21,5,0)
- +88 ;;=Specify a MAXIMUM LENGTH when an untruncated subscript may cause the
- +89 ;;^DD(.114,6,21,6,0)
- +90 ;;=length of a global reference in the index to exceed the M Portability
- +91 ;;^DD(.114,6,21,7,0)
- +92 ;;=Requirements.
- +93 ;;^DD(.114,6,"DT")
- +94 ;;=2960219
- +95 ;;^DD(.114,7,0)
- +96 ;;=COLLATION^S^F:forwards;B:backwards;^0;7^Q
- +97 ;;^DD(.114,7,3)
- +98 ;;=Answer '??' for more help.
- +99 ;;^DD(.114,7,21,0)
- +100 ;;=^^7^7^2980911^
- +101 ;;^DD(.114,7,21,1,0)
- +102 ;;=Answer with the direction FileMan's lookup utilities should $ORDER through
- +103 ;;^DD(.114,7,21,2,0)
- +104 ;;=this subscript when entries are returned or displayed to the user. If for
- +105 ;;^DD(.114,7,21,3,0)
- +106 ;;=example, you have a compound index on a Date of Birth field and a Name
- +107 ;;^DD(.114,7,21,4,0)
- +108 ;;=field, and you specify a COLLATION of 'backwards' on the Date of Birth
- +109 ;;^DD(.114,7,21,5,0)
- +110 ;;=value, the Lister and the Finder will return entries in reverse-date
- +111 ;;^DD(.114,7,21,6,0)
- +112 ;;=order. Likewise, question mark (?) help and partial matches in interactive
- +113 ;;^DD(.114,7,21,7,0)
- +114 ;;=^DIC lookups will display entries in reverse-date order.
- +115 ;;^DD(.114,7,"DT")
- +116 ;;=2970213
- +117 ;;^DD(.114,8,0)
- +118 ;;=LOOKUP PROMPT^F^^0;8^K:$L(X)>30!($L(X)<1) X
- +119 ;;^DD(.114,8,3)
- +120 ;;=Answer must be 1-30 characters in length. Answer '??' for more help.
- +121 ;;^DD(.114,8,21,0)
- +122 ;;=^^3^3^2980911^
- +123 ;;^DD(.114,8,21,1,0)
- +124 ;;=The text entered here will become a prompt for the user when this index is
- +125 ;;^DD(.114,8,21,2,0)
- +126 ;;=used for lookup (i.e., in the Classic FileMan calls to ^DIC.) If the text
- +127 ;;^DD(.114,8,21,3,0)
- +128 ;;=is missing, then the FIELD LABEL will be used as a default.
- +129 ;;^DD(.114,8,"DT")
- +130 ;;=2970506