Per-subject fatal treatment-related AE flag
Source:R/pd_SubjectFatalRelatedAE.R
pd_SubjectFatalRelatedAE.Rd`r lifecycle::badge("experimental")`
For each subject in `dfAE`, whether they have at least one adverse event that is both fatal (`aetoxgr == 5`) and treatment-related (`aerel == "RELATED"`, case-insensitive). Also flags fatal (`aetoxgr == 5`) not-treatment-related (`aerel == "NOT RELATED"`) AEs — the AE-side signal for the "No" case in the premature-death Treatment Related column. Centralizing both rules keeps them in one tested place.
Comparisons are NA-safe: a row with a missing grade or relatedness does not qualify and never flips a subject to `TRUE`.