OpenConceptLab / ocl_issues

Issues for all OCL repos. NOTE: Install ZenHub Browser Extension and request access to the OCL Roadmap board to view all issues and to contribute
4 stars 2 forks source link

Enhance Search and Add mappings into concept search #1583

Closed paynejd closed 1 year ago

paynejd commented 1 year ago

Right now, there is no way to get concept results when using a map code as search criteria. Currently, you can search mappings using a map code and use that to get to the concept, but that is a multi-step approach that requires users to know where to search.

I would like to be able to search using a code, e.g. "A15.1", and any concepts that actually have that code along with any concepts mapped to that code, with SAME-AS mappings weighted more highly than other types of mappings.

paynejd commented 1 year ago

MVP requirements:

Weighting of search results:

Search results will become noisier:

Separate design activity:

Out of scope:

snyaggarwal commented 1 year ago

@paynejd @jamlung-ri This is deployed on QA with many other improvements on Search, explained here

paynejd commented 1 year ago

This is such a big improvement! Searches for “Malaria” and “B50” (and many others) had way better results than before. Bold formatting of the matching search phrase made looking through results much more efficient.

Feedback for discussion:

jamlung-ri commented 1 year ago

Overall, this appears to be working SO much better!

Thoughts:

Bad results:

Interesting results (not necessarily bad?):

snyaggarwal commented 1 year ago

This is such a big improvement! Searches for “Malaria” and “B50” (and many others) had way better results than before. Bold formatting of the matching search phrase made looking through results much more efficient.

Feedback for discussion:

  • Get feedback from Paul on behavior and icon to display more info about how a match was made
  • Since we have specific info about what matched
  • “Coombs” returns 3 concepts
  • Search for “Coombs” inside CIEL:

    • Search result 159606 – can we add the locale for the matching name, and still only highlight the matching portion of the name?
    • coombs tès endirèk [ht] ⇒ Indirect antiglobulin test in serum or plasma [en]
    • Search result 159607 “Direct Coombs Test” does not show up if you change the search criteria to “antiglobulin” – are synonyms included in the search?

@paynejd

snyaggarwal commented 1 year ago

Search result 159607 “Direct Coombs Test” does not show up if you change the search criteria to “antiglobulin” – are synonyms included in the search?

@paynejd this is fixed

snyaggarwal commented 1 year ago

Searching for a LOINC code as a mapping for CIEL is returning pretty bad results e.g. searching "1527-1" (I ecpected to see 163703 Glucose, serum 1/2 hr post 75g oral glucose (mg/dL)):

@jamlung-ri this is fixed.

snyaggarwal commented 1 year ago

@jamlung-ri Replies inline:

Searching "R53" returns some results that are "Narrower-than" mappings, not "Same-As" -

If you search for "R53" Narrower-than results are returned after "Same-As", we do search on other map types, but score them lower than Same-As

Fuzzy matching appears to be happening on mapped codes too. Example: searching "V80.9" returns a result with a mapping for "A80.9"

Yes we do fuzzy match on mapped codes as well. Refer to the document. We may want to discuss which fields to fuzzy match on.

Related to the previous bullet, it seems weird that searching "A80.9" doesn't return concepts with mappings to "V80.9". I expected to see "133902 Motor Vehicle Traffic Accident due to Loss of Control"

The fuzzy match algo works on number of expansions it can perform. Expansion mean "Maximum number of variations created.". We kept this number very low (currently 2), otherwise there will be too many fuzzy matches, especially in "name". So you may see more closer fuzzy matches in "mapped codes" and "ID" vs "name", since "name" have too many characters. We may want to talk about if we want to keep different expansion number for different fields.

jamlung-ri commented 1 year ago

@snyaggarwal We got some good feedback on the OpenMRS/OCL Squad call today. We're definitely getting closer!

One big piece in particular: the "?" icon probably won't be adequate. We need to show a small preview of the matching code. Jon gave similar feedback in this comment.

Other feedback:

snyaggarwal commented 1 year ago

@jamlung-ri Both the feedbacks were added on QA. For the second one, had to trigger re-indexing of concepts, which is happening as I write this. So once that done, it should reflect the right case of synonyms.

paynejd commented 1 year ago

Searching for b50 on QA brought up a couple wonkier results: https://app.qa.openconceptlab.org/#/search/?q=b50

  1. The first set of results is a partial word match (e.g. "B50-196") -- can we make highlighting smart enough to still highlight "B50" here?
  2. "B50" matched a concept ID of "150" -- didn't we decide to disable this type of matching for concept IDs?
  3. Seems like the same-as matches (id-testing/6 and clonetest4/11) should be boosted higher than the fuzzy name match of 050
image
snyaggarwal commented 1 year ago

@paynejd QA concepts are re-indexing.

snyaggarwal commented 1 year ago

@paynejd

  1. This is a bug -- Checked in fix.
  2. We dint decide (yet!) to change that behavior of fuzzy matching on ID.
  3. same-as matches (id-testing/6 and clonetest4/11) are also fuzzy matched and they are scored lower than core attributes of concept.
paynejd commented 1 year ago

@snyaggarwal Thanks for quick response! Adding the second point for discussion to our architecture call...

snyaggarwal commented 1 year ago

@paynejd @jamlung-ri This is deployed on Staging.

snyaggarwal commented 1 year ago

@paynejd @paynejd Updated QA after removing fuzzy search on ID and map codes.

paynejd commented 1 year ago

This is working really well, including the latest change in QA.

We need design input (from @paulsonder?) on the question mark behavior (the "Why this matched?" popup) before this moves forward to production.

paulsonder commented 1 year ago

In general I'm finding the user experience on this a little confusing but it's quite advanced in terms of development now. I've copied out the requirements and I'm thinking about how they apply in V3.

With regards to the pop-up, my initial thought was around proximity and how we could serve the content in a tooltip when the row was hovered instead...

snyaggarwal commented 1 year ago
snyaggarwal commented 1 year ago
  • [x] Change to a tooltip instead of a pop up
  • [x] Display the code/text that was matched in the tooltip, in addition to the type of match (e.g. “SAME-AS”)
  • [x] Change to “info” icon instead of “help” icon

@paynejd @jamlung-ri this is deployed on QA

paynejd commented 1 year ago

@snyaggarwal the latest change looks great - let's deploy to production!

snyaggarwal commented 1 year ago

@paynejd This is deployed everywhere.

paynejd commented 1 year ago

Wahoo!!!

On Sat, Aug 5, 2023 at 11:38 PM Sny @.***> wrote:

@paynejd https://github.com/paynejd This is deployed everywhere.

— Reply to this email directly, view it on GitHub https://github.com/OpenConceptLab/ocl_issues/issues/1583#issuecomment-1666698278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJCOOO25FK2HSGYHLM4KZDXT4GTRANCNFSM6AAAAAAYGOLRZE . You are receiving this because you were mentioned.Message ID: @.***>