-
Notifications
You must be signed in to change notification settings - Fork 38
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
Numerical filtering on the individuals endpoint #200
Comments
Hi David, here is the POST I am using and it's getting me results:
Maybe you can try this and tell me if you get some results. Best, Oriol |
Hi Oriol,
I tried the body you proposed, with requestedGranularity set to record. I still got zero results. Do you have the BFF for individuals? If so, could you give me an example of how the measure for BMI should look? I would like to compare it with what I have, to see if the problem lies there.
Regards,
David.
P.S. Here is an example of what we have in the BFF:
{
"assayCode" : {
"id" : "LOINC:35925-4",
"label" : "BMI"
},
"date" : "2021-09-24",
"measurementValue" : {
"quantity" : {
"unit" : {
"id" : "NCIT:C49671",
"label" : "Kilogram per Square Meter"
},
"value" : 26.63838307
}
}
},
…________________________________
From: Oriol López-Doriga ***@***.***>
Sent: Monday, September 18, 2023 3:58 PM
To: EGA-archive/beacon2-ri-api
Cc: Croft, David; Author
Subject: [Extern] - Re: [EGA-archive/beacon2-ri-api] Numerical filtering on the individuals endpoint (Issue #200)
Hi David,
here is the POST I am using and it's getting me results:
curl \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"meta": {
"apiVersion": "2.0"
},
"query": {
"filters": [{
"id": "LOINC:35925-4",
"operator": ">",
"value": "25.0"
}],
"includeResultsetResponses": "HIT",
"pagination": {
"skip": 0,
"limit": 10
},
"testMode": false,
"requestedGranularity": "record"
}
}' \
http://localhost:5050/api/individuals
Maybe you can try this and tell me if you get some results.
Checking your POST everything seems right but the difference between yours and mine is requestedGranularity: record instead of count maybe is what makes the difference.
Best,
Oriol
—
Reply to this email directly, view it on GitHub<#200 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALE7AZC2OOIGKIJCR5CDPX3X3BHPVANCNFSM6AAAAAA4OOCYC4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi David, at first sight, I don't see any differences between your BFF and mine. Did you use RI to do the queries? If so, please checkout to "develop" branch and try the query I sent you, it should work as expected. Other possible solution is to see the logs of your beacon to see what it's throwing to the database but I can't help you more without this information. Best, Oriol |
Hello, I cannot make use of the BMI filter either. I updated yesterday and used the cineca data. The filter on sex seems to work though...
Kind regards, |
Hi @albodrug, thanks for the comment. Recently, we changed the query by the ontology in the alphanumeric filters queries and we only allow to query for the specific label. We are doing it like this to not mix concepts of ontologies and alphanumeric terms. So, if you want to query for a measurement and its value, use the label for the assayCode, please. For example:
Let me know if this solved your issue. Thanks, Oriol |
Thanks Oriol, query is working! |
Hi,
I would like to apply a filter to find all individuals with a BMI greater than 25. However, my attempts so far always give me zero results, even though I know that there is at least one individual with a BMI greater than 25. Could you help?
Here is the endpoint I was using: POST http://localhost:5050/api/individuals
Here is what I sent in the body of my request:
{
"query": {
"filters": [
{
"id": "LOINC:35925-4",
"operator": ">",
"value": "25.0"
}
],
"includeResultsetResponses": "HIT",
"testMode": false,
"requestedGranularity": "count"
}
}
(I also tried id=NCIT:C49671, with the same results)
I looked at the RI BFF for individuals that was uploaded to Beacon, and found this:
Regards,
David Croft.
The text was updated successfully, but these errors were encountered: