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

Query Builder: Allow some nested And/Or clauses #473

Open
joe-crawford opened this issue Oct 23, 2024 · 1 comment
Open

Query Builder: Allow some nested And/Or clauses #473

joe-crawford opened this issue Oct 23, 2024 · 1 comment
Labels
enhancement New feature or request for discussion More discussion required to decide how to resolve an issue

Comments

@joe-crawford
Copy link
Contributor

Description

Currently the query builder allows selecting And or Or conditions, for example (Person.Birth_Dt_Tm <= 2000 AND Diagnoses.Diagnosis in ('D1', 'D2')). However, nested conditions are not possible, for example:

(Person.Birth_Dt_Tm <= 2000 AND (Diagnoses.Diagnosis in ('D1', 'D2') OR Procedures.Procedure in ('P1', 'P2')))

Additional context

I'm anticipating that this sort of query could be needed in many common cohort queries, for example in a cohort similar to the query above, which is selecting adult patients, who have certain diagnoses OR procedures.

@joe-crawford joe-crawford added the enhancement New feature or request label Oct 23, 2024
@github-project-automation github-project-automation bot moved this to Backlog in MDM State Oct 23, 2024
@joe-crawford joe-crawford added the for discussion More discussion required to decide how to resolve an issue label Oct 23, 2024
@NigelPalmer
Copy link
Contributor

@joe-crawford, nested And/Or clauses are possible. You just need to add a Rule Set and then within that Rule Set write your nested logic.

image

image

Maybe what we really need is a task that provided some help for the query builder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request for discussion More discussion required to decide how to resolve an issue
Projects
Status: Backlog
Development

No branches or pull requests

2 participants