I'm taking Mary to the doctor today. I feel fairly confident that her frequent vomiting is due to migraines. I used my own experience and my internet research to validate my diagnosis. Maybe I should pay myself the $20 it'll cost me to talk to Dr. Levin today.
The two most prevalent types of migraine are migraine with aura (formerly referred to as classic migraine) and migraine without aura (formerly referred to as common migraine).
As a child and young adult I suffered from the "common" kind. It seems that Mary has "classic" migraines, which means that she has visual disturbances preceding the headache; she reports almost blacking out, sometimes "whiting" out, sometimes having blind spots, and sometimes seeing wavy lines. These happen about 30 minutes prior to the onset of pain. For her they also always include vomiting, which is why she's been sent home by the school nurse several days this school year already.
I will let you know how it goes. I'd assume he'll send her to a neurologist . . . but we'll see.