An airplane in flight is one of the worst places to have a medical emergency, even if there's a doctor on board. Medical supplies and drugs are limited. There's often little space for a physician to work or for anyone to render first aid. Critical resources may be hours away.

The New England Journal of Medicine has published a review for doctors of the types of urgent problems they might encounter on board and some of the challenges they'll face if they try to treat them.

Fortunately, the odds of having a medical emergency on a particular flight are long - by one count, about 1 in 600.

In many cases there are no clear guidelines on whether an emergency landing is warranted. Even if there is a doctor on the flight, the decision is always up to the pilot.

Here's a rundown of some of the potential problems and options in that "medically austere environment," according to Dr. Jose Nable of the Georgetown University School of Medicine in Washington, D.C. and his coauthors.

Cardiac arrest is the deadliest threat but, fortunately, the odds of seeing one during a flight are small. They account for only 0.3 percent of medical emergencies.

Cardiopulmonary resuscitation (CPR) is one potential treatment and the medical kit all airlines are supposed to have on board contains equipment to help. Each plane is also supposed to have a defibrillator to shock an errant heart back into a normal rhythm, but unlike on TV, that often doesn't work. Thus, cardiac arrest is responsible for 86 percent of in-fight events that result in death.

Heart attacks and related problems like angina represent 8 percent of in-air emergencies. On-board medical kits have aspirin, which can help break up a clot causing a heart attack. The kits also contain nitroglycerin to relieve chest pain, "though they should be used with caution," the doctors advise. There's one type of heart attack, for example, where giving nitroglycerin can drop blood pressure to dangerously low levels and lead to shock.

Strokes or suspected strokes account for 2 percent of in-flight medical emergencies. Administering oxygen is one option for doctors. Giving aspirin is not because too many strokes are caused by bleeding in the brain, and aspirin can worsen that problem.

However, stroke-like symptoms can also be caused by low blood sugar. If an airline doesn't carry a glucose-monitoring kit - and some don't because they're not required - passengers can be asked to loan one.

"Altered mental status" covers a lot of problems and can include complications from diabetes (responsible for 1.6 percent of emergencies) along with seizures and their aftermath (5.8 percent). Unfortunately, lower in-cabin air pressure and travel to a different time zone can aggravate some existing problems. Again, a blood sugar measurement may help.

Fainting or feeling faint account for 37 percent of emergencies. Lower cabin pressure and dehydration caused by the dry air in the cabin, along with altered eating patterns and fatigue from delayed flights may contribute, the doctors write.

Attending to blood sugar levels or letting the passenger lay on the floor with feet elevated can help. But diverting the plane might be warranted if the person is elderly with serious heart problems and persistent symptoms.

Breathing difficulties make up 12% of in-flight medical emergencies. Medical kits contain an albuterol inhaler.

Psychiatric emergencies account for 3.5 percent of incidents. The stresses of flying these days don't help people with mental health issues, the doctors note. Most travelers can sympathize.

"Because the medical kit does not contain sedatives, the use of improvised physical restraints might be necessary to ensure the safety of other passengers if attempts at deescalating the situation and calming the passenger are unsuccessful," Nable and his colleagues write.

The good news for passengers: in many cases there is a doctor on board who can help. A 2006 survey of 191 medical emergencies found that a doctor was on the plane for 45 percent of the calls. A recommendation for an emergency landing was made in 3 percent of the cases.