The lookup entry (or code) can be associated with multiple key words or key phrases. The entry will be displayed if the user enters all or any part of a key phrase. For example: |**mtlu x-ref** KEYPHRASE: LOOKUP FILE: V SALT AND PEPPER NAME: JOHN HAIR COLOR: LIGHT BROWN SORT OF GRAY JACK PRETTY GRAY SCHNAUZER JILL GEORGIA CLAY MARY SORT OF GRAY JIM BLACK AND WHITE If each of the above keyphrases are associated with 'JIM' then users can enter the following combinations: 1. SALT, SALT AND PEPPER, SALT & PEPPER, PEPPER, SORT OF PEPPER, SCHNAUZER will return ONLY Jim. Note that SORT OF PEPPER returns only Jim because the tokens 'SORT' and 'PEPPER' must BOTH be true for a match. PEPPER is false for Mary. 2. SORT, SORT OF GRAY returns Mary and Jim 3. GRAY returns Mary, Jim, and Jack NOTE! LOOKUPS ARE PERFORMED IN THE FOLLOWING ORDER: 1. SHORTCUT<--stops here if a match is found 2. SYNONYM 3. KEYWORD
INPUT TRANSFORM: K:X[""""!($A(X)=45) X I $D(X) K:$L(X)>30!($L(X)<2)!'(X'?1P.E) X
LAST EDITED: OCT 16, 1990
HELP-PROMPT: Answer must be 2-30 characters in length.
DESCRIPTION:
A term or phrase that will be associated with a specific entry in a target file.
CROSS-REFERENCE: 8984.1^B
1)= S ^XT(8984.1,"B",$E(X,1,30),DA)=""
2)= K ^XT(8984.1,"B",$E(X,1,30),DA)
CROSS-REFERENCE: 8984.1^AIHS^MUMPS
1)= I $D(^XT(8984.1,DA,0)),$P(^(0),U,2)'="" S JL=$P(^(0),U,2),JL1=$P(JL,";"),JL2="^"_$P(JL,";",2),JL3=+$P(@(JL2_"0)"),U,2),JL3=$P(^XT(8984.4,JL3,0),U,3),%=JL2_"JL3,I,JL1,DA)" D S^XTLKWIC K JL,JL1,JL2,%,JL3
2)= I $D(^XT(8984.1,DA,0)),$P(^(0),U,2)'="" S JL=$P(^(0),U,2),JL1=$P(JL,";"),JL2="^"_$P(JL,";",2),JL3=+$P(@(JL2_"0)"),U,2),JL3=$P(^XT(8984.4,JL3,0),U,3),%=JL2_"JL3,I,JL1,DA)" D K^XTLKWIC K JL,JL1,JL2,JL3,%
This cross-reference passes the keyword or tokenized phrase into the special lookup cross-reference of the target file in the same manner as is done on the ENTRY field.
This field is a variable pointer to the file and entry with which the keyword is associated.
CROSS-REFERENCE: 8984.1^AC^MUMPS
1)= I $D(^XT(8984.1,DA,0)),$P(^(0),U,2)'="" S JLX=$P(^(0),U),JL=$P(^(0),U,2),JL1=$P(JL,";"),JL2="^"_$P(JL,";",2),JL3=+$P(@(JL2_"0)"),U,2),JL3=$P(^XT(8984.4,JL3,0),U,3),%=JL2_"JL3,I,JL1,DA)" D S^XTLKWIC K JL,JL1,JL2,JL3,JLX
,%
2)= I $D(^XT(8984.1,DA,0)),$P(^(0),U,2)'="" S JLX=$P(^(0),U),JL=X,JL1=$P(JL,";"),JL2="^"_$P(JL,";",2),JL3=+$P(@(JL2_"0)"),U,2),JL3=$P(^XT(8984.4,JL3,0),U,3),%=JL2_"JL3,I,JL1,DA)" D K^XTLKWIC K JL,JL1,JL2,JL3,JLX,%
This cross-reference passes the keyword or 'tokenized' phrase into the special lookup cross-reference of the target file.
CROSS-REFERENCE: ^^TRIGGER^8984.1^.03
1)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^XT(8984.1,D0,0)):^(0),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y X ^DD(8984.1,.02,1,2,1.1) X ^DD(8984.1,.02,1,2,1.4)
1.1)= S X=DIV X ^DD(8984.1,.02,1,2,49.3) S X=X_" "
1.4)= S DIH=$S($D(^XT(8984.1,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,3)=DIV,DIH=8984.1,DIG=.03 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
2)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^XT(8984.1,D0,0)):^(0),1:"") S X=$P(Y(1),U,3),X=X S DIU=X K Y S X="" X ^DD(8984.1,.02,1,2,2.4)
2.4)= S DIH=$S($D(^XT(8984.1,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,3)=DIV,DIH=8984.1,DIG=.03 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
49.2)=
49.3)= X ^DD(8984.1,.02,1,2,49.2) S X=DIV,C=$S(X="":-1,'$D(@(U_$P(X,";",2)_"0)")):-1,1:$P(^(0),U,2)),X=$S(X="":X,'$D(^(+X,0)):"",1:$P(^(0),U,1)),Y=X,C=$S($D(^DD(+C,.01,0)):$P(^(0),U,2),1:"D") D:X]"" Y^DIQ:C'["D" S X=Y,C=",
"
CREATE VALUE)= ENTRY_" "
DELETE VALUE)= @
FIELD)= CODE
CROSS-REFERENCE: ^^TRIGGER^8984.1^.04
1)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^XT(8984.1,D0,0)):^(0),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y X ^DD(8984.1,.02,1,3,1.1) X ^DD(8984.1,.02,1,3,1.4)
1.1)= S X=DIV S X="^"_$P(X,";",2)_"0)",X=$S($D(@X):+$P(^(0),U,2),1:"")
1.4)= S DIH=$S($D(^XT(8984.1,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,4)=DIV,DIH=8984.1,DIG=.04 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
2)= K DIV S DIV=X,D0=DA,DIV(0)=D0 S Y(1)=$S($D(^XT(8984.1,D0,0)):^(0),1:"") S X=$P(Y(1),U,4),X=X S DIU=X K Y S X="" X ^DD(8984.1,.02,1,3,2.4)
2.4)= S DIH=$S($D(^XT(8984.1,DIV(0),0)):^(0),1:""),DIV=X S $P(^(0),U,4)=DIV,DIH=8984.1,DIG=.04 D ^DICR:$O(^DD(DIH,DIG,1,0))>0
CREATE VALUE)= S X="^"_$P(X,";",2)_"0)",X=$S($D(@X):+$P(^(0),U,2),1:"")