Republicans struggled to rally enough support for the bill to repeal and replace parts of the Affordable Care Act.