OHDSI / OHDSI/FeatureExtraction
Can Feature Extraction support computation with respect to target cohort_end_date
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 74
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
Feature Extraction calculates the occurrence of Covariates in relation to target cohort_start_date. Is it possible to add a parameter that allows it to switch from cohort_start_date to cohort_end_date
Specifically: in the various SQL's in Feature Extraction, the SQL is something like this
ON @domain_start_date <= DATEADD(DAY, time_period.end_day, cohort.cohort_start_date) AND @domain_end_date >= DATEADD(DAY, time_period.start_day, cohort.cohort_start_date)
or
ON covariate_cohort.cohort_start_date <= DATEADD(DAY, time_period.end_day, cohort.cohort_start_date) WHERE covariate_cohort.cohort_end_date >= DATEADD(DAY, time_period.start_day, cohort.cohort_start_date)
Can we introduce a switch that now changes cohort.cohort_start_date to cohort.cohort_end_date
ON covariate_cohort.cohort_start_date <= DATEADD(DAY, time_period.end_day, cohort.**cohort_end_date**) covariate_cohort.cohort_end_date >= DATEADD(DAY, time_period.start_day, cohort.**cohort_end_date**)
Use Case: An easy use case is to understand the characteristics of a person at some time-window of discontinuation from continuous drug treatment era, such as what happened at the time periods in relation to stopping a statin therapy. One way we can calculate this is today is to build a cohort using custom SQL where cohort_start_date is drug_era_end_date, as standard tools like Atlas cannot index a cohort based on end of a drug_era. But, if FE can calculate covariates based on cohort_end_date, then we can start thinking of cohort_end_date diagnostics.
cohort_end_date characterization/diagnostics may help answer questions like
- what was the visit context at around the time of exit
- What were the events at around the time of exit (new diagnosis, new treatments)
- We can also compare the characteristics of cohort on cohort_start_date to characteristics on cohort_end_date.
Related to https://github.com/OHDSI/CohortDiagnostics/issues/298
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Feature Extraction SQL generation that currently anchors covariate windows to cohort_start_date, then inspect how feature parameters are passed. Done means an explicit switch supports cohort_end_date for the shown date predicates while retaining cohort_start_date behavior; the issue names no files or tests, so those must be located in the repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, sql
- Domain
- data, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100