Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4516

Concept search in core returns duplicates

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • TBD
    • Resolution: Won't Fix
    • OpenMRS 1.9.8, Platform 1.10.0
    • None
    • Concept Dictionary
    • None
    • Medium

    Description

      The concept search in 1.10.x and earlier version returns duplicates and has some other strange behaviors when matching the best concept name to display.

      The following method is what we generally use when searching for concepts:

      interface ConceptService {
          List<ConceptSearchResult> getConcepts(String phrase, ...lots more params...)
      }
      

      The underlying hibernate query behind this method does a query based on (unique) ConceptWord, and as a result it will only find one result for each matching word, even if there should be multiple results.

      Note that in OpenMRS Platform 1.11 we completely replace this with search based on Lucene, that searches by ConceptName, so I assume this issue is already solved in openmrs-core master. However backporting that improvement is prohibitively expensive.

      We need to determine if there is a feasible fix that can be applied to the 1.10.x and 1.9.x branches of openmrs-core.

      Example

      The concept at http://demo.openmrs.org/openmrs/dictionary/concept.htm?conceptId=71617 has many synonyms with the word "aspirin" in them, but if you search for "asprin" like http://demo.openmrs.org/openmrs/dictionary/index.htm?phrase=aspirin you will only find one hit for "Anacin Aspirin Regimen".

      Note: if you aren't seeing any results for aspirin on the demo server, you may need to run this http://demo.openmrs.org/openmrs/admin/concepts/conceptIndex.form

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                wyclif Wyclif Luyima
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: