The Senate on Wednesday confirmed Eric Hargan to be deputy secretary of Health and Human Services, making him the second-in-command at the agency shortly after Tom Price resigned from the top spot as secretary.

The Senate approved Hargan in a 57-38 vote.

Price resigned from his post Friday afternoon after reports revealed that he took almost $1 million worth of flights on military and charter jets this year. Don Wright of Virginia is serving as acting secretary for HHS.

The Senate confirmation puts Hargan near the top of a large agency that includes overseeing Obamacare, drug development, public health efforts, and food safety. President Trump nominated Hargan in March.

Hargan worked at HHS from 2003 to 2007 under former President George W. Bush and was part of Trump's transition team. Before his confirmation, he was a lawyer at the Chicago-based firm Greenberg Traurig, focusing on health law. In 2014, he worked on Illinois Gov. Bruce Rauner's healthcare transition team.

During his confirmation hearing in the Senate Finance Committee, Hargan said he could not imagine turning down Trump's offer to fill the post.

"The challenges are so great, whether in public health, in healthcare finance, in facilitating innovation in healthcare and in the administration of human services, that I cannot imagine not wanting to participate, and to lend to the government both my past experience at HHS, as well as the fruit of my years of work in the healthcare sector since then, to help as much as I can," he said.

Hargan would not say during his confirmation hearing whether he would keep parts of Obamacare.

"That's a subject of a lot of dispute here on Capitol Hill," he said during the hearing.