It sounds like something out of an episode of "Grey's Anatomy": A patient arrives at the hospital with a device in their body that could potentially explode. But that's what happened at an emergency room in San Antonio, Texas, when a man arrived with part of a firework impaled in his leg.

When the patient showed up at the emergency room in January 2017, doctors initially thought they were dealing with a typical case of trauma to the leg. But an X-ray of the injury revealed that there was an object embedded in the man's leg; namely, a potentially explosive part of a mortar-type firework that appeared to have been propelled into his leg as he was loading the device, according to a recent report of the case.

But the patient wasn't sure which part of the firework had ended up in his leg, or if it could still explode. [27 Oddest Medical Cases]

Dr. Lane Thaut, an emergency-medicine resident at San Antonio Military Medical Center (SAMMC) who treated the patient, said everyone involved in the patient's care acted calmly, although the case was somewhat nerve-wracking.

"When you hear that, yes, [the device] could be something that could potentially be explosive, of course everybody kind of gets a little bit on edge," Thaut told Live Science.

The 44-year-old patient told doctors he had tried to set off the firework, but it initially did not go off, so he presumed it was a dud. He was reloading the device when there was an explosion, which injured his right thigh. The patient was taken to a local trauma hospital before being transferred to SAMMC.

Doctors noted that the man's wound was "grossly contaminated," and he had fractured his femur (thighbone), according to the report.

A potentially explosive injury

Because the device in the man's thigh could potentially explode, the hospital contacted a team of Explosive Ordnance Disposal (EOD) technicians, as well as the fire department. The patient was placed in a room away from other patients, and was told to remain still, in order to minimize the potential for the device to explode.

The fire department advised doctors to irrigate the injury with water (which would drown the fuse), and avoid use of a procedure that heats tissue with electricity (called electrocautery), as this could potentially lead to detonation.

The surgeons were able to successfully remove the firework without complications. The patient needed a metal rod inserted into his femur to treat his fracture, and a skin graft for his tissue wound. After about two weeks in the hospital, the man was well enough to go home, the report said.

An uncommon civilian case

Most previous reports of impaled unexploded devices come from military settings (such as a battlefield), not a civilian setting like this one, the researchers said.

But the researchers said that they decided to publish this case to raise awareness about the potential for these situations to happen in civilian settings, particularly in light of recent terrorist attacks in urban areas that have "blurred the lines of the battlefield," the report said.

"This has the potential to be, unfortunately, an event that may be encountered by a provider in an emergency room setting," said Dr. Andrew Murtha, an orthopedic surgery resident at SAMMC, who also treated the patient. "Understanding how to manage the patient without risking harm to other patients and the medical team is something that's important to recognize," Murtha told Live Science.

Some recommendations for handling cases of unexploded devices include evacuating all nonessential personnel, notifying the local bomb squad or EOD team, moving the patient to a location away from the hospital, and using appropriate protective equipment, such as body armor, ballistic eyewear and helmets.

In the current case, doctors were told they did not need to move the patient to a different location or wear special protective equipment. That's because, with a firework, the use of water and avoidance of heat prevents the device from detonating, the researchers said. Fuses of military-grade munitions, on the other hand, are more complex than those of fireworks, and may be triggered by movement, pressure or even sunlight or radiofrequency devices such as cellphones, the report said.

Thaut said that hospitals should have a plan in place for these situations, and have the contact information for the proper authorities (such as the local bomb squad or EOD) to handle these cases.

"The emergency department is really the door the hospital," Thaut said. "I think that any real trauma center or emergency department should be aware that this is a potential thing that could present to the door," he said.

The report was published online Jan. 20 in The Journal of Emergency Medicine.

Original article on Live Science.