Switch, Add-On, and Augmentation Rules
A set of pre-specified operational rules that classify a treatment modification observed in longitudinal data as a switch, an add-on, an augmentation, a combination start, or a line advancement, based on the timing and overlap of exposure episodes across drug classes.
In plain language
When a patient changes their drug regimen, analysts need a precise rule to decide what kind of change happened. A switch means the first drug stopped and a second drug took its place; an add-on (or augmentation) means the second drug was added while the first was still being taken. The difference is decided by one thing you can see in pharmacy claims data: does the first drug's supply of pills still have days left on the calendar when the second drug's fills begin? If yes, the two drugs overlap and it is an add-on; if no, the first drug had already run out (or nearly so) before the second started, and it is a switch. Getting this right matters because grouping switchers and add-on patients together quietly mixes two very different clinical decisions.
Switch, add-on, and augmentation rules
are the algorithm that turns a stream of dispensings or administrations into a classified treatment trajectory. Once exposure episodes have been built (see exposure-episode-construction-rwe), every point where a patient's regimen changes must be labeled, because the label — not the raw fill — is what defines cohorts, index dates, follow-up start, lines of therapy, and the comparator in a treatment-pattern or comparative-effectiveness study. The same calendar event (a new fill of drug B while the patient is on drug A) is a switch, an add-on, or an augmentation depending entirely on the timing rules and the clinical interpretation you pre-specify; getting the rule wrong silently misclassifies exposure for everyone in the cohort.
Core conceptual distinction
Four transitions must be separated, and the operational tell for each is timing, not the drug itself. - Switch — class A stops (no fill within a grace/gap window) and class B starts. The patient is on B instead of A. Operationally: `start(B) - end_of_supply(A) <= SWITCH_GAP_DAYS` (a near-contiguous handoff) AND no further A fills. - Add-on / combination — class B starts while class A's `days_supply` is still active. Both classes overlap. If A was itself recently initiated (the patient was effectively treatment-naive to the combination), this is a planned combination start; if A had been running for a while, B is an add-on. - Augmentation — a specific, clinically loaded subtype of add-on: B is added to an ongoing, persistent A that was given an adequate therapeutic trial without resolution (e.g., adding an atypical antipsychotic to an SSRI in treatment-resistant depression, or a thiazide to an ACE inhibitor in uncontrolled hypertension). The operational tell that distinguishes augmentation from a plain add-on is prior persistence on A (`days_on_A_before_B >= AUGMENT_PRIOR_PERSISTENCE_DAYS`, often an adequate-trial window such as 28–56 days) plus continuation of A after B starts. - Line advancement — the regimen as a whole changes after a maintenance gap or a documented progression/failure event, starting a new line of therapy. This is the unit oncology, MS, and IRA Medicare price-negotiation analyses report on. These thresholds — `SWITCH_GAP_DAYS`, `OVERLAP_DAYS_FOR_ADDON`, `AUGMENT_PRIOR_PERSISTENCE_DAYS`, the maintenance-gap that closes a line — are the judgment-dependent parameters; every consequential analysis must vary them in sensitivity analyses.
Pros, cons, and trade-offs
- vs a single naive rule (e.g., "any new drug class = switch"): Explicit, separately-tunable rules are transparent, reproducible, and defensible to FDA/EMA/HTA reviewers, and they prevent the dominant error of collapsing add-ons and augmentations into switches (which inflates "switching" and empties out "combination" exposure). Cost: more code, more diagnostics, and the need to defend each threshold. Prefer explicit rules for any regulatory-grade or HTA study. - vs purely clinical (chart-adjudicated) classification: Rule-based classification scales to millions of patients and is fully reproducible; chart review captures intent ("inadequate response", "intolerance") that timing alone cannot. The augmentation-vs-add-on distinction in particular is an intent construct that claims approximate via prior persistence. Prefer rules at scale, but validate against charts where the switch/augment distinction drives the estimand. - vs ignoring the distinction entirely (treat all post-index drugs as time-varying covariates): Folding everything into a time-varying confounder is defensible for some causal questions but discards the treatment-pattern endpoint and makes "what did patients actually do next" unanswerable. Prefer explicit classification whenever sequencing, lines, or persistence-to-next-treatment is the outcome.
When to use
Treatment-pattern and lines-of-therapy studies; persistence/discontinuation endpoints that must distinguish stopping from switching; comparative-effectiveness designs where the comparator is "switchers vs augmenters"; drug-utilization and sequencing studies; HTA sequencing models that need realistic transition probabilities; and any oncology, psychiatry, MS, or hypertension RWE where add-on vs switch vs augmentation carries different clinical meaning.
When NOT to use — and when it is actively misleading or dangerous
- When the underlying exposure episodes are unreliable. These rules are only as good as the `days_supply`, gap, and stockpiling assumptions feeding them (see grace-period-gap-rules-rwe, stockpiling-carryover-rules-rwe). Garbage episodes produce confident, wrong labels. - When data cannot observe the comparator drug. In Medicare Advantage-only person-time, fee-for-service pharmacy and medical claims are absent, so an "add-on" can be an artifact of one class being invisible. Restrict to fully observable enrollment before classifying. - When augmentation requires intent that the data cannot carry. Calling an add-on an "augmentation" without evidence of prior adequate trial fabricates a treatment-resistance phenotype. If the estimand hinges on intent, validate against charts or drop the augmentation label. - Infused/clinic-administered or inpatient drugs. Oncology infusions, biologics, and inpatient bundles have no `days_supply`; applying oral gap logic to them is dangerous (see infused-biologic-administration-capture-rwe, inpatient-bridging-exposure-rwe). Use administration-interval logic instead. - When line definitions are imposed without progression data. In oncology, defining line advancement purely by drug gaps — without a progression or new-regimen signal — conflates a treatment holiday with progression and miscounts lines.
Data-source operational depth
- Claims (FFS): The workhorse substrate. Build class-level episodes from pharmacy NDCs (`fill_date`, `days_supply`) and from medical/HCPCS J-codes for clinic-administered drugs. Failure modes: 90-day mail order and stockpiling distend `days_supply` so overlaps look like add-ons; same-day duplicate or reversed claims create phantom combinations (de-duplicate and net out reversals first); adjudication lag means recent fills are incomplete near the data cut. Require continuous medical and pharmacy enrollment across the classification window so "no fill of A" is true absence, not unobserved care. - Claims (Medicare Advantage vs FFS): MA-only person-time lacks FFS claims; a switch can look like a discontinuation and an add-on can be invisible. Exclude MA-only spans or restrict to A/B/D FFS enrollees (see medicare-ffs-ma-commercial-claims-differences-rwe). - EHR: Classification keys off orders/administrations, not dispensings, and order ≠ taken. Visit-driven capture means a drug added by an outside specialist is missing, so an augmentation is misread as monotherapy continuation; external care leakage is the dominant bias. Link to pharmacy fills where possible. - Registry: Often carries adjudicated regimen/line and progression but incomplete fill history; strong for the line-advancement label, weak for the day-level switch/add-on timing. Link to claims for fill-level resolution. - Linked claims–EHR: Best substrate — EHR progression/intent plus claims completeness — but order/fill/service date discrepancies must be reconciled before deciding which event came first, since the switch-vs-add-on label is decided by day-level ordering.
Worked claims example (antidepressant augmentation vs switch, FFS pharmacy)
Question: among adults who initiate an SSRI for depression, classify the first regimen modification. Inputs: pharmacy fills with `person_id`, `fill_date`, `days_supply`, `drug_class` in {SSRI, SNRI, ATYPICAL_ANTIPSYCHOTIC}; continuous medical+pharmacy FFS enrollment. Thresholds: `SWITCH_GAP_DAYS = 30`, `OVERLAP_DAYS_FOR_ADDON = 1`, `AUGMENT_PRIOR_PERSISTENCE_DAYS = 56` (an adequate SSRI trial). (1) Build SSRI episodes by stitching consecutive fills with gaps <= 30 days; the episode's covered period runs from the first `fill_date` to the last `fill_date + days_supply`. Patient: SSRI fills 2024-01-03 (30d), 2024-02-01 (30d), 2024-03-02 (30d) — covered through 2024-03-31, 87 persistent days. (2) On 2024-03-10 an aripiprazole (ATYPICAL) fill appears. (3) Is the SSRI still active on 2024-03-10? Yes (covered through 2024-03-31), so this is an overlap → not a switch. (4) Had the patient been persistent on the SSRI for >= 56 days before 2024-03-10? Days on SSRI before the add = 2024-03-10 − 2024-01-03 = 67 days >= 56 → label = augmentation (atypical added to an adequately-trialed, ongoing SSRI). Contrast: had the SSRI instead stopped (last covered day 2024-02-05) and an SNRI started 2024-02-20 with no further SSRI fills, then `start(SNRI) − end(SSRI) = 15 <= 30` and SSRI does not resume → label = switch. Had the aripiprazole been added on 2024-01-20 (only 17 SSRI-days, < 56) while the SSRI continued → label = add-on (not augmentation): combination too early to call treatment-resistant. Sensitivity analyses re-run all labels at `SWITCH_GAP_DAYS` ∈ {15, 30, 60} and `AUGMENT_PRIOR_PERSISTENCE_DAYS` ∈ {28, 56, 84}, and report a transition table (counts of switch / add-on / augmentation / line-advance) before and after each threshold change.
Worked example
Scenario
Patient 2001 is an adult who starts sertraline (an SSRI antidepressant) on January 5, 2024. We want to classify what happens when a second drug appears in their pharmacy record on March 10, 2024 — but the answer depends entirely on whether the patient also refilled their sertraline in early March. We trace two parallel versions of events: Scenario S (Switch) where the sertraline was not refilled before March 10, and Scenario A (Add-on/Augmentation) where a March 1 refill means sertraline is still active when the second drug arrives.
Dataset
Pharmacy fills as they appear in a claims table — same patient, two scenarios that differ only in whether Drug A (sertraline) has a third fill on 2024-03-01.
| person_id | scenario | fill_date | drug | drug_class | days_supply |
|---|---|---|---|---|---|
| 2001 | Both | 2024-01-05 | sertraline | SSRI | 30 |
| 2001 | Both | 2024-02-02 | sertraline | SSRI | 30 |
| 2001 | Scenario A only | 2024-03-01 | sertraline | SSRI | 30 |
| 2001 | Both | 2024-03-10 | aripiprazole | ATYPICAL | 30 |
Steps
Drug A (sertraline) Fill 1 starts 2024-01-05 and covers 30 days: active through 2024-02-03.
Drug A Fill 2 starts 2024-02-02 — one day before Fill 1 runs out — so the fills stitch together with no gap; the combined episode is active through 2024-03-02.
SCENARIO S (Switch): No third sertraline fill. Drug A's supply expires 2024-03-02. Drug B (aripiprazole) starts 2024-03-10. There are 7 uncovered days between them (March 3–9). Because 7 days is within the 30-day grace period AND sertraline does not resume, this is classified as a SWITCH: aripiprazole replaced sertraline.
SCENARIO A (Add-on/Augmentation): Drug A Fill 3 starts 2024-03-01, adding 30 more days; sertraline is now active through 2024-03-30. Drug B (aripiprazole) starts 2024-03-10 — eight days before sertraline runs out. The two drugs overlap for 21 days (March 10–30). Because sertraline is still active when aripiprazole begins, this is NOT a switch.
To distinguish add-on from augmentation: count how many days the patient had been taking sertraline before aripiprazole was added. From 2024-01-05 to 2024-03-10 is 65 days. Our pre-specified adequate-trial threshold is 56 days. Because 65 >= 56 and sertraline was ongoing, this is classified as AUGMENTATION: aripiprazole was added to a sertraline regimen that had already been given a full trial.
Result
- Switch
Scenario S: Drug A last active 2024-03-02, Drug B starts 2024-03-10, gap = 7 days <= 30-day grace period, Drug A does not resume → classification = SWITCH
- Augmentation
Scenario A: Drug A active through 2024-03-30, Drug B starts 2024-03-10, overlap = 21 days, prior persistence on Drug A = 65 days >= 56-day threshold → classification = AUGMENTATION
Timeline Spec
- Title
Switch vs. Add-on/Augmentation for one patient (two scenarios, same Drug A fills except for the March 1 refill)
- Window
- Start
2024-01-05
- End
2024-04-08
- Label
Observation window: Jan 5 – Apr 8, 2024 (covering all fills in both scenarios)
- Events
- Label
Drug A Fill 1 (sertraline) — both scenarios
- Track
Drug A (sertraline)
- Start
2024-01-05
- Length Days
30
- Quantity
30-day supply
- End Date
2024-02-03
- Label
Drug A Fill 2 (sertraline) — both scenarios
- Track
Drug A (sertraline)
- Start
2024-02-02
- Length Days
30
- Quantity
30-day supply
- End Date
2024-03-02
- Label
Drug A Fill 3 (sertraline) — Scenario A ONLY
- Track
Drug A (sertraline)
- Start
2024-03-01
- Length Days
30
- Quantity
30-day supply
- End Date
2024-03-30
- Scenario
add_on_augmentation_only
- Label
Drug B (aripiprazole) — both scenarios
- Track
Drug B (aripiprazole)
- Start
2024-03-10
- Length Days
30
- Quantity
30-day supply
- End Date
2024-04-08
- Spans
- Kind
exposed
- Track
Drug A (sertraline)
- Start
2024-01-05
- End
2024-03-02
- Label
Drug A episode — Scenario S ends here (57 days)
- Scenario
switch
- Kind
exposed
- Track
Drug A (sertraline)
- Start
2024-01-05
- End
2024-03-30
- Label
Drug A episode — Scenario A continues through Mar 30 (85 days)
- Scenario
add_on_augmentation_only
- Kind
gap
- Track
Drug A (sertraline)
- Start
2024-03-03
- End
2024-03-09
- Label
7-day gap (Drug A expired, Drug B not yet started) → gap ≤ 30-day grace → SWITCH
- Scenario
switch
- Kind
exposed
- Track
Drug B (aripiprazole)
- Start
2024-03-10
- End
2024-04-08
- Label
Drug B episode — both scenarios (30 days)
- Kind
covered
- Track
overlap
- Start
2024-03-10
- End
2024-03-30
- Label
21-day overlap: both Drug A and Drug B active → ADD-ON / AUGMENTATION (Scenario A only)
- Scenario
add_on_augmentation_only
- Result
- Label
Scenario S classification
- Value
SWITCH — Drug A ended 2024-03-02; Drug B started 2024-03-10; 7-day gap ≤ 30 days; Drug A does not resume
- Label
Scenario A classification
- Value
AUGMENTATION — Drug A active through 2024-03-30; Drug B starts 2024-03-10; 21-day overlap; prior persistence on Drug A = 65 days ≥ 56-day threshold
- Caption
Two-scenario timeline for patient 2001. The top row (Drug A, sertraline) differs between the scenarios: Scenario S has no March 1 refill so Drug A expires March 2, leaving a 7-day gap before Drug B arrives on March 10 — a switch. Scenario A includes the March 1 refill so Drug A is still active on March 10 when Drug B begins, producing a 21-day overlap — and because the patient had 65 days on Drug A before Drug B was added (above the 56-day adequate-trial threshold), the classification is augmentation rather than a plain add-on.
- Alt Text
Timeline with two drug tracks. Drug A (sertraline) shows two fills Jan 5 and Feb 2 in both scenarios. In Scenario S the drug track ends March 2, a gap bar covers March 3–9, and Drug B starts March 10 with no overlap — labeled SWITCH. In Scenario A a third fill added March 1 extends Drug A through March 30; Drug B starts March 10 while Drug A is still active, and a shaded overlap bar covers March 10–30 — labeled AUGMENTATION (65 days prior persistence ≥ 56-day threshold).
Runnable example
python implementation
Classify the FIRST treatment modification per patient as switch / add_on / augmentation / line_advance from claims-style pharmacy fills. Required input (cleaned, de-duplicated, reversals netted out): rx : person_id, fill_date (datetime), drug_class (str),...
import pandas as pd
import numpy as np
SWITCH_GAP_DAYS = 30 # max gap to treat consecutive fills as one episode / a contiguous switch handoff
OVERLAP_DAYS_FOR_ADDON = 1 # min active-supply overlap of two classes to call an add-on/combination
AUGMENT_PRIOR_PERSISTENCE_DAYS = 56 # adequate-trial persistence on the first class before an add-on becomes augmentation
def _episodes(g: pd.DataFrame) -> pd.DataFrame:
# Stitch one drug_class's fills into covered episodes (gap-tolerant).
g = g.sort_values("fill_date")
g["end"] = g["fill_date"] + pd.to_timedelta(g["days_supply"], unit="D")
ep_start, ep_end, rows = None, None, []
for _, r in g.iterrows():
if ep_start is None:
ep_start, ep_end = r["fill_date"], r["end"]
elif r["fill_date"] <= ep_end + pd.Timedelta(days=SWITCH_GAP_DAYS):
ep_end = max(ep_end, r["end"]) # extend (stockpiling caps at observed end)
else:
rows.append((ep_start, ep_end)); ep_start, ep_end = r["fill_date"], r["end"]
rows.append((ep_start, ep_end))
return pd.DataFrame(rows, columns=["ep_start", "ep_end"])
def classify_first_modification(rx: pd.DataFrame) -> pd.DataFrame:
out = []
for pid, p in rx.groupby("person_id"):
eps = (p.groupby("drug_class", group_keys=True)
.apply(_episodes)
.reset_index(level=0).reset_index(drop=True))
eps = eps.sort_values("ep_start")
first = eps.iloc[0] # the index regimen class/episode
index_class = first["drug_class"]
later = eps[(eps["ep_start"] > first["ep_start"]) & (eps["drug_class"] != index_class)]
if later.empty:
out.append((pid, index_class, None, "no_modification")); continue
nxt = later.iloc[0] # first modification event
overlap_days = (min(first["ep_end"], nxt["ep_end"]) - nxt["ep_start"]).days
index_still_active = overlap_days >= OVERLAP_DAYS_FOR_ADDON
prior_persistence = (nxt["ep_start"] - first["ep_start"]).days
if not index_still_active and (nxt["ep_start"] - first["ep_end"]).days <= SWITCH_GAP_DAYS:
label = "switch"
elif index_still_active and prior_persistence >= AUGMENT_PRIOR_PERSISTENCE_DAYS:
label = "augmentation"
elif index_still_active:
label = "add_on"
else:
label = "line_advance" # gap exceeds maintenance window -> new line/episode
out.append((pid, index_class, nxt["drug_class"], label))
return pd.DataFrame(out, columns=["person_id", "index_class", "modifier_class", "modification"])r implementation
Classify the first treatment modification per patient (switch / add_on / augmentation / line_advance) with data.table. Input mirrors the Python version: rx : person_id, fill_date (Date), drug_class (character), days_supply (integer) Thresholds are the...
library(data.table)
SWITCH_GAP_DAYS <- 30L
OVERLAP_DAYS_FOR_ADDON <- 1L
AUGMENT_PRIOR_PERSISTENCE_DAYS <- 56L
build_episodes <- function(d) { # d: fills of ONE person+class, sorted by fill_date
setorder(d, fill_date)
d[, end := fill_date + days_supply]
es <- d$fill_date[1L]; ee <- d$end[1L]; out <- list()
if (nrow(d) > 1L) for (i in 2:nrow(d)) {
if (d$fill_date[i] <= ee + SWITCH_GAP_DAYS) ee <- max(ee, d$end[i])
else { out[[length(out)+1L]] <- list(ep_start = es, ep_end = ee); es <- d$fill_date[i]; ee <- d$end[i] }
}
out[[length(out)+1L]] <- list(ep_start = es, ep_end = ee)
rbindlist(out)
}
classify_first_modification <- function(rx) {
setDT(rx)
eps <- rx[, build_episodes(.SD), by = .(person_id, drug_class), .SDcols = c("fill_date","days_supply")]
setorder(eps, person_id, ep_start)
eps[, {
first_class <- drug_class[1L]; fs <- ep_start[1L]; fe <- ep_end[1L]
later <- which(ep_start > fs & drug_class != first_class)
if (length(later) == 0L) .(index_class = first_class, modifier_class = NA_character_, modification = "no_modification")
else {
j <- later[1L]
overlap_days <- as.integer(min(fe, ep_end[j]) - ep_start[j])
active <- overlap_days >= OVERLAP_DAYS_FOR_ADDON
prior <- as.integer(ep_start[j] - fs)
lab <- if (!active && as.integer(ep_start[j] - fe) <= SWITCH_GAP_DAYS) "switch"
else if (active && prior >= AUGMENT_PRIOR_PERSISTENCE_DAYS) "augmentation"
else if (active) "add_on"
else "line_advance"
.(index_class = first_class, modifier_class = drug_class[j], modification = lab)
}
}, by = person_id]
}