The searchPlus procedure lists the conceptId and terms that match a search pattern. The search matches can also be filtered using a simple focus concept expression constraint or a regular expression pattern.
This procedure is intended to demonstrate some of the search options available in MySQL and to illustrate the value of restricting searches to subtypes of concepts that in particular hierarchies or sub-hierarchies.
Additional work would be required to make a more user-friendly interface to these search facility and this is beyond the scope of the SNOMED CT example database.
|SQL Call to Procedure|
call snap_searchPlus(p_search, p_filter);
A search term string.
These searches use MySQL's fulltext index employing one of the two supported search modes depending on the string supplied.
If p_search includes plus "+" or minus "-" symbols, the search is performed using boolean mode. This means matches are only returned if all words preceded by "+" are present and none of the words "-". Word not preceded by either plus or minus, are not required to match but will contribute to the search. The results of this search are sorted by with the shortest matching terms first.
If p_search does not include "+" or "-" symbols, the MySQL natural language search is used. It also orders the returned results by 'relevance' and is intended to assist contextual searching through literature. However, our testing indicate that the boolean mode is usually more effective for SNOMED CT searches.
For more information about full text searches in MySQL please see Full-Text Search Functions in the MySQL Reference Manual.
'+lung +disease +chronic'
A filter that will be applied to selectively include concepts that are subtype descendants of a specified concept:
A regular expression pattern to be used to filter terms returned by the search string
|Example Procedure Call|
|276692000||Congenital viral pneumonia|
|75570004||Viral pneumonia (disorder)|
|421508002||Viral pneumonia associated with AIDS|
|276692000||Congenital viral pneumonia (disorder)|
Viral pneumonia associated with acquired immunodeficiency syndrome
Viral pneumonia associated with acquired immunodeficiency syndrome (disorder)