US President Donald Trump and House Republicans are still scrambling to reach a deal on legislation to repeal and replace the Affordable Care Act (ACA) or Obamacare ahead of a vote on Thursday, the media reported.

House Speaker Paul Ryan held a long meeting on Wednesday night with moderate Republicans. 

During the meeting, Republican Representative Charlie Dent, the leader of a moderate group, slammed the bill spearheaded by Ryan and Trump. 

The vote count for the bill is "tight", CNN reported. 

As of Wednesday night, 24 House Republicans have flat-out said they will vote against the bill called the American Health Care Act, while four more have indicated they were likely to oppose it.

However, the Freedom Caucus — a conservative Republican faction — is sounding more optimistic than ever after talking with Trump and the party leaders.

Trump was personally calling individual members of the Freedom Caucus on Wednesday evening as a possible deal emerged. 

Trump is not at all involved in the details, a presidential aide told CNN. 

"Either (he) doesn't know, doesn't care or both," an aide told CNN. But he is very involved in the sale now, and "appears energised by that".

On Monday, House Republicans unveiled a set of changes to modify the bill, as a last minute effort to win more votes for the legislation.

Many of the changes would make additional revisions to Medicaid — a programme that has provided coverage to more than 10 million people in 31 states — that was pushed by conservative members. 

Another alteration would immediately prevent states from expanding Medicaid. 

Trump and Ryan must get 216 Republicans on board and can afford only 21 defections, if no Democrat joins them.

Trump has been meeting with lawmakers at the White House to press for votes, but shied away from a public display of confidence. 

Asked if he plans to keep trying on health care if the House bill fails, the President said: "We'll see what happens", CNN reported. 

Trump has warned of big losses at the ballot box if Republicans fail to repeal and replace Obamacare, and the White House insists there is no alternative legislation or plan if they fail. 

"There is no Plan B. There's Plan A and Plan A," said White House press secretary Sean Spicer. 

"We're going to get this done".