It is well known that lithium ion batteries can explode under certain conditions. For a visual demonstration, check out the video below (the pyrotechnics begin around 1:50 in). Lithium ion batteries also happen to be found nearly everywhere people are: in consumer electronics, in medical devices, as well as in vehicles such as hybrid cars and, more famously, the Boeing 787 Dreamliner.
It is still unclear what exact role lithium ion batteries played in recent fires in 787 Dreamliners, the batteries are generally safe under normal conditions, as a UL report titled "Safety Issues for Lithium-Ion Batteries" (PDF link) explains. As the title might indicate, however, have substantially higher energy density than other battery chemistries, which ups the risk for fire or explosions. In particular, they are susceptible to problems when they are overcharged or discharged quickly.
How safe are lithium batteries for medical devices? It depends on the device and the species of lithium battery technology in question. There are roughly half a dozen lithium-ion technologies available as well as lithium-polymer batteries, which has a different type of electrolyte.
On Quora, Razvan Baba, who has designed battery chargers, weighs in on the question above, pointing out that the safety window for lithium batteries is narrow. If the temperature is overly high or low, "something bad is bound to happen," he explains, pointing to the diagram on the right.
Also on Quora, Adam E. Piotrowski of CreateBigIdeas LLC acknowledges that the "the use environment of [consumer devices like portable electronics as well as hybrid cars] is very different from the demanding conditions of a commercial airliner." He adds: "Given the size of airplanes, the power demands for an airliner are likely different than those for an ICD or surgical tool, and meeting those demands under operating conditions may create different engineering challenges as compared to powering smaller, less-consuming devices and technologies."
The performance parameters of lithium ion batteries used in medical devices and consumer devices is better understood than it is in airliners, which undergo multiple takeoff and landing cycles daily.
"Answering the question whether or not lithium-ion batteries are safe for medical device applications comes down to understanding the environment and intended application of the device, and then making product and engineering decisions based on those needs and requirements," Piotrowski concludes.