Many investors in healthcare companies breathed a bit easier as the final details of the historic healthcare legislation emerged over the weekend. According to ETF Database (ETF db), www.etfdb.com/

investors became convinced that the surge in paying customers would outweigh any damage done by new fees and more stringent regulations. They focused on hospitals and drug makers, most of which supported the final regulation, as beneficiaries of health care reform. At the same time, health insurance providers appear to have most to lose from its passage.

ETF db looked at the prospects for three subsectors of the healthcare industry through the prism of three funds available to investors:

iShares Dow Jones U.S. Healthcare Providers Index Fund (IHF): This ETF’s benchmark includes operators of health maintenance companies, hospitals, clinics, nursing homes and rehabilitation centers. Some investors think that the ability of health care providers to bill the government for patient treatment could mean healthier profits, according to ETF db. IHF enjoyed strong gains late last week, and surged in trading early Monday.

SPDR S&P Pharmaceuticals ETF (XPH): Under the new legislation, drug manufacturers would pay some $16 billion between 2011 and 2019 to help defray the costs of the plan. ETF db said many investors believe that health care reform will have an overall negative effect on the pharmaceutical industry, although it may result in fewer generic prescriptions and therefore higher profit margins. In addition, the industry will get a big boost from the increased number of patients paying for prescription medication.

iShares Dow Jones U.S. Medical Devices ETF (IHI): Starting on 2013, medical device manufacturers will have to pay taxes of 2.9% on their products, though it’s unclear whether manufacturers will pay this tax or pass it on to consumers. IHI continued to rally on Monday morning, building on gains from last week.

Michael S. Fischer is a New York-based financial writer and editor and a frequent contributor to Wealth Manager.