-
Notifications
You must be signed in to change notification settings - Fork 249
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
Allow the disjunction of multiple values to match a single search parameter (i.e. name is joe or john) #292
Comments
I'd like to work on this. |
@jingtang10 My thoughts Referencing the FHIR Spec The composite search parameter needs are able to generate AND and OR parameters in any possible number of combinations essentially an NxM matrix of clauses
A) union on 2 distinct queries i.e
or
Approach A Approach B The proposal is to generate search queries by generating a tree holding multiple conditions
Each of the nodes represents a pair of brackets The benefit of having a tree holding interfaces is that we can generate queries that take advantage of different Index tables using approach A above albeit taking the performance hit NB |
We can generate this statement from the Tree of Conditions
|
Thanks @rkodev for the udpate. As you rightly pointed out, approach B is not going to work for filters on different index tables. So I think we should focus on approach A. However, I'm not entirely convinced we need to design something totally generic which allows many levels of filters combined by
In other words we only need to introduce another level. EDIT: https://en.wikipedia.org/wiki/Conjunctive_normal_form is what I was alluding to. In particular: Every propositional formula can be converted into an equivalent formula that is in CNF. We're not dealing with propositionoal formula. But the principle is the same. For example, language=A and (B or (C and D)) can just be rewritten to language= (A and B) or (A and C and D). So we only need to allow one level or "OR" on top level. |
@Tarun-Bhardwaj reviewing this |
@jingtang10 @epicadk https://www.hl7.org/fhir/search.html#composite and https://hapifhir.io/hapi-fhir/docs/server_plain/rest_operations_search.html#multi-valued-andor-parameters clearly states that the FHIR spec only supports The
Therefore, we only need to support Proposed solution
|
See #292 - Change all Filters to allow list of possible values - Add an or(Type) extension for all Filters - Update all Filter.query functions to handle the multiple values
See #292 - Change all Filters to allow list of possible values - Add an or(Type) extension for all Filters - Update all Filter.query functions to handle the multiple values
See #292 - Change all Filters to allow list of possible values - Add an or(Type) extension for all Filters - Update all Filter.query functions to handle the multiple values
Discussed with @ekigamba @f-odhiambo @aditya-07 and @fredhersch yesterday. We identified 2 different use cases
OK, so in this issue - let's focus on number 1. I will create another issue for number 2. |
This is also related to #609. We will need this for searching for observations with different codes. |
@ekigamba , @jingtang10 , assigning this issue to @aditya-07 . |
Cool, @aditya-07 see if the POC here is sound and usable #678 |
#281 (comment)
https://www.hl7.org/fhir/search.html#composite
The text was updated successfully, but these errors were encountered: