A bill to continue funding a program that makes it easier for rural Maine veterans to use local doctors instead of having to drive all the way to Togus VA Hospital in Augusta last week advanced in Congress.

The U.S. House of Representatives passed a $3.9 billion emergency funding bill on Friday afternoon, just before its August break, with $2.1 billion designated for the Veterans Choice Program.

The Veterans Choice Program provide veterans with access to medical care through civilian providers when their local VA facilities face long wait times, lack available specialists or if the veteran lives more than 40 miles from the closest VA facility that provides the type of care they need.

The bill would also fund leases for 28 new VA facilities in 17 states — including one in Portland — and a handful of other VA initiatives.

Veterans Affairs Secretary David Shulkin told Congress earlier this year that the Veterans Choice Program funding would run out in mid-August. The Senate is expected to take up the bill before its summer recess in two weeks.

Maine officials have been told they can continue to make patient referrals, unlike some states that have already stopped while the emergency funding is discussed, but the patient care must be completed by the end of September, according to Jim Doherty, spokesman for the VA Maine Healthcare System.

“Right now, we’re good to go until Sept. 30,” Doherty said.

The Veterans Choice Program was created under the Veterans Access, Choice, and Accountability Act of 2014, a $16.3 billion funding and reform measure passed in the wake of a scandal over falsified records covering up long patient delays at VA hospitals and clinics around the country.

The House bill approved last week includes $6.8 million for a replacement community-based outpatient clinic in Portland that would consolidate the existing Saco and Portland veteran outpatient clinics.

The VA must get legislative authorization to lease medical facilities with average annual rental payments in excess of $1 million. But no major VA medical facility has been approved since 2012, mostly due to a change in the congressional authorization process, Maine Sens. Susan Collins and Angus King said in January, when they reintroduced a bill to authorize the pending leases.