Closed ammarbarakat closed 1 year ago
Related issues: #18
Example: In GPAP, querying via Postman for 778 AND (Male or Female) results in 93 (as below):
However, this is not the case when tested in the VP-Portal as GPAP itself is not shown in the results:
The resource does not appear in the results because the response time exceeds the time limit allowed by vp-portal. In order to conduct tests, we have increased the timeout duration. Kindly perform another test and verify if everything is functioning correctly. Thank you. @rini21
Reopening this issue, as it might not be related to the time limit, but because there is a potential logic flaw originating from the request - if multiple filters are selected, say, genders male, female, the VP-Portal is sending the request as male AND female instead of the intended male OR female.
Logging the incoming request from VP-Portal: [Thu Jul 06 11:46:33.433595 2023] [php:notice] [pid 64104] [client 192.168.17.244:45010] array(2) { ["meta"]=> array(1) { ["apiVersion"]=> string(4) "v2.0" } ["query"]=> array(1) { ["filters"]=> array(9) { [0]=> array(3) { ["id"]=> string(11) "NCIT_C28421" ["operator"]=> string(1) "=" ["value"]=> string(11) "NCIT_C16576" } [1]=> array(3) { ["id"]=> string(11) "NCIT_C28421" ["operator"]=> string(1) "=" ["value"]=> string(11) "NCIT_C20197" } [2]=> array(1) { ["id"]=> string(12) "Orphanet_730" } [3]=> array(3) { ["id"]=> string(11) "NCIT_C83164" ["operator"]=> string(2) ">=" ["value"]=> string(1) "0" } [4]=> array(3) { ["id"]=> string(11) "NCIT_C83164" ["operator"]=> string(2) "<=" ["value"]=> string(3) "100" } [5]=> array(3) { ["id"]=> string(12) "NCIT_C124353" ["operator"]=> string(2) ">=" ["value"]=> string(1) "0" } [6]=> array(3) { ["id"]=> string(12) "NCIT_C124353" ["operator"]=> string(2) "<=" ["value"]=> string(3) "100" } [7]=> array(3) { ["id"]=> string(12) "NCIT_C156420" ["operator"]=> string(2) ">=" ["value"]=> string(1) "0" } [8]=> array(3) { ["id"]=> string(12) "NCIT_C156420" ["operator"]=> string(2) "<=" ["value"]=> string(3) "100" } } }}
Decoding the above and ignoring ages for readability, the incoming request from VP-Portal currently is:
{
"meta": {
"apiVersion": "v2.0"
},
"query": {
"filters": [
{
"id": "Orphanet_730"
},
{
"id": "NCIT_C28421",
"operator": "=",
"value": "NCIT_C20197"
},
{
"id": "NCIT_C28421",
"operator": "=",
"value": "NCIT_C16576"
}
]
}
}
The expected filter request for gender if multiple genders are selected on the VP-Portal is:
{
"meta": {
"apiVersion": "v2.0"
},
"query": {
"filters": [
{
"id": "Orphanet_730"
},
{
"id": "NCIT_C28421",
"operator": "=",
"value": ["NCIT_C20197", "NCIT_C16576"]
}
]
}
}
@Ammarbr kindly check the logic.
Working as expected after the fix. Thanks @Ammarbr!
Describe your problem.
Currently, the feature allowing users to choose multiple genders when performing beacon queries is experiencing functionality problems. This issue hinders the proper selection of multiple genders, resulting in inaccurate query results.
If it is a bug name steps to reproduce
Steps to reproduce the behavior:
Describe the solution you'd like
Searching for multiple genders should work properly.
Additional context
Thank you for bringing the issue to our attention, @rini21