Washington (CNN) In a rare moment of bipartisanship bringing House Speaker John Boehner and House Minority Leader Nancy Pelosi together, the House passed the so called "doc fix." The House passed it overwhelmingly, 392-37.

The bill permanently fixes Medicare reimbursement for doctors. It also includes a two year extension for a popular children's health insurance program and money for community health centers.

The Senate could act quickly on the measure before they go into recess this week.

Speaking in Birmingham, President Barack Obama said he spoke to Boehner and Pelosi to congratulate them after the bipartisan legislation passed the House on Thursday.

He told the lawmakers, "this is how Congress is supposed to work," and said he hoped the Senate will pass the measure so he can sign it.