I agree that it is disrespectful and I would be furious if it was done to me - well, actually it has, and to everyone else who has an NHS Number, because the NHS records "Gender" not "Sex".
I have also already explained that when the NHS switched from "sex" to "gender" in 2007 that I refused to ask patients every time I saw them, which might be once a week, if they had "changed sex" since I last saw them.
I was responding to previous posts that focussed on the need to avoid causing distress and confusion to patients with dementia in the context of the OP, who does not want to risk losing her job:
"Please can I have some advice on this, I have been told by my boss that i have to ask our elderly patients for their gender identity when they come to see us. Without giving too much away I don't work in the UK so I am not NHS. My boss also does not agree with this but she says we need to do it as the regulators require it as part of our standards. Bearing in mind that we are a medical department I feel that this is highly unscientific. Also given the demographic of our patients it is inappropriate. I don't know if I should bother fighting this, or if it is just something I let go and accept. If I fight it I would like some help to articulate myself properly and in a way that is legal so I can't loose my job."
There are a multitude of ethical, clinical, scientific, political, regulatory, human rights and employment issues raised by the OP.
She is looking for practical suggestions and I have suggested others in previous posts.
In this instance, where patients with dementia are concerned, she needs to find a workaround to avoid causing them unnecessary distress and/or confusion while at the same time considering how best to challenge her employer.
She has already made the first step by asking for clarification about whether "gender identity" is replacing "sex" in the patient record or if it has been introduced as an additional field.
If the employer is replacing "sex" with "gender identity" then there are serious patient safety issues - exactly the same issues as there are in the NHS and have been since 2007.
If her employer, like the NHS, has a policy of placing patients on single-gender wards then it needs to ask about "gender identity" in order to operate that policy.
Whether or not one agrees with such a policy is a different issue.
To reiterate: the NHS has not had any single-sex wards since 2007 because it does not record a patient's sex - it records gender identity. Wards are coded as "Sex M or F", that is the only code for "sex" used by the NHS and the only reason it is there to mislead the public that there is such as thing as an NHS "single sex ward".
If you are an NHS patient then this is not a theoretical discussion: you have already been assigned a "gender identity" without your knowledge or consent and nowhere does the NHS record your sex.
Heath providers do need to know what medication patients are on, what surgical procedures they have had, any diagnosed mental health problems, and numerous other issues, eg. allergic reaction to latex, elasticated bandages or sticking plasters.
Recording "gender identity" (with a "None" option) as well as "sex" would be sensible only in as much as it flags up that the patient has a belief in "gender identity", and triggering further questions about medication, surgery, etc.
However, I am sure that there are better ways of doing this.
For example, someone who has medically "detransitioned" might report that they do not have a "gender identity" but it would still be appropriate and medically necessary for patient safety reasons to know about previous and current medication, surgeries, etc.
To return to the OP . . . The situation is complicated by the fact that her employer is, allegedly, requiring staff to request and record information on "gender identity" in order to meet "standards set by the regulator".
This suggests that there will be penalties, reputational and/or financial, if the employer does not comply. Her employer is therefore likely to want to force staff to comply. It might remind them that they will be in breach of contract if they refuse to follow its policies and procedures as part of their terms and conditions of service as employees.
If she were in the UK and failed to comply with "the reasonably instructions of her manager" in these circumstances then it is likely that Disciplinary Proceedings would be invoked and she could find herself out of a job.
The instructions would be "reasonable" because the employee is acting as an "agent" of the employer and the employer is bound by the standards set by the regulator.
I am not a lawyer - but I was a union rep throughout my working life. On an "if it was me . . ." basis, I think the OP is going about things in exactly the right way: gathering information to establish facts; finding workarounds in the meantime to avoid distressing her patients; sounding out the views of colleagues and managers.
However, the problem is unlikely to be solved unless and until the regulator changes the standards it has set.