Text this: Cumulative hazard ratio estimation for adverse events data from two-stage dynamic treatment regimes