Ibelieve the "do no harm" part of the oath means "do no harm to patients under my care."
But if I'm practicing combat medicine on the battlefield, everybody
is a "patient under my care", especially the enemy trooper whose arm I just blew off with my machine gun.
Starfleet medics are combatants, meaning they have to confront the above situation often enough. The idea of separating victims into those I care for and those I don't doesn't work very well, then. Crusher would be facing a battlefield often enough, also (and especially) inside her own sickbay; much of the time, she'd be tasked with wielding a weapon there.
This makes it a bit pretentious of her to do no harm during working hours or with specific patients or whatever the specifics. A good reason to drop the pretense, then, and to accept that occasionally it is the medic's duty to do harm, just like it on occasion is the Chief Engineer's duty to see to it that machinery gets damaged or destroyed.