“People in New York have very high expectations about what it means to be taken care of,” said Dr. Katherine Hochman, an NYU physician. “When they don’t get their food on time and have to spend eight hours in the emergency department, well, that’s just not their image of what a world-class institution is.”

The ratings are based on Medicare-approved surveys, which hospitals hire companies to give to a random selection of patients after they are discharged. Some surveys are given by phone, others by mail. All ask the same questions: Did the doctors and nurses communicate well? Was pain well controlled? Was the room clean and the hospital quiet at night? The surveys go to younger patients as well as Medicare beneficiaries.

In setting payment, the federal Centers for Medicare and Medicaid Services plans to be a tough grader. It is going to give hospitals credit only for patients who say their experiences were always good. The surveys also ask patients to rank their stays on a 10-point scale, and Medicare will credit only hospitals that receive a 9 or 10.

That is likely to be a tough threshold for hospitals. Interviewed weeks after her stay, Ms. Schwartz was much more positive about her experience, saying she had “a wonderful time,” but still she was not sure whether NYU deserved more than eight points.

Hospitals’ initial scores will be based on reviews by patients discharged since last July. Starting next October, the federal agency will withhold 1 percent of Medicare’s regular reimbursements to most hospitals and redistribute that money based on how they performed compared with other institutions and how much they improved from the previous year. The bonus amount will rise to 2 percent in 2016.

The agency has decided that patient experience ratings will determine 30 percent of the total bonus payments, more than the hospital lobby favored. The other 70 percent will be based on how hospitals follow clinical guidelines for care, like giving the right medications to avert blood clots and infections.

The agency hopes that commercial insurers will also incorporate patient experience scores into their payments. One major insurer, Wellpoint, already has.