The individual mandate part of Obamacare was upheld by the Supreme Court and that's a big win for companies that count on people being able to afford health-care services.

But not all of the Affordable Care Act provisions that throw more patients into the system were upheld. The Supreme Court ruled that the federal government can't withhold Medicaid funding if states choose not to expand their Medicaid offerings. Essentially states can choose to take additional funds and expand or choose not to expand, but the federal government can't punish them for not expanding.

How many states might choose not to expand? Just over half of the states joined together asking the court to strike down the all-or-nothing provision.

Of course some of those states were just acting like teenagers not wanting to be told what to do by their parents. They'll be happy to take the federal government's extra cash and give their citizens more health-care coverage. The federal government will pick up the tab in the early years, but the states will be on the hook for some of the cost later, which might be a deal breaker for some of the cash-strapped states.

As we get closer to 2014, when the Medicaid expansion part of the law goes into effect, we'll get a better idea of how many states might opt out of the expansion. How many and which ones opt out will have an effect across the health-care industry.

More covered people means more sales of drugs and medical devices. Care for things that can be avoided by the uninsured because they're not immediately life threatening -- Merck's (NYSE: MRK) shingles vaccine Zostavax or medical devices used in elective surgeries, for example -- should get the largest bump.

For emergency care, it'll be the hospitals -- Tenet Healthcare (NYSE: THC), Community Health Systems (NYSE: CYH), and the like -- that'll gain the most from the expanded Medicaid coverage, since they currently have to foot the bill for uninsured patients that come to them. Those companies tend to be somewhat regionalized -- Tenet is only in 12 states, for example -- so the breakdown of exactly which states choose not to expand coverage will be important.

The other major beneficiary of expanded Medicaid will be the insurers, such as Molina Healthcare (NYSE: MOH) and Wellcare Health Plans (NYSE: WCG), that administer the plans for the states. They'll benefit from the increase in customers, assuming the states opt in for the expansion.

The Supreme Court has ruled, but the people get to rule next when they vote in November. Find stock ideas for how to benefit from each candidate's platform in the Fool's new free report: "These Stocks Could Skyrocket After the 2012 Presidential Election." Get your free copy by clicking here.