Read other letters about this article
Part of a standard medical history is to ask if the patient is sexually active, and if so, with men or women or both -- because, of course, this information is relevant to various health risks. So even if your GP doesn't ask point blank if you're gay or straight, s/he will generally know.
None of which excuses the nurse's behavior, which if nothing else was incredibly unprofessional.