Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a BSC's Logical Filters proposal for the Beacons Queries.
Currently, Beacon v2 (and 2.1) specification applies filters as a logical intersection (AND). Nevertheless, some queries may require more complex conditions like logical unions (OR) or negations (NOT). Imagine a researcher is looking for the medical condition that includes either 'Nonalcoholic fatty liver disease' (SNOMED:197315008) or 'Hepatic fibrosis' (SNOMED:62484002). It is also may be plausible to be able to exclude some conditions (e.g. no Hepatitis) from the search.
Beacon Filtering Scouts have been discussed several possibilities no include such a functionality into the Beacon specification.
Here is one proposal that we believe is quite simple to be implemented by Beacon's developers.
Basically it consists in adding an additional optional property
"filtersLogic"
into the "BeaconQuery" object.The query must support all three logical operations (& - 'AND', | - 'OR' and ! - 'NOT') as well as parenthesis for grouping. Without parenthesis the sequence of logical operators should follow the standard flow where precedence is defined as 'NOT' then 'AND' then 'OR' operators.
All filter identifiers MUST be present in the
"filters"
property of the query.Example (from presentation):
Some previous discussions: #63