Updated

A House panel last week advanced a bill that would for the first time require federal health officials to ask patients about their sexual orientation and gender identity.

The proposal introduced by Rep. Tammy Baldwin, D-Wis., the first openly gay woman elected to Congress, cleared a House Energy and Commerce subcommittee on a party-line vote Thursday. Republican attempts to block or restrict the measure failed.

Though critics say the move represents an invasion of privacy, the legislation was cast as a way to help federal officials gather data so they can track "health disparities" based on those sexual identity factors.

"This bill is about collecting data. No more, no less," Baldwin said at the hearing last week. She said federal programs generally do not collect this data, and that "as a result we are left with gaping holes in our knowledge on LGBT health."

Under the proposal, programs and surveys administered through the Department of Health and Human Services would be required to ask people about their sexual orientation and gender identity, though the response would be voluntary.

Baldwin stressed that providing the information would "never" be a condition for receiving care.

But Republicans expressed concern that the policy would cover school-based health centers, meaning kids could be asked about which sex they identify with and are attracted to.

"If you're a young person, you may not even know what the questions refer to," said Rep. Joe Barton, R-Texas, among the 10 Republicans who voted against the bill. "And for the life of me I cannot see ... why this is something that the federal government should get itself involved with."

Barton suggested the policy would be a drain on resources and tried to neutralize -- or at least postpone -- the measure by introducing an amendment that would restrict the secretary from implementing the policy "until such date that the secretary certifies that the national deficit is $0."

The amendment failed. The bill goes next to the full committee for consideration.