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

SQL cohorts as first class citizens - SQL templates for non-standard cohorts or large, bulk operations #133

Open
azimov opened this issue Apr 8, 2024 · 0 comments · May be fixed by #134
Assignees
Labels
enhancement New feature or request

Comments

@azimov
Copy link
Collaborator

azimov commented Apr 8, 2024

Outline

The ideal cohort definition is a Circe based cohort and this package does a great job of standardizing this.
However, this is currently limiting in a number of situations:

  1. When generating Cohorts in bulk, this is largely infeasible due to the inefficiency of generating the same cohort over and over
  2. We have cohorts that do not work well with the Circe approach (e.g. the pregnancy algorithm).

Naturally, this has lead to other approaches or hacks in studies to generate these cohorts. For example, this is used in the comparator selection explorer and Reward packages and this functionality could easily be used in other places but currently that is difficult to support. There are also, likely, many studies kicking about that simply use raw SQL execution and ignore this approach.

Proposed Solution

Allow "Template" cohort definitions which are SQL based definitions of cohorts (e.g. all rxNorm ingredients, all SNOMED codes) that produce references to allow them to be handled functionally the same as Circe cohorts.

To implement a cohort definition that uses templates the user should define the references (which can come from the vocabulary or be predefined) as well as an SQL definition.

@azimov azimov linked a pull request Apr 8, 2024 that will close this issue
@azimov azimov self-assigned this Apr 8, 2024
@azimov azimov added the enhancement New feature or request label Apr 8, 2024
@anthonysena anthonysena linked a pull request May 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

1 participant