Transcript for Little Girl's Best Friend Helps Her Stay Safe Even in Surgery
And finally tonight, the remarkable dog who helped save a life every day. Even in the operating room, ready to bark orders to the doctors and nurses. Here's abc's steve osunsami. Reporter: Surgeons at duke university say this is a first. 7-year-old kaelyn krawczyk is heading into a risky operation to deal with a kidney infection. And they're bringing her pet dog to stand watch. What are you going to dream about? J.J. Reporter: Her dog, j.J., Is trained to smell when she's in trouble. K.K., As her family calls her, lives every day with mastocytosis, which causes life-threatening reactions to everyday things like stress or temperature changes and especially sensitive to anesthesia. We saw how it works at her home. This is j.J. Alerting, sensing a reaction coming on, smelling a change. It didn't take her a minute to run down to this cabinet door, and get the medical kit. Good job. Reporter: Doctors say the dog's nose works better than their machines. The procedure went great. And j.J. Gave us a few little warning signs that something might have been started. But calmed down very quickly. Reporter: And to think, j.J. Was abandoned at five weeks old. But she stood out to trainer deb cunningham, who searches the shelters for trainable puppies. You want one who's confident, one who's going to say, hey, i need you to pay attention. Reporter: She says any dog can be trained using saliva samples. No different than training dogs to detect low blood sugar levels or epileptic seizures. Watch as this dog literally pins his owner to the ground. This is her treat for when she alerts. Reporter: All this means that k.K. Gets to live a relatively normal life and even go to school. You know this dog is a miracle to us, every day. Reporter: Should I tell people that you love your dog? How much? More than any number. Reporter: More than any number? So, would you say a thousand? More than a thousand. Reporter: More than a thousand. I make up a new number. A fillion. Reporter: And she assures us, that's a lot. Steve osunsami, abc news, raleigh.
This transcript has been automatically generated and may not be 100% accurate.