To code headaches, think of an inverted pyramid, and work your way from top to bottom with your coding. 1. Determine if headache is primary or secondary. A primary headache means there is no underlying pathology. This includes cluster (339.00-339.02) and tension-type headaches (339.10-339.12) and migraines (346.0-346.9). A secondary headache is due to some type of underlying pathologic condition. This might include a cranial aneurism or tumor, drug-induced headache (such as 339.3), infection, or head trauma. If another disorder is known to be able to cause headaches has been demonstrated, it meets the criteria for secondary headache diagnosis, says Marvel Hammer, RN, CPC, CCS-P, PCS, ACS-PM, CHCO, owner of MJH Consulting in Denver. 2. Apply timing vocab. Headaches can be classified under four time zones: chronic, episodic, paroxysmal, and persistent. The overall definition of chronic is that the headache occurs on more days than not over a three-month period, Hammer says. Thus, if a patient is having a headache for twenty days out of a thirty-day period, and it happens for three months, that meets the definition of a chronic headache by the IHS. Episodic means the headache is recurring and remitting in a regular or irregular pattern of attacks of constant or variable duration. Persistent means it remains in the same state for an indefinite period of time, says Hammer.