We use 'the' with body organs: 'There is a hole in THE heart'. Should we still use 'the' when we define the organ as in 'He complained of a sore throat' or 'He complained of an upset stomach'? Is it 'a sore throat/an upset stomach' or 'the sore throat/the upset stomach'?
Typically, on first mention, the indefinite article is used:
- He complained of [having] a sore throat.
- She has a grazed knee.
- Aloysius has a weak heart.
Exceptions occur with post-specification:
- Chase said that Jay hadn't complained of the sore neck typical of meningitis, but ...
and also with generic usages:
- The toe bone's connected to the foot bone, The foot bone's connected to the ankle bone, ....
- ... law enforcement officer gives you the 'pen test' they are looking for an involuntary jerking of the eyes
and when Poirot is cheekily importing French grammar into English.
Of course, if the part has already been mentioned, the definite article is required:
- How you can ease headaches yourself:
... ... ...
do not sleep more than you usually would – it can make the headache worse
- Wilson Yambo connected on so many good long‐range shots to the head last night that he outdid himself, injured his right hand and lost the battle billed as the bantamweight championship of Puerto Rico to Davey Vasquez of the Bronx.... According to his cornerman, Luis Camacho, Yambo first complained of the sore hand after the fifth round ....
[Al Harvin; The New York Times] [Bolding mine to show prior reference.]
Note also the fixed-phrase usage in the post-modifying 'to the head' in the extract above. This is arguably also a generic usage. Such phrases are common. '[A pain] in the neck.' '[A smack] on the behind.' This is also the case with prepositional phrases acting as adverbials: '[Kicked] in the stomach.' '[Tapped] on the shoulder.' '[Cut] to the quick.'
Here is the relevant discussion from Collins COBUILD English Guides: Articles, pp. 50–51:
6.13 Parts of the body
Names of parts of the body, like 'hand', 'face', and 'knee', are usually count nouns used with the indefinite or definite article according to the standard rules of use (see Chapters 3 and 4). We have also seen a special use of the definite article to refer generically to body parts (section 5.3 [the relevant part of that section is reproduced below]).
There is also a use where we are thinking of parts of the body not as separate organs or limbs but as locations on the body. For this you can use the definite article.
They might dash out later and stab them in the back.
She had the urge to beat him over the head.
It is possible to use the definite article with a singular noun even when there are two possible parts.
Stein took Breslow by the arm.
… to shake him by the hand.
It bit her on the leg.
He was wounded in the leg too.
Here there is no suggestion that Breslow has only one arm (mentioned before) or that 'he' has only one leg; the part of the body is all that is important, not which side.
You use the definite article like this when the noun referring to the body part is included in a prepositional phrase ('in the back', 'by the arm') after a verb of touching or injuring ('shake', 'bite'), and the person whose body you are referring to has just been mentioned ('them', 'Breslow').
When the noun comes straight after a verb such as 'grab' or after a verb and a preposition, for example 'step on', you have to use a possessive determiner like 'their' or 'his'; for example, you have to say 'I stepped on his foot' not 'I stepped on the foot'. Sometimes there are alternatives: 'I shook him by the hand' or 'I shook his hand'.
The black-haired youth grabbed her arm and shook her.
Robert touched her cheek.
You can also use the definite article when referring to a touch, blow, or pain.
… giving me a friendly pat on the shoulder.
I have a pain in the side.
For completeness, here is the relevant part of section 5.3, which was mentioned above:
5.3 Singular count nouns with the definite article
[The definite article] is also commonly used when doctors or other people are generalizing professionally about parts of the body.
This may flatten that side of the head. It won't hurt the brain.
This chapter deals with the lower part of the leg.
(Adding to Edwin's answer)
There is typically no article before medical conditions that consist of a body part preceded by the occupation/activity in which the condition is common, for example:
You have tennis elbow / athlete's foot / swimmer's ear / runner's knee / skier's thumb / jogger's heel / jogger's foot / jumper's knee / miner's lung.