- DINIT2B5 ;SFISC/MKO-SQLI FILES ;10:51 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 ^DINIT2B6
- Q Q
- ;;^DIC(1.5213,0,"GL")
- ;;=^DMSQ("KF",
- ;;^DIC("B","SQLI_KEY_FORMAT",1.5213)
- ;;=
- ;;^DIC(1.5213,"%D",0)
- ;;=^^5^5^2970806^^^
- ;;^DIC(1.5213,"%D",1,0)
- ;;=Strategies for converting base values into key values.
- ;;^DIC(1.5213,"%D",2,0)
- ;;=Soundex and upper case conversion are common examples. This implies that
- ;;^DIC(1.5213,"%D",3,0)
- ;;=comparisons of key values with base values must be preceded by conversion
- ;;^DIC(1.5213,"%D",4,0)
- ;;=of the base value to key value. Key formats are frequently lossy; they
- ;;^DIC(1.5213,"%D",5,0)
- ;;=can't be converted uniquely back to base format.
- ;;^DD(1.5213,0)
- ;;=FIELD^^4^5
- ;;^DD(1.5213,0,"DDA")
- ;;=N
- ;;^DD(1.5213,0,"DT")
- ;;=2960820
- ;;^DD(1.5213,0,"IX","B",1.5213,.01)
- ;;=
- ;;^DD(1.5213,0,"IX","C",1.5213,1)
- ;;=
- ;;^DD(1.5213,0,"NM","SQLI_KEY_FORMAT")
- ;;=
- ;;^DD(1.5213,0,"PT",1.5218,7)
- ;;=
- ;;^DD(1.5213,0,"VRPK")
- ;;=DI
- ;;^DD(1.5213,.01,0)
- ;;=KF_NAME^RF^^0;1^K:$L(X)>30!($L(X)<3)!'($TR(X,"_")?1U.UN) X
- ;;^DD(1.5213,.01,.1)
- ;;=Key Format
- ;;^DD(1.5213,.01,1,0)
- ;;=^.1
- ;;^DD(1.5213,.01,1,1,0)
- ;;=1.5213^B
- ;;^DD(1.5213,.01,1,1,1)
- ;;=S ^DMSQ("KF","B",$E(X,1,30),DA)=""
- ;;^DD(1.5213,.01,1,1,2)
- ;;=K ^DMSQ("KF","B",$E(X,1,30),DA)
- ;;^DD(1.5213,.01,3)
- ;;=Answer must be 3-30 characters in length.
- ;;^DD(1.5213,.01,9)
- ;;=^
- ;;^DD(1.5213,.01,"DT")
- ;;=2960820
- ;;^DD(1.5213,1,0)
- ;;=KF_DATA_TYPE^RP1.5211'^DMSQ("DT",^0;2^Q
- ;;^DD(1.5213,1,1,0)
- ;;=^.1
- ;;^DD(1.5213,1,1,1,0)
- ;;=1.5213^C
- ;;^DD(1.5213,1,1,1,1)
- ;;=S ^DMSQ("KF","C",$E(X,1,30),DA)=""
- ;;^DD(1.5213,1,1,1,2)
- ;;=K ^DMSQ("KF","C",$E(X,1,30),DA)
- ;;^DD(1.5213,1,1,1,"%D",0)
- ;;=^^1^1^2960823^
- ;;^DD(1.5213,1,1,1,"%D",1,0)
- ;;=KEY FORMAT BY DATA TYPE
- ;;^DD(1.5213,1,1,1,"DT")
- ;;=2960823
- ;;^DD(1.5213,1,3)
- ;;=Enter the ODBC data type of this key
- ;;^DD(1.5213,1,9)
- ;;=^
- ;;^DD(1.5213,1,"DT")
- ;;=2960823
- ;;^DD(1.5213,2,0)
- ;;=KF_COMMENT^F^^0;3^K:$L(X)>60!($L(X)<3) X
- ;;^DD(1.5213,2,3)
- ;;=Answer must be 3-60 characters in length.
- ;;^DD(1.5213,2,9)
- ;;=^
- ;;^DD(1.5213,2,"DT")
- ;;=2960820
- ;;^DD(1.5213,3,0)
- ;;=KF_INT_EXPR^K^^1;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
- ;;^DD(1.5213,3,3)
- ;;=This is Standard MUMPS code.
- ;;^DD(1.5213,3,9)
- ;;=^
- ;;^DD(1.5213,3,21,0)
- ;;=^^1^1^2960820^
- ;;^DD(1.5213,3,21,1,0)
- ;;=An M expression which converts X to it's key format
- ;;^DD(1.5213,3,"DT")
- ;;=2960820
- ;;^DD(1.5213,4,0)
- ;;=KF_INT_EXEC^K^^2;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
- ;;^DD(1.5213,4,3)
- ;;=This is Standard MUMPS code.
- ;;^DD(1.5213,4,9)
- ;;=^
- ;;^DD(1.5213,4,21,0)
- ;;=^^1^1^2960820^
- ;;^DD(1.5213,4,21,1,0)
- ;;=A line of M code which converts X to its key format
- ;;^DD(1.5213,4,"DT")
- ;;=2960820
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDINIT2B5 3277 printed Feb 19, 2025@00:17:53 Page 2
- DINIT2B5 ;SFISC/MKO-SQLI FILES ;10:51 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 ^DINIT2B6
- Q QUIT
- +1 ;;^DIC(1.5213,0,"GL")
- +2 ;;=^DMSQ("KF",
- +3 ;;^DIC("B","SQLI_KEY_FORMAT",1.5213)
- +4 ;;=
- +5 ;;^DIC(1.5213,"%D",0)
- +6 ;;=^^5^5^2970806^^^
- +7 ;;^DIC(1.5213,"%D",1,0)
- +8 ;;=Strategies for converting base values into key values.
- +9 ;;^DIC(1.5213,"%D",2,0)
- +10 ;;=Soundex and upper case conversion are common examples. This implies that
- +11 ;;^DIC(1.5213,"%D",3,0)
- +12 ;;=comparisons of key values with base values must be preceded by conversion
- +13 ;;^DIC(1.5213,"%D",4,0)
- +14 ;;=of the base value to key value. Key formats are frequently lossy; they
- +15 ;;^DIC(1.5213,"%D",5,0)
- +16 ;;=can't be converted uniquely back to base format.
- +17 ;;^DD(1.5213,0)
- +18 ;;=FIELD^^4^5
- +19 ;;^DD(1.5213,0,"DDA")
- +20 ;;=N
- +21 ;;^DD(1.5213,0,"DT")
- +22 ;;=2960820
- +23 ;;^DD(1.5213,0,"IX","B",1.5213,.01)
- +24 ;;=
- +25 ;;^DD(1.5213,0,"IX","C",1.5213,1)
- +26 ;;=
- +27 ;;^DD(1.5213,0,"NM","SQLI_KEY_FORMAT")
- +28 ;;=
- +29 ;;^DD(1.5213,0,"PT",1.5218,7)
- +30 ;;=
- +31 ;;^DD(1.5213,0,"VRPK")
- +32 ;;=DI
- +33 ;;^DD(1.5213,.01,0)
- +34 ;;=KF_NAME^RF^^0;1^K:$L(X)>30!($L(X)<3)!'($TR(X,"_")?1U.UN) X
- +35 ;;^DD(1.5213,.01,.1)
- +36 ;;=Key Format
- +37 ;;^DD(1.5213,.01,1,0)
- +38 ;;=^.1
- +39 ;;^DD(1.5213,.01,1,1,0)
- +40 ;;=1.5213^B
- +41 ;;^DD(1.5213,.01,1,1,1)
- +42 ;;=S ^DMSQ("KF","B",$E(X,1,30),DA)=""
- +43 ;;^DD(1.5213,.01,1,1,2)
- +44 ;;=K ^DMSQ("KF","B",$E(X,1,30),DA)
- +45 ;;^DD(1.5213,.01,3)
- +46 ;;=Answer must be 3-30 characters in length.
- +47 ;;^DD(1.5213,.01,9)
- +48 ;;=^
- +49 ;;^DD(1.5213,.01,"DT")
- +50 ;;=2960820
- +51 ;;^DD(1.5213,1,0)
- +52 ;;=KF_DATA_TYPE^RP1.5211'^DMSQ("DT",^0;2^Q
- +53 ;;^DD(1.5213,1,1,0)
- +54 ;;=^.1
- +55 ;;^DD(1.5213,1,1,1,0)
- +56 ;;=1.5213^C
- +57 ;;^DD(1.5213,1,1,1,1)
- +58 ;;=S ^DMSQ("KF","C",$E(X,1,30),DA)=""
- +59 ;;^DD(1.5213,1,1,1,2)
- +60 ;;=K ^DMSQ("KF","C",$E(X,1,30),DA)
- +61 ;;^DD(1.5213,1,1,1,"%D",0)
- +62 ;;=^^1^1^2960823^
- +63 ;;^DD(1.5213,1,1,1,"%D",1,0)
- +64 ;;=KEY FORMAT BY DATA TYPE
- +65 ;;^DD(1.5213,1,1,1,"DT")
- +66 ;;=2960823
- +67 ;;^DD(1.5213,1,3)
- +68 ;;=Enter the ODBC data type of this key
- +69 ;;^DD(1.5213,1,9)
- +70 ;;=^
- +71 ;;^DD(1.5213,1,"DT")
- +72 ;;=2960823
- +73 ;;^DD(1.5213,2,0)
- +74 ;;=KF_COMMENT^F^^0;3^K:$L(X)>60!($L(X)<3) X
- +75 ;;^DD(1.5213,2,3)
- +76 ;;=Answer must be 3-60 characters in length.
- +77 ;;^DD(1.5213,2,9)
- +78 ;;=^
- +79 ;;^DD(1.5213,2,"DT")
- +80 ;;=2960820
- +81 ;;^DD(1.5213,3,0)
- +82 ;;=KF_INT_EXPR^K^^1;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
- +83 ;;^DD(1.5213,3,3)
- +84 ;;=This is Standard MUMPS code.
- +85 ;;^DD(1.5213,3,9)
- +86 ;;=^
- +87 ;;^DD(1.5213,3,21,0)
- +88 ;;=^^1^1^2960820^
- +89 ;;^DD(1.5213,3,21,1,0)
- +90 ;;=An M expression which converts X to it's key format
- +91 ;;^DD(1.5213,3,"DT")
- +92 ;;=2960820
- +93 ;;^DD(1.5213,4,0)
- +94 ;;=KF_INT_EXEC^K^^2;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
- +95 ;;^DD(1.5213,4,3)
- +96 ;;=This is Standard MUMPS code.
- +97 ;;^DD(1.5213,4,9)
- +98 ;;=^
- +99 ;;^DD(1.5213,4,21,0)
- +100 ;;=^^1^1^2960820^
- +101 ;;^DD(1.5213,4,21,1,0)
- +102 ;;=A line of M code which converts X to its key format
- +103 ;;^DD(1.5213,4,"DT")
- +104 ;;=2960820