How to derive baseline flag in SDTM
This post is part of 'SDTM | General' series
Baseline is defined as 'the last known assessment prior to treatment start.'
- Subset the records with assessment date prior to treatment start date (or reference start date) and non-missing result
- As there can be multiple assessments before the treatment start date, we need to pick the latest assessment by sorting the observations such that the latest record comes at the end
- Pick the latest assessment
- Use the key variables (subject, test, timepoint related variables) on this latest record to populate baseline flag on that record in original input dataset.