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.
|Position||Alphabetic order of results|
|2||abdominal wall hernia procedure|
|3||airway device cuff herniation|
|4||anesthesia for hernia repair in lower abdomen|
|...||anesthesia for hernia repair in upper abdomen|
|6||anesthesia for lumbar or ventral incisional hernia of upper abdomen|
|7||anesthesia for transabdominal repair of diaphragmatic hernia|
|8||anesthesia for ventral or incisional hernia repair, lower abdomen|
|9||anterior perineal 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.