WASHINGTON (NBC News) — Senate Republicans have unveiled a draft of their legislation to revamp the government's role in the nation's health care system, a proposal that includes big reductions to Medicaid spending, tax cuts and the elimination of the mandate for individuals to purchase insurance.

The bill winds down the expanded Medicaid program under Obamacare after 2020 — a longer timeline than the House health care bill that was passed in May. But it also makes deeper cuts to the program in the long run by changing the federal funding allocation formula for states to receive fewer federal dollars for Medicaid recipients. It's an attempt at a compromise to appease those Medicaid advocates like Sens. Rob Portman of Ohio and Susan Collins of Maine as well as conservatives like Sens. Mike Lee of Utah and Ted Cruz of Texas.

The measure also helps people who purchase insurance out of pocket, known as the individual marketplace, afford the insurance through tax credits based on income, combining the ideas behind Obamacare and the House bill. The House bill gave people tax credits based on age, severely impacting older Americans who would see premiums rise by more than 700 percent, according to analysis of the bill.

By basing tax credits on income, the Senate is aiming to ensure older Americans are not penalized. But unlike Obamacare, which gives a subsidy upfront, the Senate bill would provide a tax credit, to be received after the fact.

The details of the bill had been tightly held by Republican leaders as Senate Majority Leader Mitch McConnell wrote a bill that aims to appeal to his most conservative members and the most moderate in his 52-member conference. With no Democrats expected to support a repeal of the Affordable Care Act, McConnell can only afford to lose two votes for the measure to pass.

McConnell: "I'm pleased we were able to arrive at a draft that incorporates input from so many different members" https://t.co/2vAEAGC5gt

Republican senators filed into a room in the U.S. Capitol Thursday morning, sat in chairs lined up in rows to listen to a presentation of a "discussion draft" of the legislation that could be voted on as early as next week.

Drafts of the bill circulated among Washington lobbyists in the days leading up to its reveal even as Republican Senators remained unaware of its contents.

According to Senate rules, the Senate can vote on this bill only after it is scored by the non-partisan Congressional Budget Office. Senators expect that analysis to be done as early as Friday or perhaps Monday.

The CBO analysis of the House bill says that 23 million people would lose insurance in the next decade under their bill, which President Donald Trump called "mean" in a meeting with senators earlier this month.