I've heard this one around, but never from a solid source. The idea is that if you see a bunch of guys out on the battlefield, you should try not to shoot the medic out of some sense of decency or respect. Likewise, you should never bomb a field hospital.
Yes, this is the case. It's not the only thing that was common in many recent wars, though. As Walzer notes in Just and Unjust Wars, soldiers have often hesitated in situations that weren't just medics. While the Geneva Convention mentioned goes into detail about how medics are to be respected, soldiers have hesitated (at least, as he notes, during some wars) to shoot enemies who are in strange circumstances as well. He notes five different examples. The first, found in a letter from poet from Wilfred Owen to his brother in 1917, details how his group stumbled upon a solitary German "...haring along toward us, with his head down and his arms stretched in front of him, as if he were going to take a high dive through the earth...Nobody offered to shoot him, he looked too funny..."
The second is found in Robert Graves' autobiography, where he detailed how he "...disliked the idea of shooting a naked man", handed off his rifle, and let someone else kill him.
The third is found in George Orwell recounting the Spanish Civil War and his work as a sniper in the forward position in the republican lines. He says he did not shoot "...partly because of that detail about the trousers", where he said the man was "...half-dressed and holding up his trousers with both hands as he ran".
The fourth is by Raleigh Trevelyan, a British soldier in WWII, who said in a published "Diary of Anzio" that he saw "An individual, dressed in German uniform, was wandering like a sleep-walker across our line of fire. It was clear that for the moment he had forgotten war and--as we had been doing--was reveling in the promise of warmth and spring". They chose to scare him away rather than kill him.
The fifth example is an account by Emilio Lussu, who fought the Austrians (he was an Italian) in WWI. He watched the Austrians having morning coffee from a position overlooking their trenches, and said he had a lot of trouble shooting at a man who had been smoking a cigarette, and eventually gave up trying to. As he put it, "To fight is one thing, but to kill a man is another. And to kill him like that is to murder him", referring to the helplessness of the man.
In this sense, the Geneva Convention makes perfect sense, as does the refrain from shooting medics purposely. Soldiers hesitate, in many cases, to alienate all humanity and fire on the helpless and the unprepared. A medic, in that capacity constantly, is a target of war that would be harder to kill. It is one thing to say "Don't move, I'm going to shoot you" to only one man, and another entirely to fight against a hundred, or a thousand, where you were detached from the person-to-person bond. In the more recent wars, it was definitely something that was commonly refrained from in many cases, though I wouldn't know how to hazard a guess at what percentage of cases that was.
Source:
Walzer, Michael. Just and Unjust Wars: A Moral Argument with Historical Illustrations. New York: Basic, 1977. Print.
The 1864 Geneva Convention - the very first one - clearly states: ""Members of the armed forces specially trained for employment, should the need arise, as hospital orderlies, nurses or auxiliary stretcher-bearers, in the search for or the collection, transport or treatment of the wounded and sick shall likewise be respected and protected if they are carrying out these duties at the time when they come into contact with the enemy or fall into his hands."
[Full Text] (http://www.icrc.org/ihl/INTRO/120?OpenDocument)