ALBANY, N.Y. — New York Gov. Andrew Cuomo and state lawmakers are close to agreement on a law that would require nursing homes to spend a set portion of their revenue on patient care, officials said, at a time when the governor's office is under fire over how it handled Covid-19 in long-term-care facilities. The law is being discussed as part of talks around the roughly $200 billion state budget coming together this week at the state Capitol. Democrats who dominate the state Assembly and Senate have approved bills with the nursing-home spending mandate, and aides to the governor and Legislature said Wednesday they were close to a final agreement. The discussions are a stark shift from last year, when lawmakers waived regulations and granted broad civil and criminal immunity to healthcare providers as the state faced a deadly surge in coronavirus cases. More than 50,000 New Yorkers have died from the Covid-19 pandemic, and roughly a third were residents of long-term-care facilities. The new law would also be another response to criticism over how the state handled Covid-19 in nursing homes. State Attorney General Letitia James issued a report in January saying the Cuomo administration understated the coronavirus death toll attributed to some nursing homes by roughly 50%. Legislators have already approved a bill to repeal the immunity provisions, which were adopted as part of last year's state budget, as well as passed a measure that requires nursing-home operators to disclose more information about their business relationships. Assemblyman Richard Gottfried, a Manhattan Democrat who chairs the chamber's health committee, sponsored bills calling for disclosure and mandating that 70% of a nursing home's revenue is spent on patient care. He said it would lead to better care, particularly at for-profit facilities. "Certainly, the Covid-19 situation has shined a bright light on nursing home issues," Mr. Gottfried said in an interview. "These issues were all very pressing for the last several decades, but sometimes it takes a calamity to energize people to action." Local 1199 of the Service Employees International Union, which represents 65,000 workers in about half of the state's nursing homes, is campaigning hard for the disclosure and spending measures. Nursing homes and their representatives said the spending mandate would impose more financial restrictions on an industry that was devastated by the pandemic.