In season one episode 14 of TNG, a large portion of the crew became infected by an airborne virus. As someone who was in close proximity with infected crew members, how did Dr. Crusher manage to not get infected?
Around 30 minutes in:
Crusher: "Are you wearing cologne? Like something I smelled earlier, something.. Klingon."
Picard: "Lieutenant Worf and I detected the same scent when we bumped into your son ... at the holodeck."
Crusher: "It's that smell... That's how the virus travels! An airborne particle, who's sweet scent inspires deep inhalation... And once inside the body, becomes that damn virus! I have work to do."
After that, Crusher only makes one more appearance onscreen before she notifies Data that she has the cure, during which she brushes back her hair in the same way I do when I'm feeling hot and need to cool off a little. This strongly makes me think that Picard infected her when she figured out the smell, and was showing the first symptoms in that scene.
It was likely just coincidence that she usually wasn't around when her patients became infectious - remember, Crusher was usually the one running around the ship and getting other crew members (like Picard) to actually go to their quarters or to sick bay.
We also saw with most of the crew, that it took a while after they started showing symptoms before they were incapacitated, so Crusher probably cured herself first, which could explain why (at least to me) she looks a little tired, but not sick, in the scene where she's telling Data she figured it out.
Your confusion stems from the fact that a scene was removed from the original screenplay before filming. Just after Mistress Beata sentences Ramsay to death we were supposed to cut to Dr Crusher on the Bridge checking up on Geordi. The stage direction indicates that she's sickening as well.
57 INT. MAIN BRIDGE
Beverly, medical tricorder in hand, is examining Geordi. He looks terrible, feels worse. Otherwise, the bridge is empty.
BEVERLY: You're out of commission, Geordi. Report to your quarters.
GEORDI: (in horrible pain) Can't leave my post... until I'm relieved.
BEVERLY: I've been aboard the Enterprise long enough to know she's designed to run herself.
GEORDI: But the innoculant --
BEVERLY: I can do my research on the computers here.
GEORDI: Then I can convalesce here.
Geordi holds his position, sick as he is. Beverly resigns herself to taking the seat adjacent. She's not at all pleased with what's happening. What's worse is -- she's beginning to feel ill herself.
As to when she was initially infected, it (presumably) occurred when she first quarantined the students
CRUSHER: Wesley and one of his friends have contracted some form of respiratory ailment.
PICARD: A respiratory aliment? Is it contained?
CRUSHER: I hope so. I've isolated the twelve students who were on the Quazulu Eight field trip.
Note that she says that she's already smelled the 'floral scent' when she meets Picard later.
PICARD: (coughs, groans) Same... you gave me last birthday.
BEVERLY: Uh-uh, different. Like something I smelled earlier. Something... I don't know... like a flower I remember. Something Klingon, I think.
PICARD: Lieutenant Worf and I... detected a similar scent when we bumped into... your son at the Holodeck.
BEVERLY: (lightbulb!) It's that smell! That must be how the virus travels!