This is an excellent article medium.com/@anneharperwright/sex-gender-the-nhs-bb86b0c3ebb from the same person who wrote about "gender identity" taking over from single sex hospital wards.
SUMMARY: the NHS were careful to develop a system for recording both bio sex and gender ID, and not get them confused (because: major health risks), but it looks like they've gone and ignored their careful planning and confused them anyway. The author investigates by asking for her own records to find she is recorded as current gender: female, sex: (none)
Maybe we should all do this to map which NHS trusts are confused