You are a helpful, respectful, and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
What is Headache and explain in detail?
Headache is the symptom of pain in the face, head, or neck. It can occur as a migraine, tension-type headache, or cluster headache. There is an increased risk of depression in those with severe headaches.Headaches can occur as a result of many conditions. There are a number of different classification systems for headaches. The most well-recognized is that of the International Headache Society, which classifies it into more than 150 types of primary and secondary headaches. Causes of headaches may include dehydration; fatigue; sleep deprivation; stress; the effects of medications (overuse) and recreational drugs, including withdrawal; viral infections; loud noises; head injury; rapid ingestion of a very cold food or beverage; and dental or sinus issues (such as sinusitis).Treatment of a headache depends on the underlying cause, but commonly involves pain medication (especially in case of migraine or cluster headache). A headache is one of the most commonly experienced of all physical discomforts.About half of adults have a headache in a given year. Tension headaches are the most common, affecting about 1.6 billion people (21.8% of the population) followed by migraine headaches which affect about 848 million (11.7%).

Causes
There are more than 200 types of headaches. Some are harmless and some are life-threatening. The description of the headache and findings on neurological examination, determine whether additional tests are needed and what treatment is best.Headaches are broadly classified as "primary" or "secondary". Primary headaches are benign, recurrent headaches not caused by underlying disease or structural problems. For example, migraine is a type of primary headache. While primary headaches may cause significant daily pain and disability, they are not dangerous from a physiological point of view. Secondary headaches are caused by an underlying disease, like an infection, head injury, vascular disorders, brain bleed, stomach irritation, or tumors. Secondary headaches can be dangerous. Certain "red flags" or warning signs indicate a secondary headache may be dangerous.

Primary
Ninety percent of all headaches are primary headaches. Primary headaches usually first start when people are between 20 and 40 years old. The most common types of primary headaches are migraines and tension-type headaches. They have different characteristics. Migraines typically present with pulsing head pain, nausea, photophobia (sensitivity to light) and phonophobia (sensitivity to sound). Tension-type headaches usually present with non-pulsing "bandlike" pressure on both sides of the head, not accompanied by other symptoms. Such kind of headaches maybe further classified into-episodic and chronic tension type headaches Other very rare types of primary headaches include:
cluster headaches: short episodes (15–180 minutes) of severe pain, usually around one eye, with autonomic symptoms (tearing, red eye, nasal congestion) which occur at the same time every day. Cluster headaches can be treated with triptans and prevented with prednisone, ergotamine or lithium.
trigeminal neuralgia or occipital neuralgia: shooting face pain
hemicrania continua: continuous unilateral pain with episodes of severe pain. Hemicrania continua can be relieved by the medication indomethacin.
primary stabbing headache: recurrent episodes of stabbing "ice pick pain" or "jabs and jolts" for 1 second to several minutes without autonomic symptoms (tearing, red eye, nasal congestion). These headaches can be treated with indomethacin.
primary cough headache: starts suddenly and lasts for several minutes after coughing, sneezing or straining (anything that may increase pressure in the head). Serious causes (see secondary headaches red flag section) must be ruled out before a diagnosis of "benign" primary cough headache can be made.
primary exertional headache: throbbing, pulsatile pain which starts during or after exercising, lasting for 5 minutes to 24 hours. The mechanism behind these headaches is unclear, possibly due to straining causing veins in the head to dilate, causing pain. These headaches can be prevented by not exercising too strenuously and can be treated with medications such as indomethacin.
primary sex headache: dull, bilateral headache that starts during sexual activity and becomes much worse during orgasm. These headaches are thought to be due to lower pressure in the head during sex. It is important to realize that headaches that begin during orgasm may be due to a subarachnoid hemorrhage, so serious causes must be ruled out first. These headaches are treated by advising the person to stop sex if they develop a headache. Medications such as propranolol and diltiazem can also be helpful.
hypnic headache: a moderate-severe headache that starts a few hours after falling asleep and lasts 15–30 minutes. The headache may recur several times during the night. Hypnic headaches are usually in older women. They may be treated with lithium.

Secondary
Headaches may be caused by problems elsewhere in the head or neck. Some of these are not harmful, such as cervicogenic headache (pain arising from the neck muscles). The excessive use of painkillers can paradoxically cause worsening painkiller headaches.More serious causes of secondary headaches include the following:
meningitis: inflammation of the meninges which presents with fever and meningismus, or stiff neck
bleeding inside the brain (intracranial hemorrhage)
subarachnoid hemorrhage (acute, severe headache, stiff neck without fever)
ruptured aneurysm, arteriovenous malformation, intraparenchymal hemorrhage (headache only)
brain tumor: dull headache, worse with exertion and change in position, accompanied by nausea and vomiting. Often, the person will have nausea and vomiting for weeks before the headache starts.
temporal arteritis: inflammatory disease of arteries common in the elderly (average age 70) with fever, headache, weight loss, jaw claudication, tender vessels by the temples, polymyalgia rheumatica
acute closed-angle glaucoma (increased pressure in the eyeball): a headache that starts with eye pain, blurry vision, associated with nausea and vomiting. On physical exam, the person will have red eyes and a fixed, mid-dilated pupil.
Post-ictal headaches: Headaches that happen after a convulsion or other type of seizure, as part of the period after the seizure (the post-ictal state)Gastrointestinal disorders may cause headaches, including Helicobacter pylori infection, celiac disease, non-celiac gluten sensitivity, irritable bowel syndrome, inflammatory bowel disease, gastroparesis, and hepatobiliary disorders. The treatment of the gastrointestinal disorders may lead to a remission or improvement of headaches.Migraine headaches are also associated with Cyclic Vomiting Syndrome (CVS). CVS is characterized by episodes of severe vomiting, and often occur alongside symptoms similar to those of migraine headaches (photophobia, abdominal pain, etc.).

Pathophysiology
The brain itself is not sensitive to pain, because it lacks pain receptors. However, several areas of the head and neck do have pain receptors and can thus sense pain. These include the extracranial arteries, middle meningeal artery, large veins, venous sinuses, cranial and spinal nerves, head and neck muscles, the meninges, falx cerebri, parts of the brainstem, eyes, ears, teeth, and lining of the mouth. Pial arteries, rather than pial veins are responsible for pain production.Headaches often result from traction to or irritation of the meninges and blood vessels. The pain receptors may be stimulated by head trauma or tumors and cause headaches. Blood vessel spasms, dilated blood vessels, inflammation or infection of meninges and muscular tension can also stimulate pain receptors. Once stimulated, a nociceptor sends a message up the length of the nerve fiber to the nerve cells in the brain, signalling that a part of the body hurts.Primary headaches are more difficult to understand than secondary headaches. The exact mechanisms which cause migraines, tension headaches and cluster headaches are not known. There have been different hypotheses over time that attempt to explain what happens in the brain to cause these headaches.Migraines are currently thought to be caused by dysfunction of the nerves in the brain. Previously, migraines were thought to be caused by a primary problem with the blood vessels in the brain. This vascular theory, which was developed in the 20th century by Wolff, suggested that the aura in migraines is caused by constriction of intracranial vessels (vessels inside the brain), and the headache itself is caused by rebound dilation of extracranial vessels (vessels just outside the brain). Dilation of these extracranial blood vessels activates the pain receptors in the surrounding nerves, causing a headache. The vascular theory is no longer accepted.  Studies have shown migraine head pain is not accompanied by extracranial vasodilation, but rather only has some mild intracranial vasodilation.Currently, most specialists think migraines are due to a primary problem with the nerves in the brain. Auras are thought to be caused by a wave of increased activity of neurons in the cerebral cortex (a part of the brain) known as cortical spreading depression followed by a period of depressed activity. Some people think headaches are caused by the activation of sensory nerves which release peptides or serotonin, causing inflammation in arteries, dura and  meninges and also cause some vasodilation. Triptans, medications that treat migraines, block serotonin receptors and constrict blood vessels.People who are more susceptible to experiencing migraines without headache are those who have a family history of migraines, women, and women who are experiencing hormonal changes or are taking birth control pills or are prescribed hormone replacement therapy.Tension headaches are thought to be caused by activation of peripheral nerves in the head and neck muscles.Cluster headaches involve overactivation of the trigeminal nerve and hypothalamus in the brain, but the exact cause is unknown.

Diagnosis
Most headaches can be diagnosed by the clinical history alone. If the symptoms described by the person sound dangerous, further testing with neuroimaging or lumbar puncture may be necessary. Electroencephalography (EEG) is not useful for headache diagnosis.The first step to diagnosing a headache is to determine if the headache is old or new. A "new headache" can be a headache that has started recently, or a chronic headache that has changed character. For example, if a person has chronic weekly headaches with pressure on both sides of his head, and then develops a sudden severe throbbing headache on one side of his head, they have a new headache.

Red flags
It can be challenging to differentiate between low-risk, benign headaches and high-risk, dangerous headaches since symptoms are often similar. Headaches that are possibly dangerous require further lab tests and imaging to diagnose.The American College for Emergency Physicians published criteria for low-risk headaches. They are as follows:
age younger than 30 years
features typical of primary headache
history of similar headache
no abnormal findings on neurologic exam
no concerning change in normal headache pattern
no high-risk comorbid conditions (for example, HIV)
no new concerning history or physical examination findingsA number of characteristics make it more likely that the headache is due to potentially dangerous secondary causes which may be life-threatening or cause long-term damage. These "red flag" symptoms mean that a headache warrants further investigation with neuroimaging and lab tests.In general, people complaining of their "first" or "worst" headache warrant imaging and further workup. People with progressively worsening headache also warrant imaging, as they may have a mass or a bleed that is gradually growing, pressing on surrounding structures and causing worsening pain. People with neurological findings on exam, such as weakness, also need further workup.The American Headache Society recommends using "SSNOOP", a mnemonic to remember the red flags for identifying a secondary headache:
Systemic symptoms (fever or weight loss)
Systemic disease (HIV infection, malignancy)
Neurologic symptoms or signs
Onset sudden (thunderclap headache)
Onset after age 40 years
Previous headache history (first, worst, or different headache)Other red flag symptoms include:

Old headaches
Old headaches are usually primary headaches and are not dangerous. They are most often caused by migraines or tension headaches. Migraines are often unilateral, pulsing headaches accompanied by nausea or vomiting. There may be an aura (visual symptoms, numbness or tingling) 30–60 minutes before the headache, warning the person of a headache. Migraines may also not have auras. Tension-type headaches usually have bilateral "bandlike" pressure on both sides of the head usually without nausea or vomiting. However, some symptoms from both headache groups may overlap. It is important to distinguish between the two because the treatments are different.
The mnemonic POUND helps distinguish between migraines and tension-type headaches. POUND stands for: 
One review article found that if 4–5 of the POUND characteristics are present, a migraine is 24 times as likely a diagnosis than a tension-type headache (likelihood ratio 24). If 3 characteristics of POUND are present, migraine is 3 times more likely a diagnosis than tension type headache (likelihood ratio 3). If only 2 POUND characteristics are present, tension-type headaches are 60% more likely (likelihood ratio 0.41). Another study found the following factors independently each increase the chance of migraine over tension-type headache: nausea, photophobia, phonophobia, exacerbation by physical activity, unilateral, throbbing quality, chocolate as a headache trigger, and cheese as a headache trigger.Cluster headaches are relatively rare (1 in 1000 people) and are more common in men than women. They present with sudden onset explosive pain around one eye and are accompanied by autonomic symptoms (tearing, runny nose and red eye).Temporomandibular jaw pain (chronic pain in the jaw joint), and cervicogenic headache (headache caused by pain in muscles of the neck) are also possible diagnoses.For chronic, unexplained headaches, keeping a headache diary can be useful for tracking symptoms and identifying triggers, such as association with menstrual cycle, exercise and food. While mobile electronic diaries for smartphones are becoming increasingly common, a recent review found most are developed with a lack of evidence base and scientific expertise.

New headaches
New headaches are more likely to be dangerous secondary headaches. They can, however, simply be the first presentation of a chronic headache syndrome, like migraine or tension-type headaches.One recommended diagnostic approach is as follows. If any urgent red flags are present such as visual loss, new seizures, new weakness, new confusion, further workup with imaging and possibly a lumbar puncture should be done (see red flags section for more details). If the headache is sudden onset (thunderclap headache), a computed tomography test to look for a brain bleed (subarachnoid hemorrhage) should be done. If the CT scan does not show a bleed, a lumbar puncture should be done to look for blood in the CSF, as the CT scan can be falsely negative and subarachnoid hemorrhages can be fatal. If there are signs of infection such as fever, rash, or stiff neck, a lumbar puncture to look for meningitis should be considered. If there is jaw claudication and scalp tenderness in an older person, a temporal artery biopsy to look for temporal arteritis should be performed and immediate treatment should be started.

Neuroimaging
Old headaches
The US Headache Consortium has guidelines for neuroimaging of non-acute headaches. Most old, chronic headaches do not require neuroimaging. If a person has the characteristic symptoms of a migraine, neuroimaging is not needed as it is very unlikely the person has an intracranial abnormality. If the person has neurological findings, such as weakness, on exam, neuroimaging may be considered.

New headaches
All people who present with red flags indicating a dangerous secondary headache should receive neuroimaging. The best form of neuroimaging for these headaches is controversial. Non-contrast computerized tomography (CT) scan is usually the first step in head imaging as it is readily available in Emergency Departments and hospitals and is cheaper than MRI. Non-contrast CT is best for identifying an acute head bleed. Magnetic Resonance Imaging (MRI) is best for brain tumors and problems in the posterior fossa, or back of the brain. MRI is more sensitive for identifying intracranial problems, however it can pick up brain abnormalities that are not relevant to the persons headaches.The American College of Radiology recommends the following imaging tests for different specific situations:

Lumbar puncture
A lumbar puncture is a procedure in which cerebral spinal fluid is removed from the spine with a needle. A lumbar puncture is necessary to look for infection or blood in the spinal fluid. A lumbar puncture can also evaluate the pressure in the spinal column, which can be useful for people with idiopathic intracranial hypertension (usually young, obese women who have increased intracranial pressure), or other causes of increased intracranial pressure. In most cases, a CT scan should be done first.

Classification
Headaches are most thoroughly classified by the International Headache Societys International Classification of Headache Disorders (ICHD), which published the second edition in 2004. The third edition of the International Headache Classification was published in 2013 in a beta version ahead of the final version. This classification is accepted by the WHO.Other classification systems exist.  One of the first published attempts was in 1951. The US National Institutes of Health developed a classification system in 1962.

ICHD-2
The International Classification of Headache Disorders (ICHD) is an in-depth hierarchical classification of headaches published by the International Headache Society. It contains explicit (operational) diagnostic criteria for headache disorders. The first version of the classification, ICHD-1, was published in 1988. The current revision, ICHD-2, was published in 2004. The classification uses numeric codes. The top, one-digit diagnostic level includes 14 headache groups. The first four of these are classified as primary headaches, groups 5-12 as secondary headaches, cranial neuralgia, central and primary facial pain and other headaches for the last two groups.The ICHD-2 classification defines migraines, tension-types headaches, cluster headache and other trigeminal autonomic headache as the main types of primary headaches. Also, according to the same classification, stabbing headaches and headaches due to cough, exertion and sexual activity (sexual headache) are classified as primary headaches. The daily-persistent headaches along with the hypnic headache and thunderclap headaches are considered primary headaches as well.Secondary headaches are classified based on their cause and not on their symptoms. According to the ICHD-2 classification, the main types of secondary headaches include those that are due to head or neck trauma such as whiplash injury, intracranial hematoma, post craniotomy or other head or neck injury. Headaches caused by cranial or cervical vascular disorders such as ischemic stroke and transient ischemic attack, non-traumatic intracranial hemorrhage, vascular malformations or arteritis are also defined as secondary headaches. This type of headache may also be caused by cerebral venous thrombosis or different intracranial vascular disorders. Other secondary headaches are those due to intracranial disorders that are not vascular such as low or high pressure of the cerebrospinal fluid pressure, non-infectious inflammatory disease, intracranial neoplasm, epileptic seizure or other types of disorders or diseases that are intracranial but that are not associated with the vasculature of the central nervous system.ICHD-2 classifies headaches that are caused by the ingestion of a certain substance or by its withdrawal as secondary headaches as well. This type of headache may result from the overuse of some medications or exposure to some substances. HIV/AIDS, intracranial infections and systemic infections may also cause secondary headaches. The ICHD-2 system of classification includes the headaches associated with homeostasis disorders in the category of secondary headaches. This means that headaches caused by dialysis, high blood pressure, hypothyroidism, cephalalgia and even fasting are considered secondary headaches. Secondary headaches, according to the same classification system, can also be due to the injury of any of the facial structures including teeth, jaws, or temporomandibular joint. Headaches caused by psychiatric disorders such as somatization or psychotic disorders are also classified as secondary headaches.The ICHD-2 classification puts cranial neuralgias and other types of neuralgia in a different category. According to this system, there are 19 types of neuralgias and headaches due to different central causes of facial pain. Moreover, the ICHD-2 includes a category that contains all the headaches that cannot be classified.Although the ICHD-2 is the most complete headache classification there is and it includes frequency in the diagnostic criteria of some types of headaches (primarily primary headaches), it does not specifically code frequency or severity which are left at the discretion of the examiner.

NIH
The NIH classification consists of brief definitions of a limited number of headaches.The NIH system of classification is more succinct and only describes five categories of headaches. In this case, primary headaches are those that do not show organic or structural causes. According to this classification, primary headaches can only be vascular, myogenic, cervicogenic, traction, and inflammatory.

Management
Primary headache syndromes have many different possible treatments. In those with chronic headaches the long term use of opioids appears to result in greater harm than benefit.

Migraines
Migraine can be somewhat improved by lifestyle changes, but most people require medicines to control their symptoms. Medications are either to prevent getting migraines, or to reduce symptoms once a migraine starts.Preventive medications are generally recommended when people have more than four attacks of migraine per month, headaches last longer than 12 hours or the headaches are very disabling. Possible therapies include beta blockers, antidepressants, anticonvulsants and NSAIDs. The type of preventive medicine is usually chosen based on the other symptoms the person has. For example, if the person also has depression, an antidepressant is a good choice.Abortive therapies for migraines may be oral, if the migraine is mild to moderate, or may require stronger medicine given intravenously or intramuscularly. Mild to moderate headaches should first be treated with acetaminophen (paracetamol) or NSAIDs, like ibuprofen. If accompanied by nausea or vomiting, an antiemetic such as metoclopramide (Reglan) can be given orally or rectally. Moderate to severe attacks should be treated first with an oral triptan, a medication that mimics serotonin (an agonist) and causes mild vasoconstriction. If accompanied by nausea and vomiting, parenteral (through a needle in the skin) triptans and antiemetics can be given.Sphenopalatine ganglion block (SPG block, also known nasal ganglion block or pterygopalatine ganglion blocks) can abort and prevent migraines, tension headaches and cluster headaches. It was originally described by American ENT surgeon Greenfield Sluder in 1908. Both blocks and neurostimulation have been studied as treatment for headaches.Several complementary and alternative strategies can help with migraines. The American Academy of Neurology guidelines for migraine treatment in 2000 stated relaxation training, electromyographic feedback and cognitive behavioral therapy may be considered for migraine treatment, along with medications.

Tension-type headaches
Tension-type headaches can usually be managed with NSAIDs (ibuprofen, naproxen, aspirin), or acetaminophen. Triptans are not helpful in tension-type headaches unless the person also has migraines. For chronic tension type headaches, amitriptyline is the only medication proven to help. Amitriptyline is a medication which treats depression and also independently treats pain. It works by blocking the reuptake of serotonin and norepinephrine, and also reduces muscle tenderness by a separate mechanism. Studies evaluating acupuncture for tension-type headaches have been mixed. Overall, they show that acupuncture is probably not helpful for tension-type headaches.

Cluster headaches
Abortive therapy for cluster headaches includes subcutaneous sumatriptan (injected under the skin) and triptan nasal sprays. High flow oxygen therapy also helps with relief.For people with extended periods of cluster headaches, preventive therapy can be necessary. Verapamil is recommended as first line treatment. Lithium can also be useful. For people with shorter bouts, a short course of prednisone (10 days) can be helpful. Ergotamine is useful if given 1–2 hours before an attack.

Secondary headaches
Treatment of secondary headaches involves treating the underlying cause. For example, a person with meningitis will require antibiotics. A person with a brain tumor may require surgery, chemotherapy or brain radiation.

Neuromodulation
Peripheral neuromodulation has tentative benefits in primary headaches including cluster headaches and chronic migraine. How it may work is still being looked into.

Epidemiology
Literature reviews find that approximately 64–77% of adults have had a headache at some point in their lives.  During each year, on average, 46–53% of people have headaches. However, the prevalence of headache varies widely depending on how the survey was conducted, with studies finding lifetime prevalence of as low as 8% to as high as 96%.  Most of these headaches are not dangerous. Only approximately 1–5% of people who seek emergency treatment for headaches have a serious underlying cause.More than 90% of headaches are primary headaches. Most of these primary headaches are tension headaches. Most people with tension headaches have "episodic" tension headaches that come and go. Only 3.3% of adults have chronic tension headaches, with headaches for more than 15 days in a month.Approximately 12–18% of people in the world have migraines. More women than men experience migraines. In Europe and North America, 5–9% of men experience migraines, while 12–25% of women experience migraines.Cluster headaches are relatively uncommon. They affect only 1–3 per thousand people in the world. Cluster headaches affect approximately three times as many men as women.

History
The first recorded classification system was published by Aretaeus of Cappadocia, a medical scholar of Greco-Roman antiquity. He made a distinction between three different types of headache: i) cephalalgia, by which he indicates a shortlisting, mild headache; ii) cephalea, referring to a chronic type of headache; and iii) heterochromia, a paroxysmal headache on one side of the head.
Another classification system that resembles the modern ones was published by Thomas Willis, in De Cephalalgia in 1672. In 1787 Christian Baur generally divided headaches into idiopathic (primary headaches) and symptomatic (secondary ones), and defined 84 categories.

Children
In general, children experience the same types of headaches as adults do, but their symptoms may be slightly different. The diagnostic approach to headaches in children is similar to that of adults. However, young children may not be able to verbalize pain well. If a young child is fussy, they may have a headache.Approximately 1% of emergency department visits for children are for headache. Most of these headaches are not dangerous. The most common type of headache seen in pediatric emergency rooms is headache caused by a cold (28.5%). Other headaches diagnosed in the emergency department include post-traumatic headache (20%), headache related to a problem with a ventriculoperitoneal shunt (a device put into the brain to remove excess CSF and reduce pressure in the brain) (11.5%) and migraine (8.5%). The most common serious headaches found in children include brain bleeds (subdural hematoma, epidural hematoma), brain abscesses, meningitis and ventriculoperitoneal shunt malfunction