Any time the federal government enacts major legislation, there are inevitable winners and losers in the corporate world. That's certainly the case with major laws passed during the first four and a half years of President Obama's time in office.

The first big piece of legislation the Obama administration passed was the American Recovery and Reinvestment Act, or ARRA. Signed into law in 2009, ARRA spent around $800 billion with the goal to stimulate the economy. The other major victory for the administration was passage of the Patient Protection and Affordable Care Act, or PPACA, commonly referred to as Obamacare. While these bills created varied effects -- good and bad -- for different industries, a few companies emerged as big winners from both ARRA and PPACA.

High fives for HITECH
ARRA spread that $800 billion or so around in lots of different ways. One important part of the legislation was the Health Information Technology for Economic and Clinical Health Act, or HITECH. The feds allocated almost $26 billion with HITECH to foster the adoption of health information technology by health-care providers, especially hospitals and physicians.

HITECH created financial incentives for health-care providers to achieve "meaningful use" of electronic health record, or EHR, systems. Medicare pays up to $44,000 over five years for providers that implement certified EHR systems. After 2015, Medicare also will impose financial penalties on hospitals and doctors that don't adopt certified EHR technology.

As you might expect, large EHR systems vendors enthusiastically welcomed passage of HITECH. What company wouldn't enjoy having the government pay customers to buy its products and fine them if they didn't? Allscripts (NASDAQ:MDRX) reported total revenue of $548 million in the fiscal year ending in May 2009. At the end of 2012, the company's annual revenue topped $1.4 billion -- thanks in no small part to Uncle Sam.

Cerner (NASDAQ:CERN) stands out as another big beneficiary of the government's helpful hands. In March 2009, the big EHR vendor reported revenue of $1.67 billion. By the end of last year, Cerner's revenue had jumped to over $2.66 billion.

Smaller EHR vendors profited from HITECH, also. Quality Systems (NASDAQ:QSII) saw its annual revenue climb from $245 million in mid-2009 to over $460 million in 2012. Cloud-based software company athenahealth (NASDAQ:ATHN) chalked up revenue gains of over 200% since early 2009.

Helped by Obamacare
While these companies were raking in the cash, the folks in Washington worked on the other big bill to affect health care -- Obamacare. Hospitals appeared to be the most obvious winners from the health-care reform law, although some doubts have arisen about just how much hospitals will actually benefit. At least on the surface, the EHR vendors didn't seem to be affected too much by Obamacare. However, one focus of the law could benefit some of these companies.

Mixed in among the mandates and Medicare cuts were changes that allow Medicare to move to a new reimbursement approach called bundle payments. This approach would have Medicare issue a single payment for an episode of care (for example, a hip replacement) instead of paying each health-care provider separately. The different providers would, by necessity, need to work very closely with each other to keep costs down and split the payment appropriately.

How does a transition to bundled payments help EHR vendors? The new reimbursement method provides incentive for health-care providers to connect their systems more so than ever before. There's a lot of data that needs to be shared to effectively coordinate care and determine how much money each provider should get. EHR vendors that provide integrated systems across multiple care settings should be positioned well to attract new customers.

Several vendors offer solutions across multiple care settings already. Allscripts sells systems for physicians, hospitals, community health centers, home health agencies, and hospice providers.Quality Systems markets products for physicians and hospitals.Cerner branches out more that most, with technology to support physicians, hospitals, long term care facilities, pharmacies, home health agencies, and hospice providers.

Cerner seems to be the most likely publicly traded company to emerge as the biggest winner from both HITECH and Obamacare. That's because hospitals will probably be the key player in the coming world of bundled payments. Around 10% of hospitals using a complete EHR system to obtain federal incentives reported implementing a system from Cerner. That figure is even higher for hospitals getting incentives by using EHR modules, with nearly 22% reporting that they adopted Cerner's technology.

That isn't to say that companies that don't offer products across multiple care settings, like athenahealth, won't continue to be successful. These companies will need to showcase their interoperability with EHR vendors in other health-care areas. The ones that can connect tightly with other systems should still do well.

Double helpings and more
With HITECH and PPACA, President Obama has treated some of these EHR vendors to a double helping and then some when it comes to stock gains. Shares of Cerner have quadrupled since Obama's first inauguration. Athenahealth has tripled.

How well any of these companies perform in the years ahead will depend largely on how effectively they adapt to changes from new reimbursement approaches. And, of course, future decisions in Washington could make any of them winners or losers.

Fool contributor Keith Speights has no position in any stocks mentioned. The Motley Fool recommends athenahealth and Quality Systems. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.