Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused filters shouldn't be sent to Beacon services #138

Open
svituz opened this issue Jul 3, 2024 · 0 comments · May be fixed by #147
Open

Unused filters shouldn't be sent to Beacon services #138

svituz opened this issue Jul 3, 2024 · 0 comments · May be fixed by #147
Assignees

Comments

@svituz
Copy link

svituz commented Jul 3, 2024

Describe your problem.
When searching for disease, the Beacon service receives a request also with other parameters.
For example, if I search for Orphacode 2593, the portal sends the following request:

{
    "meta": {"apiVersion": "v0.2"}, 
    "query": {
        "filters": [{
            "id": ["ordo:Orphanet_2593"]
        }, {
            "id": "NCIT_C28421", "operator": "=", "value": ["NCIT_C16576", "NCIT_C20197", "NCIT_C124294", "NCIT_C17998"]
        }, {
            "id": "NCIT_C83164", "operator": ">=", "value": "0"
        }, {
            "id": "NCIT_C83164", "operator": "<=", "value": "100"
        }, {
            "id": "NCIT_C124353", "operator": ">=", "value": "0"
        }, {
            "id": "NCIT_C124353", "operator": "<=", "value": "100"
        }, {
            "id": "NCIT_C156420", "operator": ">=", "value": "0"
        }, {
            "id": "NCIT_C156420", "operator": "<=", "value": "100"
        }]
    }
}

This is counterintuitive and most of all may lead to wrong results or no results

If it is a bug name steps to reproduce
This bug doesn't show anything wrong in the frontend except for no resu

Steps to reproduce the behavior:

  1. Go to https://vp.ejprarediseases.org/discovery
  2. Add an orphacode in the "Search" text box
  3. The query sent to beacons contains also the other filters (ResourceTypes, Sex, Country etccc)

If it is a bug complete the following information:

  • Version: [Production]
  • OS: [Linux]
  • Browser: [Chrome]

Describe the solution you'd like
I'd like the Portal to send only the filters used by the user

@LarieSB LarieSB self-assigned this Jul 22, 2024
LarieSB added a commit that referenced this issue Aug 15, 2024
-Remove the gender parameter. There was already a sex parameter.
LarieSB added a commit that referenced this issue Oct 14, 2024
Send only the search parameters selected by the user during the search request.

The search filters are unselected by default.
@LarieSB LarieSB linked a pull request Oct 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants