← back to blog

The unglamorous problem

There is a rough rule for choosing what to work on, and it is uncomfortable: the prestige of a problem and the amount of value still sitting unclaimed inside it tend to move in opposite directions. The problems that attract the most ambitious people are the ones that look exciting from the outside, and the ones that look exciting from the outside are usually crowded. The problems that matter most are often the ones nobody wants to be seen working on, because they are tedious, structurally ugly, and surrounded by bureaucracy. Getting medicine to the people who need it is the cleanest example I know, and it is the problem I have spent the last year inside.

The version of this problem I have worked on shows up in a country that imports nearly all of its medicines, where I built Kaelo on robust optimization rather than the deterministic forecasting most planning software uses. The difference is easiest to see in the unit tests I am running on it now. A conventional planner is graded on forecast accuracy: how close its predicted demand sits to the mean. The thing I am building is graded on something else. The test I care about is not whether the model serves the average month well. It is whether the worst plausible month inside a defined uncertainty set still leaves the shelf stocked. Picture the district where a meningitis cluster spikes the same week a shipment is delayed. A planner optimized for the expected case will look efficient on paper and fail exactly that district, because the expected case is precisely the case those patients are not in. Most planning software cannot pass this test, not because the engineering is hard, but because it was never asked the question.

The reason the question matters is that the two ways of being wrong are not symmetric. Overstock costs money, and in the worst case an antimicrobial sits in a warehouse and expires. A stockout costs a life. In the antimicrobial case it can cost more than one, because an interrupted or substituted course is one of the ways you breed a resistant organism, and a resistant organism does not stay in the clinic where it was made. Software that minimizes expected cost treats these two errors as if they were the same kind of thing measured in the same units. They are not. Designing for the average is a quiet decision to accept the tail, and in medicine the tail is where people die.

Botswana is not an edge case. By recent estimates close to two billion people have no reliable access to essential medicines, which is roughly a third of humanity. The figure rises to about 40 percent in low-income countries and to around half in the poorest countries of Africa and Asia. Stockouts of medicines for noncommunicable diseases hit up to 41 percent of low-income countries in a recent year, against 4 percent of high-income ones. In some settings a basic antihypertensive is stocked in only 13 percent of facilities, compared with 94 percent in wealthy ones. The last mile is the worst part, and the evidence suggests community-level stockouts are getting worse rather than better. Most of these drugs are off-patent and cheap to make. The problem is not that they do not exist. The problem is that they are not where the patient is on the day the patient needs them.

It would be comfortable to file this as a poor-country problem, a question of development rather than design. It is not. In the United States, the American Society of Health-System Pharmacists counted 223 active drug shortages this spring, down from a record of 323 in early 2024 but still near the worst level since national tracking began in 2001. More than half of new shortages are generic sterile injectables: chemotherapy agents, vasopressors, anesthetics, the contents of a hospital crash cart. The median injectable shortage runs 4.6 years, and more than half of the molecules in shortage sell for under a dollar a unit. During the 2011 norepinephrine shortage, a large cohort study found that patients in septic shock treated at affected hospitals died at higher rates, because the substitute was worse and there was no substitute for simply having the drug. And the failure is not only lethal, it is expensive. A widely cited analysis of more than two thousand U.S. hospitals put avoidable supply chain spending at roughly 25 to 30 billion dollars a year, money lost not to shortages but to the ordinary friction of a domain no one has bothered to optimize. It is the same disease as Botswana, in a richer patient.

The failure persists on both ends of the income scale for the same three reasons, and they compound. First, it is unglamorous, so the talent and capital that could fix it flow toward things that photograph better. Second, the economics punish reliability. A market that cannot observe quality ends up rewarding only price, prices fall until the margin will not support a second supplier or a properly maintained plant, and the whole system sits one failed inspection away from a multi-year outage. The Department of Health and Human Services calls this market failure and misaligned incentives, which is accurate and is also a polite way of saying that nobody is paid to keep the shelf full. Third, and this is the part I work on, the analytical tools aimed at the problem are built for the wrong objective. They forecast demand by extrapolating the order book, then minimize expected cost. Both halves are wrong for medicine. Demand for a critical drug is not a smooth function of its own history; it is a function of disease, and disease arrives in waves the order book has never seen. And expected cost is the wrong quantity to minimize when the downside is a death and the upside is a rounding error.

I listened to the Omenn-Darling lecture at Princeton’s bioengineering institute as part of completing my minor. The speaker, Feng Zhang, is one of the people who built CRISPR, and I expected an hour on the frontier of editing the genome. What stayed with me was closer to the opposite. The celebrated part of bioengineering is the discovery. The unsolved part is everything that happens after the discovery: shipping a novel therapy to the people who need it, and making it something a health system can actually afford. A cure that cannot reach a patient, or that a ministry of health cannot pay for, is not yet medicine. It is a result. The distance between a result and a medicine is a supply chain and a price, and remarkably few people with the technical ability to close that distance find it interesting enough to try.

That is the opportunity, and it is worth being plain that the financial case and the human one are not in tension here. They point at the same thing. A stocked shelf is what a hospital or a health ministry pays for, and it is also what keeps a patient alive; the thing you sell and the thing you fix are identical. The problem is enormous, it is permanent, and most of the people who could solve it will not touch it. The buyers are already moving toward it: U.S. hospital systems carrying tens of billions in avoidable supply chain spend, ministries that import everything and cannot afford to watch it expire, manufacturers and distributors facing resiliency-rating regimes that are starting to treat reliability as a purchasing criterion rather than a virtue. None of them are well served by software that optimizes the average. The willingness to spend years on the boring, hard, structural version of this is not a handicap. It is the moat.

Impact at the scale of millions does not announce itself. It looks like a district clinic in Botswana that has amoxicillin on the morning a community member needs it, and a hospital pharmacy in Ohio that has norepinephrine when the next case of septic shock comes through the door. Nobody is going to photograph either shelf. That is rather the point.