I've worked with many children and adults who've been told to seek mental health treatment by medical professionals, because their physical complaints were not real.
These patients were told things like, "It's all in your head," "There's nothing medically wrong," or"You're fine and have to learn how to deal with the pain."
In my 30 plus years of practice, all of these traumatized patients - the majority of them females - did, indeed, have real medical issues. They were not seeking attention, hypochondriacs or experiencing conversion disorder or a somatic disorder. They were dealing with rare illnesses that weren't considered plausible in the medical community.
It was not all in their head.