In South Africa, increasing demands and limited resources mean treatment in the public health service for patients suffering from kidney failure is rationed. As Dr Sheri Fink, of American Public Radio International's programme The World, reports from Cape Town, this means medical professionals have to make life-and-death decisions about who gets help.
In late August, 41-year-old Amos Phillips arrived by ambulance at Tygerberg Academic Hospital near Cape Town. His kidneys had failed. He was confused, struggling to breathe, and desperate enough to ask doctors to end his life.
Another kidney-failure patient, Karen MacPherson, desperately wanted to live. "My daughter needs me," the 43-year-old widow with three children said.
To survive, both Mr Phillips and Ms MacPherson needed ongoing dialysis treatment to filter toxins from their blood. A committee would decide whether they would get it.
Elevated rates of hypertension, diabetes and Aids, and falling transplantation rates have contributed to a rise in the number of patients who require dialysis in South Africa and worldwide.
In the United States, Western Europe and Japan, there is widespread access to dialysis, most of it publicly funded. But in many countries, the majority of patients who need dialysis die without it.
In South Africa, only the roughly one-in-five patients who have health insurance, or the small proportion of patients who can afford to pay themselves, are able to get dialysis at private facilities based on medical need alone.
The remaining patients rely on overburdened public hospitals where more and more patients who need dialysis are denied it - currently around four out of every five patients at Tygerberg and a similar number at Groote Schuur, the other major public hospital serving Cape Town.
On a recent Tuesday morning, around a dozen medical professionals gathered in a small conference room at Tygerberg hospital. The committee meets weekly to select patients for the dialysis treatment and transplant programme.
For decades, patients and the public had limited insight into the basis for the committee's decisions. Recently, provincial health officials joined with hospital staff, ethicists and patients to develop official guidelines for patient selection.
"The main thrust of this was to be fair and equitable and transparent," said Dr Rafique Moosa, a kidney specialist at Tygerberg hospital.
At the committee meeting, the hospital's longtime social worker for kidney patients, Marietjie Swart, presided. She projected a photo of Mr Phillips onto a large screen.
Mr Phillips' doctor outlined his medical condition, and then Ms Swart reviewed aspects of his life that might have a bearing on the committee's decision. Mr Phillips "never smoked, never used any drugs", Ms Swart said.
Under the guidelines, active substance abuse automatically excludes a patient from receiving dialysis.
Ms Swart said Mr Phillips lived in a one-bedroom house that had running water, a toilet and electricity. The guidelines call these "good home circumstances", important for a type of dialysis performed at home. However, the poorest South Africans often lack these utilities.
Ms Swart offered more personal details about Mr Phillips. "He is employed on a farm," she said. He had no criminal record and was married with three children.
These factors are measures of social worth. Dr Moosa says the committee used to weigh them heavily, asking essentially: "if we put this patient onto our programme, of what benefit can he be to the society?"
Those factors are not included in the new guidelines. The ethicists who helped draw up them up argued that medical practitioners should not try to judge which patients are the worthiest contributors to society.
Most important, the ethicists said, are medical criteria.
A patient healthy enough to undergo a kidney transplant might someday no longer need dialysis. That would free up a slot for a new patient.
Few, however, actually get transplants. There are far more good medical candidates than there are dialysis slots. Thus, the committee falls back on subjective criteria - does the patient seem motivated and have a good social support network?
The assessment committee weighed whether the factors in Mr Phillips' case qualified him for "category one" ranking, the only category of patients guaranteed dialysis.
But Mr Phillips had arrived at the hospital after his kidneys had already failed. That bumped him to category two.
The same day, the committee members also discussed Ms MacPherson.
Her picture was projected on the screen. Dr Yazid Chothia described her medical and social situation.
"She's the only breadwinner," he said, and she had been raising several children. Now other family members were caring for her.
Ms MacPherson's case had come before the committee before. She had many characteristics that counted in her favour.
She was well below the age of 60, the guidelines' cut-off for initiating dialysis. She didn't have any other serious medical or psychiatric disorders, which could disqualify her.
But the committee had recently turned her down based on her body mass index. She was obese.
Although obese patients do better than average on dialysis, they have a poorer prognosis when it comes to kidney transplantation. That, according to the new prioritisation guidelines, takes precedence.
The next day, Ms MacPherson lay in bed at a hospice. She trembled when she sat up. She was too nauseous to keep down her food.
Still, she tried to stay hopeful.
"I want to get better, I want to get out of here, get my life back on track - get back to my kids," she said.
She seemed unaware that she had been turned down for dialysis, or even that dialysis could help her. Her father had spoken with the doctor.
The prioritisation guidelines call for patients or family members to be fully informed of the committee's decision and given the opportunity to appeal.
Dr Moosa said telling patients that dialysis could save their lives - but that they can't have it - is extremely difficult. "I think it's actually cruel to dangle that almost as a carrot in front of the patient," he said.
South African doctors are looking to expand public dialysis by partnering with private clinics, campaigning for more funding and cutting costs.
For now, however, Tygerberg hospital's dialysis program is oversubscribed. Only category one patients are typically accepted.
Mr Phillips was category two, but borderline.
He looked up from his hospital bed as he was given the news he had in fact been accepted for dialysis.
"I understand and am very happy," he said. He soon returned home to his family and is working again now.
Ms MacPherson was buried two weeks after the committee meeting - on what would have been her 44th birthday.
Dr Sheri Fink is working on a book about allocating healthcare in disasters. Read more at www.rationinghealth.org