Updated

When 7-year-old Kaelyn Krawczyk went in for surgery at Duke Medical Center on Wednesday, she had a special friend accompany her into the operation room – her service dog, JJ.

According to reports from Cary News, Kaelyn suffers from a rare condition called mastocytosis, which causes her body to have allergic reactions to heat, cold and other unknown triggers. During Wednesday’s surgery, doctors were trying to discover what was causing the recurring kidney infections Kaelyn had been experiencing.

However, the routine procedure presented special risks for Kaelyn because of her extreme susceptibility to allergic reactions.

JJ, a terrier mix, has been trained to detect Kaelyn’s allergic reactions before they become too severe – alerting her parents to treat Kaelyn with an EpiPen. In the 18 months that JJ has been with Kaelyn, she’s experienced only one severe reaction – compared to the three to four reactions a year she had experienced in the past.

Though JJ wouldn’t have been able to accompany Kaelyn into a sterile operating room, he’s allowed to be present in more relaxed medical settings – after receiving a bath, Cary News reported.

During the procedure, JJ stood up and turned in circles as Kaelyn was put under and brought out of sedation – signs of a mild, but not severe reaction. With the help of the dog’s trainer, Deb Cunningham of Eyes, Ears, Nose and Paws in Carrboro, NC, anesthesiologists were able to monitor Kaelyn’s reactions throughout the successful procedure.

“It sounds silly, in this age of technology, when we have millions of dollars-worth of equipment beeping around me, that we had a little dog who was more sensitive than all the machines,” Dr. Brad Taicher, Kaelyn’s anesthesiologist, told Cary News.

Click for more from Cary News.