The hospital, in turn, said in medical records that it was unable to do more for Mr. Purdy. Doctors tried for weeks to find a bed at a rehabilitation center — especially difficult for patients on Medicaid — only to have him change his mind on the day of his discharge and go home. He told a nurse he planned to kill himself but was never admitted to a psychiatric ward. The records are not clear about whether he went home with a prescription for anti-clotting medicine; his mother said he did not.

Saving Mr. Purdy from a bullet in the back was not enough. The poor pockets of the Bronx from which he carved his itinerant life created hurdles that made it hard for a gunshot survivor to stay alive.

Mr. Purdy’s long path to death wound through a bathtub in a public-housing project where a brother lifted his limp 181 pounds in and out of the water. Before that, Mr. Purdy lingered for six weeks at Lincoln Medical Center, a well-regarded hospital for trauma care that — like many institutions across the country — struggles to care for paraplegics.

“This is just another case where society’s ability to care for people in a multidisciplinary way is not always so perfect, especially in underserved populations,” said Dr. Ronald Simon, the former chief of Lincoln’s trauma division and one of the doctors who oversaw Mr. Purdy’s treatment.

While the challenges of his care illuminate broad problems in how the health care system treats the poor and permanently disabled, Dr. Simon and outside medical experts said the hospital appeared to have met the relevant treatment standards and that Mr. Purdy might have unwittingly hastened his death by leaving.

He spent much of his last 47 days trying to prove he could return from injury and get justice on his own, without the help of doctors or detectives.