-
Notifications
You must be signed in to change notification settings - Fork 10
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
Cohort templates #134
base: develop
Are you sure you want to change the base?
Cohort templates #134
Conversation
@mdlavallee92 I would appreciate your input here, from the perspective of Capr which could be used to generate templates for broad, highly sensitive phenotypes. |
Thanks for tagging me to the review @azimov. In terms of a code review, I will admit there is not much I can contribute since this falls outside of the Capr realm and my grasp of R6 is limited. Most of my comments are philosophical wrt the purpose of the tool. Conceptual Understanding Efficiency Other templates Non-CIRCE workflow |
I would say that this is already possible with subset operations included in this repository (saving, loading and using in strategus designs is already well supported too). For your example question:
This will save you a lot of time and keep clutter out of atlas. |
I definitely see the benefits of getting characteristics for concept sets, but the motivation here is really to have cohorts generated from pure SQL to be treated in the same manner as all other cohorts in packages. At the moment we are doing sql in a lot of places anyway. Personally I have used a lot of hacks to get this done and I want an approach that is cleaner and re-usable in any tools.
We are using these in our comparator selection tool and other places to do things at scale. The logic is a bit more than the drug eras table (for example, requiring prior observation).
This is good to know. In a dream world I would like to go from a templated cohort to a circe/capr compatable definition with a work flow being like:
|
I meant the other way around. denominator is the Males in 2010 for the entire db and the numerator is the study population. Can CG build a set of year, gender, race cohorts with no index event as well? The term "cohort" is used liberally here, more like id gender race year counts...could be out of scope of CG. But yes, the subsetting you outline here is highly useful and have done it within studies. |
This could be done with templates, but it might make your DBA sweat as storing all demographics for males in a given year could be huge percentage of peeople, so I would say that it would be much better to just generate counts in this context (Patrick will have a lot to say to you about computing incidence rates in this sort of population though). Generally something like this should live in the CohortIncidence package but there we're trying to be quite specific here - for meaningful measures you want a target population and an outcome as well as a time at risk. |
# Conflicts: # R/CohortConstruction.R
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #134 +/- ##
===========================================
- Coverage 98.80% 95.45% -3.36%
===========================================
Files 12 17 +5
Lines 1336 2154 +818
===========================================
+ Hits 1320 2056 +736
- Misses 16 98 +82 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
See issue #133
TODO:
*Vignette on implementation (will wait for agreement on approach before writing)