Generalities -
In the Navy world, I have often heard it said that below the rank of O6 the favored title is doctor, no matter the situation.
In clinical situations, it's always correct to use doctor. That may be where direct patient care is involved, or in a meeting to discuss patients (tumor boards, dept meetings to purchase equipment, etc).
In administrative situations where the topic being discussed touches on medicine, and your presence there hinges upon you being a doctor, it's correct to use doctor.
In administrative or other situations where the topic is completely military, it's correct to use rank. These are few and far between - think of things like twice-yearly uniform inspections, physical fitness tests, pre-deployment weapons training, disciplinary proceedings for your subordinates, promotion boards.
You'll find that the sort of people who favor using rank over professional qualifications are doing so in an effort to compensate for lesser professional qualifications. The Nurse Corps is notorious for this - by far the worst offenders.
This is actually a pretty simple topic. Or it would be, if not for the obfuscation favored by non-physicians in variably successful attempts to put us in the place they think we belong.
The flip side to all of this is doctors who emphasize their rank because they're trying to overpower resistance or simply want special treatment at the commissary or px. This is often just obnoxious assertion of privilege ... distasteful. Don't do this.
I don't think this drifts too much from this thread's purpose. What happens when a physician of lower rank has a clinical disagreement with a midlevel of higher rank? I would assume that the doc's opinion carries more weight? At least I hope so.
There are two scenarios here that are somewhat different -
One, the interaction with the midlevel is directly clinical in which the midlevel works for/with the physician and the physician is directing the care of a patient. In this case, the midlevel has exactly as much autonomy as the physician permits. End of story.
Two, the midlevel might have a position of authority above the physician in the chain of command. Possibly a division head, department head, director, hospital commanding officer. In these cases, the midlevel has no authority over the clinical care delivered by the physician, although it may get fuzzy sometimes as their administrative decisions (e.g. equipment purchases) may impact what the physician does and how it gets done. This can be a little difficult to navigate but in my experience it was never a really significant issue.
Anyway - if ever a midlevel attempts to guide, dictate, or otherwise derail the care physicians feel is appropriate, the physicians should dig in their heels, and take the issue as far up the chain of command as necessary. Usually a little passive aggressiveness goes a long way - simply politely refusing to go along with the midlevel is mostly enough. In the end, the military can't order you to commit malpractice, no matter how they dress it up, and as the one with the medical license, you are the expert and you have the final say. In the worst case, you may not be able to do what you want for the patient because of systemic obstacles, but you can
always do
nothing and refer the patient outside the military healthcare system. "Do No Harm" isn't just a phrase for T-shirts.