Legally, I think the question would be whether he has a Gender Recognition Certificate. It's not entirely clear what this means until after the High Court Case on sex definitions in law, but the hospital would have grounds for claiming that they were acting within the law.
As it stands, it seems that he can't have had a GRC at the time of the incident, because he hadn't been 'living as' a woman for 2 years.
Whatever guidance NHS Fife were following, it doesn't appear to be UK law. However that isn't surprising given that so many organisations, particularly unions (who exist to support people like SP) are providing guidance that isn't UK law.
I'm interested to know how/if this will come up in the case - Are NHS Fife negligent?