TORONTO - Premier Dalton McGuinty is defending a government agency tasked with developing electronic health records for spending millions of dollars each year on consultants.

Documents obtained by the Conservatives show that the Smart Systems for Health Agency spent at least $26 million over five years on consultants, including pollsters.

The Toronto Sun is reporting that the agency -- now called eHealth Ontario -- spent $67.2 million on consultants in the last two years alone.

McGuinty says it's an expensive undertaking to set up an e-health system, but acknowledged that it can't come at any cost.

He says the government must ensure that taxpayers are getting value for dollar.

Opposition parties say the agency is gobbling up millions of dollars with little to show for it.

NDP Leader Andrea Horwath says the money would be better spent on providing better health care in the province.