Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Synthetic data

Patient-flow demand and supply

On synthetic flows with assumed rates, a straight-line trend of a specialty therapy's last 12 months of shipments and a patient-flow forecast disagree by more than 5% from the first forecast month, month 25: by 6.9%, or 122 units, a gap that reaches 76% by month 48.

Early on, the trend copies the channel's stock moves; later it misses that new patients slow as the backlog of diagnosed patients runs low. By the declared rule, the first gap's largest piece is stock in the shipment history, +158 units gross: mostly the stock that distributors and pharmacies (the channel) build as demand grows, which the forecast's own planned build offsets (−99, leaving 59 net), plus about 50 from a supply shortfall in months 15 to 18 and the restock after it. Without the shortfall (a run after the results) the gap is 4.1% in month 25 and 5.8% in month 26, with the same largest piece. The declared prediction was a patient piece; this split favours a stock piece in the first months of almost any growing launch, so that miss is largely built in.

Key figures
First month over 5%
Month 25
6.9% (122 units), the first forecast month; with no supply shortfall, 4.1% in month 25 and 5.8% in month 26, same largest piece (a run after the results); at a 10% threshold, month 27; across 1,000 noisy worlds, 5.8% to 8.4% from the tenth to the ninetieth percentile
Largest piece of the first gap, gross
+158 units
stock in the shipment history, 59 net after the planned stock build (−99); against a trend of dispensed units plus the planned stock change, the gap is 3.6% in month 25 and 5.1% in month 26 (computed after the results)
Gap at month 48
76%
with the 12-month trend (6 and 18 months give −46% and +86%); new starts below their recent rate are its largest piece, 981 units; across noisy worlds, 71.6% to 81.8%
The persistence assumption
51% to 118%
gap at month 48 as the analogue (rates borrowed from a comparable earlier therapy) puts monthly discontinuation after month 3 at 1.5% to 4.0%; persistence is the share of patients still on therapy month to month, and the history check shows a wrong curve as +4.5% and −6.2% in month 24

Main limitation One made-up therapy with assumed rates, and no truth is scored: the page shows where and why the two forecasts disagree, not which is right. In the base case the planner's analogue equals the world, so the patient-flow side carries no analogue error by construction.

Two forecasts of the same shipments

The synthetic world runs to month 24, and the planner sees all of it: shipments, the channel's stock, units dispensed to patients, new starts, and patients on therapy by start month. Starts peaked at 159 a month in month 17 and were 143 in month 24, with 1,685 patients on therapy. In months 15 to 18 supply was limited to 900 units a month, so the channel ran its stock down, and in month 19 it took 1,953 units to restock while patients were dispensed 1,171.

Two forecasts follow for months 25 to 48. The shipment trend is a straight line through the last 12 months of shipments. It opens at 1,893 units in month 25, 188 (11.0%) above the 1,706 shipped in month 24: its year of history holds the four months of 900 units and the 1,953-unit restock, and even without them it would open 138 units (8.1%) higher, because a straight line through a year of slowing growth sits above its last point (computed after the results). The patient-flow forecast carries every patient on therapy forward with the analogue's survival curve, adds the starts its funnel expects (calibrated to the starts of months 19 to 24), turns patients into units, and adds the planned change in channel stock: the distributors' contract cuts their stock from 6 to 4 weeks of demand over months 30 to 32.

Units a month: history to month 24, then the two forecasts
  • Shipped
  • Dispensed to patients
  • Shipment trend
  • Patient-flow forecast
  • Supply limit, then destock
Shipments and dispensed units to month 24, then the shipment trend and the patient-flow forecastHistory: shipments dip during the supply limit, spike with the restock, then run above units dispensed while the channel stocks up. Forecasts: the trend keeps rising in a straight line; the patient-flow forecast dips during the planned destock and then flattens. Shaded: the supply limit and the destock. The tables under the chart give the values.01,0002,0003,0004,0005,000131619222528313437404346month after launch; units a monthHistoryForecastsMonth 13: shipped 676 units, dispensed 534Month 14: shipped 790 units, dispensed 641Month 15 (supply limited): shipped 900 units, dispensed 751Month 16 (supply limited): shipped 900 units, dispensed 860Month 17 (supply limited): shipped 900 units, dispensed 967Month 18 (supply limited): shipped 900 units, dispensed 1,071Month 19: shipped 1,953 units, dispensed 1,171Month 20: shipped 1,398 units, dispensed 1,266Month 21: shipped 1,482 units, dispensed 1,357Month 22: shipped 1,561 units, dispensed 1,443Month 23: shipped 1,636 units, dispensed 1,524Month 24: shipped 1,706 units, dispensed 1,600Month 25: trend 1,893 units, patient flow 1,771; gap +6.9%, largest piece stock and supply in the shipment historyMonth 26: trend 1,995 units, patient flow 1,832; gap +8.9%, largest piece stock and supply in the shipment historyMonth 27: trend 2,096 units, patient flow 1,889; gap +11.0%, largest piece stock and supply in the shipment historyMonth 28: trend 2,198 units, patient flow 1,942; gap +13.2%, largest piece stock and supply in the shipment historyMonth 29: trend 2,299 units, patient flow 1,991; gap +15.5%, largest piece stock and supply in the shipment historyMonth 30: trend 2,401 units, patient flow 1,735; gap +38.4%, largest piece planned channel stockMonth 31: trend 2,502 units, patient flow 1,763; gap +42.0%, largest piece planned channel stockMonth 32: trend 2,604 units, patient flow 1,789; gap +45.6%, largest piece planned channel stockMonth 33: trend 2,705 units, patient flow 2,135; gap +26.7%, largest piece new startsMonth 34: trend 2,807 units, patient flow 2,169; gap +29.4%, largest piece new startsMonth 35: trend 2,908 units, patient flow 2,200; gap +32.2%, largest piece new startsMonth 36: trend 3,010 units, patient flow 2,228; gap +35.1%, largest piece new startsMonth 37: trend 3,111 units, patient flow 2,254; gap +38.0%, largest piece new startsMonth 38: trend 3,213 units, patient flow 2,278; gap +41.1%, largest piece new startsMonth 39: trend 3,314 units, patient flow 2,299; gap +44.2%, largest piece new startsMonth 40: trend 3,416 units, patient flow 2,317; gap +47.4%, largest piece new startsMonth 41: trend 3,517 units, patient flow 2,334; gap +50.7%, largest piece new startsMonth 42: trend 3,619 units, patient flow 2,349; gap +54.1%, largest piece new startsMonth 43: trend 3,720 units, patient flow 2,362; gap +57.5%, largest piece new startsMonth 44: trend 3,822 units, patient flow 2,373; gap +61.1%, largest piece new startsMonth 45: trend 3,923 units, patient flow 2,382; gap +64.7%, largest piece new startsMonth 46: trend 4,025 units, patient flow 2,390; gap +68.4%, largest piece new startsMonth 47: trend 4,126 units, patient flow 2,396; gap +72.2%, largest piece new startsMonth 48: trend 4,228 units, patient flow 2,401; gap +76.1%, largest piece new starts
Shipments and dispensed units to month 24, then the shipment trend and the patient-flow forecastHistory: shipments dip during the supply limit, spike with the restock, then run above units dispensed while the channel stocks up. Forecasts: the trend keeps rising in a straight line; the patient-flow forecast dips during the planned destock and then flattens. Shaded: the supply limit and the destock. The tables under the chart give the values.01,0002,0003,0004,0005,000131925313743month after launch; units a monthHistoryForecastsMonth 13: shipped 676 units, dispensed 534Month 14: shipped 790 units, dispensed 641Month 15 (supply limited): shipped 900 units, dispensed 751Month 16 (supply limited): shipped 900 units, dispensed 860Month 17 (supply limited): shipped 900 units, dispensed 967Month 18 (supply limited): shipped 900 units, dispensed 1,071Month 19: shipped 1,953 units, dispensed 1,171Month 20: shipped 1,398 units, dispensed 1,266Month 21: shipped 1,482 units, dispensed 1,357Month 22: shipped 1,561 units, dispensed 1,443Month 23: shipped 1,636 units, dispensed 1,524Month 24: shipped 1,706 units, dispensed 1,600Month 25: trend 1,893 units, patient flow 1,771; gap +6.9%, largest piece stock and supply in the shipment historyMonth 26: trend 1,995 units, patient flow 1,832; gap +8.9%, largest piece stock and supply in the shipment historyMonth 27: trend 2,096 units, patient flow 1,889; gap +11.0%, largest piece stock and supply in the shipment historyMonth 28: trend 2,198 units, patient flow 1,942; gap +13.2%, largest piece stock and supply in the shipment historyMonth 29: trend 2,299 units, patient flow 1,991; gap +15.5%, largest piece stock and supply in the shipment historyMonth 30: trend 2,401 units, patient flow 1,735; gap +38.4%, largest piece planned channel stockMonth 31: trend 2,502 units, patient flow 1,763; gap +42.0%, largest piece planned channel stockMonth 32: trend 2,604 units, patient flow 1,789; gap +45.6%, largest piece planned channel stockMonth 33: trend 2,705 units, patient flow 2,135; gap +26.7%, largest piece new startsMonth 34: trend 2,807 units, patient flow 2,169; gap +29.4%, largest piece new startsMonth 35: trend 2,908 units, patient flow 2,200; gap +32.2%, largest piece new startsMonth 36: trend 3,010 units, patient flow 2,228; gap +35.1%, largest piece new startsMonth 37: trend 3,111 units, patient flow 2,254; gap +38.0%, largest piece new startsMonth 38: trend 3,213 units, patient flow 2,278; gap +41.1%, largest piece new startsMonth 39: trend 3,314 units, patient flow 2,299; gap +44.2%, largest piece new startsMonth 40: trend 3,416 units, patient flow 2,317; gap +47.4%, largest piece new startsMonth 41: trend 3,517 units, patient flow 2,334; gap +50.7%, largest piece new startsMonth 42: trend 3,619 units, patient flow 2,349; gap +54.1%, largest piece new startsMonth 43: trend 3,720 units, patient flow 2,362; gap +57.5%, largest piece new startsMonth 44: trend 3,822 units, patient flow 2,373; gap +61.1%, largest piece new startsMonth 45: trend 3,923 units, patient flow 2,382; gap +64.7%, largest piece new startsMonth 46: trend 4,025 units, patient flow 2,390; gap +68.4%, largest piece new startsMonth 47: trend 4,126 units, patient flow 2,396; gap +72.2%, largest piece new startsMonth 48: trend 4,228 units, patient flow 2,401; gap +76.1%, largest piece new starts

The trend rises 101.5 units a month. The patient-flow forecast flattens: starts fall from 140 in month 25 to 83 in month 48 as the backlog of diagnosed patients is worked down, while discontinuations grow with the number on therapy.

Where they disagree, and why

Each month's gap, trend minus patient-flow forecast, splits into six pieces that add up to it exactly. Stock and supply in the shipment history: the shipment trend minus the same trend fitted to units dispensed, so whatever the channel's stock did in the trend's year. Trend fit: the trend of dispensed units against a path that carries on the latest six months' net change in patients. New starts and discontinuations: how far forecast starts fall below, and forecast discontinuations rise above, their latest six-month rates. Planned stock: the planned change in channel stock, with its sign turned. Supply ahead: any limit on shipments in the forecast, none here. That the pieces add up is bookkeeping; the split shows where to look, and another split would name other pieces.

Every forecast month differs by more than the threshold; the largest piece changes twice
MonthsLargest pieceGap, % of the patient-flow forecast, first to last month
25 to 29Stock and supply in the shipment history+6.9 to +15.5
30 to 32Planned channel stock+38.4 to +45.6
33 to 48New starts+26.7 to +76.1
The gap and its six pieces, units a month: trend minus patient-flow forecast
MonthTrendPatient flowGapStock and supply in historyTrend fitNew startsDiscontinuationsPlanned stockSupply ahead
251,8931,771+122 (+6.9%)+158+47+10+6−990
292,2991,991+308 (+15.5%)+173+86+83+43−760
302,4011,735+666 (+38.4%)+176+95+109+54+2310
322,6041,789+815 (+45.6%)+183+115+169+80+2690
332,7052,135+571 (+26.7%)+187+125+203+94−370
403,4162,317+1,099 (+47.4%)+212+193+510+203−190
484,2282,401+1,827 (+76.1%)+241+270+981+340−60

The largest piece changes twice. Stock and supply in the history lead months 25 to 29; the planned destock leads months 30 to 32, when the gap peaks at 45.6% before the channel settles at its new level; new starts lead from month 33, and by month 48 they are 981 units of a 1,827-unit gap, with discontinuations 340 more.

Grouped after the results into stock (history, plan and supply) and patients (trend fit, starts and discontinuations), the two stock pieces largely cancel: in month 25 stock comes to 59 units and patients to 63, and the patient group is larger in every month but the three destock months. A trend of dispensed units plus the planned stock change differs from the patient flow by the patient pieces alone: 3.6% in month 25 and 5.1% in month 26, its first month over 5% (computed after the results). The declared rule names a single piece, so the first prediction is scored on it, and it failed.

Month 25, traced

At the end of month 24, 1,685 patients are on therapy. In month 25 the analogue's curve says 64 stop, and the funnel adds 140 new starts, so 1,760 are on therapy. At 0.95 units each, patients need 1,672 units. The channel holds 2,210 units and keeps 6 weeks of a growing demand, so it takes 99 more: reconciled shipments of 1,771 units. The trend says 1,893, a gap of 122 units: 158 from stock and supply in the shipment history, 47 from the trend's fit, 10 from new starts, 6 from discontinuations and −99 from the planned stock build.

Reconcile the history before the forecast

Two checks run on months 13 to 24 before any forecast is trusted. First, shipments minus the change in channel stock equal units dispensed. In this synthetic world that closes by construction, so it is bookkeeping here; with real distributor and pharmacy data it is the first check to fail. Second, the analogue's survival curve, applied to the starts actually seen, should reproduce the units dispensed. In the base case it does exactly, because the analogue is the world, which is no evidence. When the analogue is wrong, the check shows it before the forecast does:

A wrong referral rate or adoption timing does not show in this check, because the calibration to recent starts absorbs its level; it moves the later gap through the shape of future starts instead.

Which assumptions move it

Every input in the declared sweep was moved to each end of its range, one at a time. World inputs change the history; analogue inputs change only the planner's forecast; plan and method inputs change the destock, the trend window and the threshold.

One input at a time, at the low and the high end of its range (low, high)
InputRangeFirst month over the thresholdIts gap, %Gap at month 48, %History check at month 24, %
Launch stock target, units a month of demand250 to 75025, 25+6.9, +6.9+76.1, +76.10.0, 0.0
Channel stock, weeks on hand4 to 825, 25+6.0, +8.2+73.3, +80.40.0, 0.0
Supply limit in months 15 to 18, units a month800 to 1,00025, 25+9.5, +5.3+84.7, +70.80.0, 0.0
Analogue: monthly discontinuation after month 31.5% to 4.0%25, 25+5.2, +9.6+51.5, +117.6+4.5, −6.2
Analogue: monthly discontinuation in months 1 to 35% to 12%25, 25+5.3, +9.2+65.3, +91.5+8.4, −10.5
Analogue: referral rate, % of base80% to 120%25, 25+6.4, +7.3+66.4, +84.90.0, 0.0
Analogue: adoption midpoint, month7 to 1125, 25+6.9, +6.8+74.1, +77.30.0, 0.0
Destock: weeks kept, % of today's50% to 83%25, 25+6.9, +6.9+76.2, +76.00.0, 0.0
Destock: first month28 to 3425, 25+6.9, +6.9+76.1, +76.10.0, 0.0
Trend window, months6 to 1825, 25−10.9, +9.5−46.4, +86.00.0, 0.0
Divergence threshold, %3 to 1025, 27+6.9, +11.0+76.1, +76.10.0, 0.0

Nothing in the declared ranges changes which piece leads the first gap, and only a 10% threshold moves it past month 25, to month 27. A trend window of 6 months turns the gap around: a line through months 19 to 24 starts at the restock spike and slopes down, so the trend runs 10.9% below the patient flow in month 25 and 46.4% below by month 48. The size of the later gap moves most with the trend window, then the analogue's discontinuation rates, then its referral rate. The launch fill does not touch the first gap at all, because it falls outside the trend's year.

Chance does not move it either. Across 1,000 noisy worlds, with every flow of patients drawn at random, the gap first crossed 5% in month 25 in 975 worlds and in month 26 in 25, and the largest piece of that first gap was the same as in the base case in all of them (Wilson lower bound 99.6%), as the second prediction said. Across those worlds the first gap ran from 5.8% to 8.4% and the month-48 gap from 71.6% to 81.8%, from the tenth to the ninetieth percentile. The agreement says less than it seems: the same piece leads with no shortfall at all, because the history piece is a full level from the first forecast month while the starts and discontinuation pieces are running sums that start near zero (10 and 6 units in month 25). This split makes a stock piece lead the first months of almost any growing launch, so the second prediction holds largely because of the split, and the first prediction's miss is largely built in (a reading after the results).

What a demand planning team would do with it

Limits

Use this at your company

To reconcile your own patient-based forecast with your shipment trend, paste this into an AI assistant along with your monthly data.

This method comes from Diogo Travassos's study "Patient-flow demand and supply" (https://diogotravassos.dev/marketplace-revenue-forecast/patient-flow.html). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't.

Help me reconcile our patient-based demand forecast with our shipment trend, and find where and why they disagree.
1. Line up the history by month: shipments, channel stock, units dispensed, new patient starts and patients on therapy by start month, and check that shipments minus the change in channel stock equals units dispensed.
2. Back-cast units dispensed from the starts we actually saw and our analogue's persistence curve, and report the gap before trusting the curve.
3. Build the patient-flow forecast: carry every patient on therapy forward with the persistence curve, add the starts the funnel expects (calibrated to recent starts), convert patients to units, and add the planned change in channel stock and any supply limit.
4. Build the shipment trend the way we usually do, and the same trend on units dispensed.
5. Split each month's gap into stock and supply in the shipment history, the trend's fit, new starts, discontinuations, planned channel stock and supply ahead, so the pieces sum exactly; call that split bookkeeping, not evidence, and also group the pieces into stock and patients, because stock pieces can offset each other.
6. Flag every month where the two differ by more than 5%, and name the first one, its size and its largest piece.
7. Move each assumption across a plausible range (persistence, the referral rate, channel weeks on hand, the destock, the trend window, the threshold) and say which ones move the first gap and which move the later gap.

Report back: the history checks, the first month over the threshold with its size and pieces, each stretch and what leads it, the sweep, and the limits.

In your report, say which study you followed and link it: https://diogotravassos.dev/marketplace-revenue-forecast/patient-flow.html

Method and checks

The synthetic world

Every value is an assumption, written down before any code existed (the protocol). Each month, patients on therapy stay on it or stop; referrals from the month before start; identified patients are diagnosed or leave; diagnosed patients are referred as adoption grows (a logistic curve) or leave; units dispensed are patients on therapy times units per patient-month. The channel aims to hold its weeks of demand, a month being 4.345 weeks, with a launch fill in the first months; shipments are demand plus the stock change, never negative and capped by supply.

The synthetic world, every value an assumption
InputValue
Identified patients at launch, and new a month6,000; 100
Each month: diagnosed, and leaving the identified pool6%; 1%
Diagnosed and untreated at launch3,000
Each month: referred at full adoption, and leaving the pool5%; 1%
Adoption: month at half, and months to spread9; 2.5
Referrals that start the next month72%
Monthly discontinuation in the first months, and after8% for 3 months; 2.5%
Units dispensed per patient-month0.95
Channel stock, weeks of demand6
Launch stock target6 weeks of 500 units a month of demand for months 1 to 6 (690 units shipped in month 1, none in months 7 to 9)
Supply limit, units a month900 in months 15 to 18
The forecasts and the bridge
  • Shipment trend: an ordinary least squares line through shipments of months 13 to 24, extended.
  • Patient-flow forecast: the planner's funnel run in expectation with the analogue's rates and scaled to the observed starts of months 19 to 24 (a factor of 1.00 in the base case); each start cohort carried forward with the analogue's survival curve; units per patient-month as observed in month 24; planned channel stock as the target weeks times demand, starting from the observed stock.
  • Bridge: the six pieces defined above, with the recent rates taken over months 19 to 24: 150.7 starts and 57.9 discontinuations a month, a net 88.2 units a month, against the trend's 97.9 for dispensed units and 101.5 for shipments.
  • Noisy worlds: incidence Poisson, every other flow binomial or multinomial, survival binomial per start cohort, the planner at base.
  • The design, including two predictions and their pass rules, was committed before any forecasting code existed: the declared design. The first prediction failed: the first gap came before the destock, as predicted, but its largest piece was stock, not patients. The second held: all 1,000 noisy worlds named the same piece as the base case (Wilson lower bound 99.6%).
Checks
  • The six pieces sum to the gap in every month of the base case, every sweep and every noisy world, to within a rounding error.
  • Shipments minus the change in stock equal units dispensed in every history month, and no world ran out of stock for patients.
  • Known answers: with no supply limit and no launch fill, each month's shipments exceed units dispensed by exactly the stock the channel's weeks of cover add as demand grows; with no discontinuation, patients on therapy equal all starts to date; and the calibration factor is one when the world and the analogue agree.
  • A test added after the results keeps the history check on the months the design names, whatever the trend window.