U.S. stocks advanced on Monday, boosted by gains in the healthcare sector as passage of a bill to overhaul the system eased uncertainty for investors.

The legislation was passed by the U.S. House of Representatives late on Sunday, and while analysts have raised concerns it will pinch corporate profits, they said much of the negative impact was priced in already.

Also, hospital and pharmaceutical companies could likely benefit from the bill. Pfizer Inc

, the world's largest drug company, rose 2 percent to $17.25.

It could also be just a sigh of relief that it's over with and nothing worse is coming. The market is showing its colors here in the face of what should have been an opening decline this morning, said Stephen Massocca, managing director, Wedbush Morgan in San Francisco.

The Dow Jones industrial average <.DJI> was up 32.80 points, or 0.31 percent, at 10,774.78. The Standard & Poor's 500 Index <.SPX> was up 3.49 points, or 0.30 percent, at 1,163.39. The Nasdaq Composite Index <.IXIC> was up 13.01 points, or 0.55 percent, at 2,387.42.

The Morgan Stanley Healthcare Payor Index <.HMO> gained 1.2 percent, putting it on track for a sixth straight session of gains. Insurer WellCare Health Plans Inc rose 1.8 percent to $31.27.

Limiting gains were energy shares, which slipped along with oil prices, and conflicting signals from European leaders over aid to Greece.

Oil was down 37 cents at $80.31 a barrel, as the dollar gained against the euro on concerns over Greece. Chevron was among the top drags on the Dow. It shed 0.7 percent to $74.44.

The debate over Greece's fiscal woes heated up. A European Commission official pressed Germany to agree on a financial safety net, while Greece's deputy prime minister accused German companies of profiting from the situation.

(Additional reporting by Leah Schnurr and Charles Mikolajczak; Editing by Kenneth Barry)