SNOMED Documentation Search


 Other Documents

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The performance of single keyword searches is highly dependent on the number of candidate returned by the keyword for subsequent filtering. The extremely high number of matches for some words in common use makes it likely that some searches will be unacceptably slow.

One way to alleviate this problem would be to create a table containing a row for all combinations of word pairs in each . In some database environments that support optimization of multiple key searches, this may offer no benefits. However, in other environments, such a table may substantially speed searches.

A comprehensive word pair table would be very large. Such a table covering the full content of would contain approximately 1.5 million unique word pairs and 6 million rows. Limiting the unique keys to the first three letter of each word reduces the table size to a more readily optimized set of keys. This requires the final part of the search to be conducted using text comparison (since the keys are incomplete).

Anchor
_f8eef848-b34b-414b-a274-8b1f74db1e90
_f8eef848-b34b-414b-a274-8b1f74db1e90
Generating the DualKey index

Although Dualkey indexes are available as part of the Developer Toolkit , it is important to know how this table is generated. users that generate should follow the method outlined below to generate new entries in the Dualkey index, based on the in the .

For each , parse the text of the term :

  • To avoid inappropriate case mismatches, convert all characters to the same case;
  • Extract words by breaking at spaces, punctuation marks, and brackets;
  • For each word of three characters or more that is not in the list of excluded words, extract the first 3 characters, and arrange the word fragments in alphabetical order ;
  • Generate the dual keys for this by concatenating each word fragment with those that come after it in the list;
  • For each dual key, add a row to the word pair tables.

Anchor
_b8e96b69-a352-47b7-8ebd-35286ab8e4db
_b8e96b69-a352-47b7-8ebd-35286ab8e4db
Example: Generation of keywords for a sample Description

Table 36. Sample Description

 

 

 

Term

Scg expression
ShowPartsid
33592011||

Scg expression
ShowPartsid
19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

Total replacement of hip with use of methyl methacrylate

  • To avoid inappropriate case mismatches, convert all characters to the same case.

"TOTAL REPLACEMENT OF HIP WITH USE OF METHYLE METHACRYLATE"

  • Extract words by breaking at spaces, punctuation marks, and brackets.
  1. TOTAL;
  2. REPLACEMENT;
  3. OF;
  4. HIP;
  5. WITH;
  6. USE;
  7. OF;
  8. METHYLE;
  9. METHACRYLATE.
  • For each word of three characters or more, that is not in the list of excluded words, extract the first 3 characters, and arrange the word fragments in alphabetical order .
  1. HIP;
  2. MET;
  3. REP;
  4. TOT;
  5. USE.

Note:

"OF" is less than 3 characters and is an excluded word, "WITH" is an excluded word and "MET" is duplicated, so we only include it once.

  • Generate the dual keys for this by concatenating each word fragment with those that come after it in the list;
  • For each dual key, add rows to the word pair tables.

    Anchor
    _b8e96b69-a352-47b7-8ebd-35286ab8e4db__0
    _b8e96b69-a352-47b7-8ebd-35286ab8e4db__0
    Table 37. DescDualKey

     

    Dual key

    HIPMET

    Scg expression
    ShowPartsid
    33592011||

    HIPREP

    Scg expression
    ShowPartsid
    33592011||

    HIPTOT

    Scg expression
    ShowPartsid
    33592011||

    HIPUSE

    Scg expression
    ShowPartsid
    33592011||

    METREP

    Scg expression
    ShowPartsid
    33592011||

    METTOT

    Scg expression
    ShowPartsid
    33592011||

    METUSE

    Scg expression
    ShowPartsid
    33592011||

    REPTOT

    Scg expression
    ShowPartsid
    33592011||

    REPUSE

    Scg expression
    ShowPartsid
    33592011||

    TOTUSE

    Scg expression
    ShowPartsid
    33592011||

    Anchor
    _b8e96b69-a352-47b7-8ebd-35286ab8e4db__f
    _b8e96b69-a352-47b7-8ebd-35286ab8e4db__f
    Table 38. ConcDualKey

     

    Dual key

    HIPMET

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    HIPREP

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    HIPTOT

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    HIPUSE

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    METREP

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    METTOT

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    METUSE

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    REPTOT

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    REPUSE

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    TOTUSE

    Scg expression
    ShowPartsid
    19954002|Reconstruction of hip with use of methyl methacrylate (procedure)|

    Anchor
    _8d732dc3-b907-448a-9874-a8386e89aafc
    _8d732dc3-b907-448a-9874-a8386e89aafc
    Searching for Descriptions using the DualKey index

    A search on the dual key index can only be carried out if the user enters a search string that contains at least two word fragments both of which are three characters or more in length. If the search string does not meet this criterion, the single keyword search mechanism must be used.
  • The user-typed search string is converted to consistent case;
  • The string is parsed, breaking at spaces and punctuation characters;
  • For each word of three characters or more, extract the first 3 characters, and arrange the word fragments in alphabetical order ;
  • Create a dual key by concatenating the first two 3 letter word fragments;
  • Use this dual key to look up exact matches on the word pair index;
  • found by searching on the word pair index are screened, to see if they contain the complete words in the original search string

Anchor
_f789f80c-50e2-49a8-a2fb-9af60d419dd8
_f789f80c-50e2-49a8-a2fb-9af60d419dd8
Example: Search using word pair index

User searches for "PYRO* 1 OXYGEN*".

  • The string is parsed, breaking at spaces and punctuation characters.
  1. "PYRO*";
  2. 1;
  3. "OXYGEN*".
  • For each word of three characters or more, extract the first 3 characters, and arrange the word fragments in alphabetical order .
  1. "OXY";
  2. "PYR".
  • Create a dual key by concatenating the first two 3 letter word fragments.

OXYPYR

  • Use this dual key to look up exact matches on the word pair index.

    Anchor
    _f789f80c-50e2-49a8-a2fb-9af60d419dd8__3
    _f789f80c-50e2-49a8-a2fb-9af60d419dd8__3
    Table 39. Sample results of a search for "PYRO* 1 OXYGEN*"

     

     

    Dual key

    OXYPYR

    Scg expression
    ShowPartsid
    1969019||

    Scg expression
    ShowPartsterm
    104951019|2,5-Dihydroxy-pyridine oxygenase|

    OXYPYR

    Scg expression
    ShowPartsid
    22565018||

    Scg expression
    ShowPartsterm
    22565018|pyrogallol 1,2-oxygenase|

    OXYPRY

    Scg expression
    ShowPartsid
    104951019||

    Scg expression
    ShowPartsterm
    104951019|2,5-Dihydroxy-pyridine oxygenase|

  • found by searching on the word pair index are screened, to see if they contain the complete words in the original search string:
    • Scg expression
      ShowPartsid
      1969019||
      is eliminated since it does not contain the word "1";
    • Scg expression
      ShowPartsid
      104951019||
      is eliminated, it does not contain the word "1" or any word beginning with the string "pyro".