Clone, censor, weight
Time zero must be at eligibility, but "operate within three months" and "never operate" look identical on day one. We start with one patient: copy him into both plans, cut the copy his life breaks, and let someone like him stand in. Then we do it for a whole registry.
Further reading: Hernán MA (2018). How to estimate the effect of treatment duration on survival outcomes using observational data. BMJ 360:k182; Maringe C, et al. (2020). Reflection on modern methods: trial emulation in the presence of immortal-time bias. Assessing the benefit of major surgery for elderly lung cancer patients using observational data. Int J Epidemiol 49(5):1719; Cain LE, Robins JM, Lanoy E, Logan R, Costagliola D, Hernán MA (2010). When to start treatment? A systematic approach to the comparison of dynamic regimes using observational data. Int J Biostat 6(2):18. The registry is simulated with known potential outcomes; the population truth is an exact calculation; the lane figures show 12 illustrative patients. Mr. Ortiz and his three possible lives are illustrative; his probabilities and weights are computed from the decision model fitted to the simulated registry.