Implement global search feature
Background
The existing search is fairly basic and implemented on the Overview page only. It allows search by:
- Analysis (free text)
- Filter by: User
- Variant (HGVSc/genomic)
- Filter by: Gene (* required for HGVSc)
- Filter by: User
Due to performance, search results are limited to the 10 first hits, which limits the usefulness.
Use cases for improved solution
- Find a previous analysis
- "Show me all analyses for [user] within [date range]"
- "Show me all analyses from [user]"
- "Show me all analyses from [date range]"
- Overview of analyses relating to workflows outside ELLA (need to export all results)
- "Show me all analyses within [date range]"
- "Show me all analyses matching [project number]" (part of analysis name)
- "Show me all WES analyses" (part of analysis name)
- "Show me all WGS analyses" (part of analysis name)
- "Show me all analyses in [gene panel]" (part of analysis name)
- "Show me all analyses with [overview comment X]"; distinguish between finalized and non-finalized analyses.
- Overview of analyses/variants relevant for quality improvement or during interpretation
- "Show me all variants where [ACMG criterion] has been used"
- "Show me all variants in [gene]"
- "Show me all variants in [gene] with [class]"
- "Show me all variants in [genomic interval]"
- "Show me all variants in [genomic interval] with [class]"
- "Show me all analyses that have variants in [gene]"
- "Show me all analyses in [gene] with variants that [has report text]"
- "Show me all variants in [gene] that [has report text]"; results should include in which analyses, and preferably the actual report text
+ All search options from today's filtering in overview if they need to be re-entered in this search method.
Implementation
> General requirements
- Should be available in the whole app (not just the Overview)
- Should show all results (with pagination), if possible, including finalized analyses. A less ideal alternative is to show total number of hits, and/or allow export of all.
- Should be able to export results (use clipboard, format csv/tab)
- Should link directly to variant interpretations/analyses from search results (also include the current
SHOW ANALYSESbutton for variants) - Should be able to sort results (but this is probably less important if export is provided)
> Search parameters
See Google spreadsheet for details.
| Parameter | Priority |
|---|---|
| Analysis | 2 High |
| Variant | 2 High |
| Gene | 2 High |
| Classification | 2 High |
| Technology | 3 Medium |
| Date (range) | 3 Medium |
| User | 3 Medium |
| ACMG criterion | 3 Medium |
| Region | 3 Medium |
| Priority | 4 Low |
| Validity status | 4 Low |
| Workflow status | 4 Low |
| Overview comment | 4 Low |
| Has report text | 4 Low |
Users will probably in most cases start searching a for a variant ("c.XXX"), any part of an analysis name (project name, SampleID or gene panel) or gene name.
> Search functionality
Major tasks/considerations
- Combined searches; see Google spreadsheet
- When searching for variant, users usually start by typing "c.". Ideally, to make things as easy as possible:
- Look only in default transcripts, not alternative transcripts
- Remove the requirement for combining with gene (but keep as option)
- Show all or at least >10 results for analyses. This limitation is really due to the search being tied to variant search (where performance is an issue). Could also have something like "Showing 10 out of ... results" or "Show next 10 results". Note related pagination issue #199 (closed).
- Searching for deletions currently requires deleted bases to be written out (as this is how VEP annotates it). Consider removing this requirement.
Minor tasks/tweaks
- Make searches case-insensitive. To avoid a performance hit, search inputs could be transformed to capital letters (e.g. everything after
c.) before submitting to the search engine (from #68 (closed)). - Show a warning if input has wrong format (e.g. "c.."). This avoids mistaking empty results from wrong input from results not existing in the database (from LA-1287).
- Sort variants search results in ascending order (HGVSc).
- Add a button for copying search results as delimited data
Other possibly relevant issues
- Exclude technical from search results variant --> analyses (#64 (closed))
- Chosen gene is not kept when returning to search input (#116 (closed))
- Add a
*in the classification tag for outdated classifications in search results (#69 (closed))
> Search UI/UX
- Search should be available anywhere in the UI (not only on the Overview page); place in top banner.
- Alternatives:
- Search box á la GitLab, showing a list of results when the user starts to write, organised by different subjects
- Button that opens a search modal. This alternative is probably better for complex searches
- A combination of the above ("Show more"/"Advanced search" with the quick results that opens a modal)
Mockup:
Edited by Morten C. Eike
