Ordering the shortest matching term first is a common display requirement for search browsers and search functionalities in clinical applications. This applies text search techniques previously in the Guide (e.g. searching for descriptions that contain the search text). [see 4.1.1 Search by text] Many users can expect this technique to exist in all use cases concerning searches that return large result sets. It is intuitive to display the shortest term that is also the closest lexical match first. If the shortest matching term is not in the first set of visible matches, a user is likely to assume that there are no relevant candidate matches or use the wrong concept or description.


Figure 5.1.1-1: Ordering shortest matching terms first

A common mistake is to implement a search functionality that is configured to sort search results alphabetically in a clinical setting. The result list, when Concepts like hernia is searched, starts as shown below and the term "hernia" itself would be more than 130 items down a list of over 700 matches.

Table 5.1.1-1: Position of term 'hernia' in an alphabetic and shortest terms ordered search 'hernia'

PositionAlphabetic order of results

Shortest match first


abdominal hernia


2abdominal wall hernia procedure

hernia sac

3airway device cuff herniation

hernia belt

4anesthesia for hernia repair in lower abdomen

O/E - hernia

...anesthesia for hernia repair in upper abdomen

cecal hernia

6anesthesia for lumbar or ventral incisional hernia of upper abdomen

labial hernia

7anesthesia for transabdominal repair of diaphragmatic hernia

hernia repair

8anesthesia for ventral or incisional hernia repair, lower abdomen

littré hernia

9anterior perineal hernia

Cooper hernia




Alphabetic searches can compromise patient safety as the best matching term is not easily found. However, even searches for the shortest term need to be constrained to concept types relevant to the clinical setting to ensure only relevant matches are shown.