opensafely / post-covid-respiratory

MIT License
0 stars 0 forks source link

Create episode data #32

Closed A-Whitmarsh closed 1 year ago

A-Whitmarsh commented 1 year ago

Added code to create episode data - by cohort, outcome and population. Updated dummy data so events are between pandemic start and omicron date.

elsie-h commented 1 year ago

Most of the changes are minor and to speed up runtime/free up memory - see my commit descriptions and comments.

However, I noticed there was a bug in the code for deriving the episodes - I originally wrote this code, so apologies for that. It worked fine when an episode comprised <=2 events, but did not work when an episode comprised >2 events. I think it works now, but please review these lines and let me know if you're happy with my changes.