I'm not sure if it's really being appreciated just how comprehensively the Republicans were just fucked over.
See, the Republicans have been trying to pass these godawful healthcare bills through a process called budget reconciliation, which, among other things, protects the bill from being filibustered in the Senate and only requires a simple majority of 50 votes (rather than 60, which the Republicans don't have).
The thing is, the Senate can only consider one budget reconciliation bill per topic per year. Of course, if the bill dies in committee and never comes to an official vote, it doesn't count- which is why they've been able to keep hammering away at the issue.
This bill, though, was allowed to come to the Senate floor, because the Republicans thought they'd secured the votes. Collins, Murkowski and the Democrats would vote no, everyone else would vote yes, and Pence would break the tie. And then McCain completely fucked them. And it was almost certainly a calculated move; he voted to allow the bill to come to the floor. Had McCain allowed it to die in committee, McConnell could have come back with yet another repeal bill; but he let it come to a vote, and now they can't consider another budget reconciliation bill for the rest of the fiscal year. The Senate needs 60 votes to pass any kind of healthcare reform now.
So now they're caught between a rock and a hard place. Either they concede defeat on the issue and try again later (causing a big, unpopular stink that could damage elections if they try it before the midterms, or risking losing the slim majority they already have if they wait) or they actually sit down with the democrats like adults and write a halfway decent healthcare bill.
This is amazing.