Health professionals in England are to be told to ask patients aged 16 or over about their sexual orientation, under new NHS guidelines.
NHS England said no-one would be forced to answer the question but recording the data would ensure that "no patient is discriminated against".
The guidance applies to doctors and nurses, as well as local councils responsible for adult social care.
A spokeswoman said: "It will have no impact on the care [people] receive."
She added: "All health bodies and local authorities with responsibility for adult social care are required under the Equality Act to ensure that no patient is discriminated against."
She said the information would help NHS bodies comply with equality legislation by "consistently collecting, only where relevant, personal details of patients such as race, sex and sexual orientation."
'Intrusive and offensive'
NHS England recommends health professionals - such as GPs and nurses - ask about a person's sexual orientation at "every face to face contact with the patient, where no record of this data already exists".
But the Family Doctor Association said it was "potentially intrusive and offensive" for GPs to monitor people's sexuality.
Chairman Dr Peter Swinyard told the BBC that for older patients in particular, sexuality "doesn't affect health outcomes or care".
He said that GPs tend to know patients' sexuality, or would ask, if it was relevant to their medical condition.
For example, patients at a sexual health clinic are likely to be asked, but not those attending a wart clinic.
He added: "Given the precious short amount of time a GP has with a patient, sexuality is not relevant."
He said there were "relatively few medical conditions" that it affected.
NHS England said the data was already being collected in many areas but that the new guidance makes it standard, and that it expects sexual orientation monitoring to be in place across England by April 2019.
Under the guidance, health professionals are to ask patients: "Which of the following options best describes how you think of yourself?".
The options include heterosexual or straight, gay or lesbian, bisexual, other sexual orientation, not sure, not stated and not known.
NHS England said lesbian, gay and bisexual (LGB) people were "disproportionately affected" by health inequalities such as poor mental health and a higher risk of self-harm and suicide.
It said public bodies had a legal obligation to pay regard to the needs of LGB people under the Equality Act 2010.
"Collecting and analysing data on sexual orientation allows public sector bodies to better understand, respond to and improve LGB patients' service access," the guidance states.
'Hugely important step'
Paul Martin, chief executive of Manchester's LGBT Foundation, which worked with NHS England and others to develop sexual orientation monitoring, said he was "so proud" of the new standard.
He said earlier this week: "If we're not counted, we don't count."
The launch of sexual orientation monitoring was a "hugely important step in the right direction" towards addressing LGB inequality in health and social care, he said.
However, the foundation's good practice guide for healthcare professionals concedes that "some people will feel uncomfortable asking or being asked" about their sexuality.
It warns: "It would not be appropriate to ask someone's sexual orientation out loud in a busy reception area."
If a patient does not want to disclose their sexuality, "not stated" would be recorded as their response.
The guidance also says patients who are not able to declare their sexual orientation, for example if they require specialist mental capacity care, would be recorded as "not known".
Former Conservative education secretary Nicky Morgan said that "what looks good on paper... actually when translated into real life becomes very intrusive".
She told ITV's Peston on Sunday: "Could it be appropriate in some circumstances about some conditions or problems that people come to see their doctors about?
"But clearly (for) the majority you wonder why on earth they need to know."