He has an easy smile, blue eyes and a life-threatening bone infection in one arm. Grateful for treatment, he jokes with the medical intern each morning. A friend, a fellow doctor, is supervising the man’s care. We both work as internists at a public hospital in the medical safety net, a loose term for institutions that disproportionately serve patients on Medicaid or without insurance. You could describe the safety net in another way, too, as a place that holds up a mirror to our nation.

What is reflected can be difficult to face. It’s this: After learning that antibiotics aren’t eradicating his infection and amputation is the only chance for cure, the man withdraws, says barely a word to the intern. When she asks what he’s thinking, his reply is so tentative that she has to prompt him to repeat himself. Now with a clear voice, he tells her that if his arm must be amputated, he doesn’t want to live. She doesn’t understand what it’s like to survive on the streets, he continues. With a disability, he’ll be a target — robbed, assaulted. He’d rather die, unless, he says later, someone can find him a permanent apartment. In that case, he’ll proceed with the amputation.

The psychiatrists evaluate him. He’s not suicidal. His reasoning is logical. The social workers search for rooms, but in San Francisco far more people need long-term rehousing than the available units can accommodate. That the medical care the patient is receiving exceeds the cost of a year’s rent makes no practical difference. Eventually, the palliative care doctors see him. He transitions to hospice and dies.

A death certificate would say he died of sepsis from a bone infection, but my friend and I have a term for the illness that killed him: end-stage poverty. We needed to coin a phrase because so many of our patients die of the same thing.

Safety-net hospitals and clinics care for a population heavily skewed toward the poor, recent immigrants and people of color. The budgets of these places are forever tight. And anyone who works in them could tell you that illness in our patients isn’t just a biological phenomenon. It’s the manifestation of social inequality in people’s bodies.

Neglecting this fact can make otherwise meticulous care fail. That’s why, on one busy night, a medical student on my team is scouring websites and LinkedIn. She’s not shirking her duties. In fact, she’s one of the best students I’ve ever taught.