President-elect Donald Trump has vowed to repeal the Affordable Care Act, and the key issue facing Republicans is how do they get rid of the sweeping health care law without creating chaos for an estimated 20 million people who gained insurance under the program.

That includes many people who gained health care through more generous rules for Medicaid, a longstanding federal program for the very poor. Sen. Rand Paul, R-Ky., said dealing with people who got Medicaid is "the big question."

"The vast majority of people that got insurance under President Obama's Obamacare, the Affordable Care Act, got it through Medicaid," Paul said Jan. 15, 2017, on CNN’s State of the Union.

Paul proposed that if any state wants to retain expanded Medicaid, it should be prepared to raise taxes to do so. Paul’s federal plan emphasizes reducing insurance regulations to lower prices and promoting health savings accounts.

Our focus is on his statement that the vast majority of the newly insured under Obamacare came through the Medicaid program. We were curious if that was accurate.

More people became eligible for health insurance through Medicaid after passage of the Affordable Care Act. The law expanded eligibility for the poor, though states could choose not to participate in the expansion.

We reached out to Paul’s office for his source and did not hear back, but the U.S. Health and Human Services Department issued a report in March 2016 that at first glance gives some support to his claim. It said that Medicaid and CHIP (Children’s Health Insurance Program) added 14.5 million people by the end of 2015. (That’s the most recent data available.)

Take that number at face value and about three-quarters of the newly insured came through the two closely linked programs.

But the analysts we reached told us that a fair number of those new people were eligible for coverage under old rules that predated the Affordable Care Act.

How many?

The Kaiser Family Foundation broke it down into about 10.7 million newly eligible and about 3.4 million who were eligible before but hadn’t enrolled.

Joan Alker, a research professor at Georgetown University’s McCourt School of Public Policy, told us that most of that 3.4 million are children. She said Medicaid analysts explain this through the "welcome mat effect."

"There was a lot of outreach and publicity, and people started coming in," Alker said. "The parents might qualify for expanded Medicaid, but their kids were already eligible under Medicaid or CHIP. And the same could happen for parents who signed up through the marketplace."

The marketplace was the way to sign up -- often through a government website -- for individual private insurance under the Affordable Care Act.

It turns out, the impact of Obamacare on Medicaid is more complicated than simply more generous eligibility rules for adults.

Benjamin Sommers at the Harvard School of Public Health said research he and his colleagues did showed that about half of the Medicaid increases came through eligibility changes and about a half through drawing in those who were eligible before.

For Sommers, both effects are part of the Affordable Care Act. In that sense, he thinks Paul has a point.

"The majority of the national coverage gains are Medicaid, but not the vast majority," Sommers told us.

In an op-ed, Sommers wrote that eligibility rules and the welcome mat effect are so intertwined, if parents lose their eligibility, very often coverage for their kids lapses as well, even though the children still qualify.

"If parents are disenrolled after an ACA repeal, many children will return to being uninsured," he wrote.

A couple of other factors make it difficult to say precisely why Medicaid grew under Obamacare.

Health care analyst, John Holahan at the Urban Institute, a Washington-based academic center, noted that the Medicaid enrollment data is shaky.

"If all 50 states send in their numbers, 40 of them might do a good job and for 10, the data might be garbage. You try to impute and make estimates to account for the flawed and missing information," he said.

And Laura Wherry, assistant professor of medicine at the UCLA School of Medicine, said any model depends on some guesswork as to what would have happened if the Affordable Care Act hadn’t happened at all.

Our ruling

Paul said the vast majority of people that got insurance under Obamacare got it through Medicaid. About 20 million people gained coverage and about 14.5 million of those were under Medicaid or CHIP. But a sizeable fraction of that 14.5 million were eligible before the Affordable Care Act took effect. One estimate said about a quarter of them were previously eligible. Another estimate put it as high as half.

There is some guess work behind all the reports. Medicaid might account for slightly more than half of those who gained coverage. Most people wouldn’t say that amounts to the vast majority, but it is likely still the majority.

We rate this claim Half True.