President Trump speaks during an event honoring World War II veteran Native American “Code Talkers” in 2017. (Oliver Contreras/Pool/Bloomberg News)

President Trump on Thursday promised he would “immediately” sign revamped legislation expanding veterans’ access to private medical care at taxpayer expense, if Congress passes a new plan being considered just weeks before the “Choice Program” runs out of money.

In a tweet Thursday, the president noted that it has been four years since the wait-times scandal at a Veterans Affairs hospital in Phoenix. That controversy showed that hospital employees were lying about the amount of time veterans waited for urgent health care, including cancer treatment and mental-health counseling.

“We won’t forget what happened to our GREAT VETS,” Trump said. “Choice is vital, but the program needs work & is running out of $. Congress must fix Choice Program by Memorial Day so VETS can get the care they deserve. I will sign immediately!”

On Thursday, House lawmakers introduced the latest legislative proposal for veterans that would expand private health-care options at taxpayer expense, offer caregiver benefits to older veterans, fast-track hiring and close aging facilities. The proposal includes $5.2 billion for the Choice Program that funds private care, which would extend it for another year. The total cost of the measure is not yet known.

The move comes just a week after the acting secretary for Veterans Affairs, Robert Wilkie, warned in a letter to lawmakers that money for the program will run out in the coming weeks.

More than 30 percent of medical appointments — care for about 900,000 veterans — is sent to private hospitals. Veterans using the program could begin receiving letters next month warning that the program could be shut down in early summer.

The latest nick-of-time measure is scheduled for mark-up before the House Veterans’ Affairs Committee on Tuesday.  A similar plan was nearly passed as part of the federal “omnibus” budget package in March but was blocked by some Democrats concerned about privatization of veterans’ services.

The issue has been debated and hammered out with veterans groups for over nine months. The extent of private care has been a source of tension, since veterans groups say they don’t want to see too many resources sent outside VA. It’s not clear whether Democrats will try to block the legislation again. But some veterans groups said they were happy with the latest compromise.

Under the new plan, veterans who are enrolled in VA health care would be allowed two visits a year to any outside physician without any cost. In addition, many others would be eligible for more private specialists under new rules determining whether VA offers equal health-care services.

“This legislation must be passed, and if Congress fails to act veterans will pay for that failure,” House Veterans’ Affairs Committee Chairman Phil Roe (R-Tenn.) said in a statement. This measure “will put the department back on track to fulfilling President Lincoln’s promise to care for the men and women who have borne the battle.”

The bill would also improve VA’s ability to expand caregiver benefits to pre-9/11 veterans, and establish a process to evaluate and reform VA’s capital infrastructure to better serve veterans, according to Keith Harman, national commander of the 1.7 million-member Veterans of Foreign Wars of the United States and its auxiliary.

“VFW members around the country have made it clear that the VA health-care system must be improved, not dismantled,” Harman said. “This agreement strikes a balance between improving access to VA doctors and leveraging the capabilities of the private sector when VA is unable to meet veterans’ health-care needs.”

Veterans are a key constituency for Trump. One was his campaign promises was: “We will take care of our great veterans like they have never been taken care of before.”

Consideration of bill comes after the surprise nomination and then withdrawal of White House physician Ronny L. Jackson for the post of Veterans Affairs secretary. Trump’s first VA secretary, David Shulkin, was fired in late March, in part because of his public battles with other political appointees within VA and the White House over the extent of outsourcing care.

The agency remains in a period of turmoil, with some of the department’s leadership in acting positions.