Then maybe your label on the patient's chart should have been clearer.
Another way to phrase that without the Mr./Mrs./Ms./Miss part would be to walk in the room and say the patient's name in a neutral tone like you were checking the waiting area for a patient, "Bill Jones?" (pause) Bill Jones: "Yes, hi." Dr.: "My name is Dr. Smith, what brings you here today?"
IMO, guessing at someone's gender can be awkward or even insulting - the alternative is to give a gender free greeting. It's always possible to just say a person's name in a professional tone without Mr./Mrs./Ms./Miss. Using the whole name is more accurate
too in case there's several "Mr. Jones'" (and a Ms. Jones that gets called Mr. Jones) and you have the wrong one.
Addressing people by the wrong gender repeatedly is likely to make someone mad even if they don't correct you. Some people get tired of correcting others about their gender because what comes next (for some people) are comments like, "Wow, you sure look like a guy/girl because (unwelcome analysis here)." A multitude of endocrine disorders, intersex conditions, cultural factors, and gender factors can impact appearance.
Since this is a pre-med discussion, I might mention that wrong assumptions about gender can also lead to wrong assumptions about age, fitness, sanity, etc. For example, I know someone who has a gender ambiguous appearance due to an endocrine disorder. In this
particular case (not in every case), when people think he's female, they assume he's 50 years old or more. When they assume he's male, they think he's in his 20's. It's a perspective thing that strongly impacts how different age and gender groups treat this person, how his behavior is interpreted (odd versus fine, etc.). Imagine someone who you assume is 50 talking about going to medical school in 5 years.
For these reasons, I also believe that it is important that doctors are trained to ask about an individual's gender and sex in appropriate ways. If relevant to treatment, a doctor might as specifically about what parts a person has, if they are taking any hormones, if they have a history of endocrine disorders, and what pronoun a patient prefers. Insurance does NOT always accurately indicate someone's gender identity or physical sex as many of you probably already know!