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

Allow multiple drug records for index and marker #17

Open
edward-burn opened this issue Oct 31, 2023 · 2 comments
Open

Allow multiple drug records for index and marker #17

edward-burn opened this issue Oct 31, 2023 · 2 comments

Comments

@edward-burn
Copy link
Contributor

First combination would then be picked up

@Braventos
Copy link
Collaborator

If we stratified by age group, what happens if someone has multiple combinations one in each age group? Should we consider the first in each age group? If so we cannot filter the events prior to adding age groups. @edward-burn @xihang-chen

@Braventos
Copy link
Collaborator

Braventos commented Nov 3, 2023

We'd also like to confirm if the output of getCohortSequence() should only include "elegible" sequences for the analysis (e.g., first sequence that occur within the study period). As of now, the study period is not considered in getCohortSequence(), and sequences are not restricted to first-ever occurrences. We believe it might be better to apply filters in this first function, so the output (which will be a table in the cdm) only contains sequences that are elegible for the analysis.

The order in which this filtering is done can also alter the obtained sequences. We believe the most reasonable order would be: time gap, study period, 1st episode.

Consider these are episodes from the same person, with a timeGap = 2years, and study period 2018-2020. Following this approach, we'd first exclude episode 4 (timegap longer than 2y), and then episode 5 (one of the drugs occur before the start of the study period). Among the three remaining options, we'd choose the 2 as it has the earliest first date.

Episode | Index date | Marker date | First date
1 | 2019-12-01 | 2020-01-01 | 2019-12-01
2 |2019-12-01 | 2018-01-01 | 2018-01-01
3 |2019-12-01 | 2019-10-02 | 2019-12-01
4 |2010-12-01 | 2018-10-02 | 2010-12-01
5 |2016-12-01 | 2019-10-02 | 2016-12-01

If the first dates were equal we'd choose the one with the earliest date for the second drug. Suppose now this person only has episode 1 and 3, as the first date is the same, we would end up keeping episode 3 as it has an earlier second date.
Episode | Index date | Marker date | First date
1 | 2019-12-01 | 2020-01-01 | 2019-12-01
3 |2019-12-01 | 2019-10-02 | 2019-12-01

Could you please confirm if you all agree with this approach? @edward-burn @xihang-chen @daniellenewby @ajoedicke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants