I had a dog once that could tell when death approached a person.
1.) My dog loved an elderly lady down the street. She was forever sneaking out of the yard and down to her house. (treats, I suspect) I was taking her for a walk one night and this lady was watering some plants on her porch. I can usually avoid geting stopped if I walk at night, but not this time. I walked up the side walk, so I wouldn't have to speak so loud to talk with her. The dog went as far as the steps, but reared back when I tried to go up the steps. I put it down to wanting to continue her walk.
The next morning, the lady was found on her steps. She never made it back inside the house. I had to have been the last person she spoke with. She was in her 80s, so I really didn't think about the dog sensing anything.
2.) My cousin came to visit her mother, so naturally we had a 'get together'. I took the dog with me in the back of a pickup truck and parked it under an oak tree to the side of the picnic table. All the kids were taking her treats. She was loving the attention and all of us enjoyed watching it. The only thing was, she wouldn't take anything from my cousin's 12 year old son. I was thinking the dog did not like him for some reason. I hadn't seen him do anything to her and he seemed to be a nice kid.
My cousin returned to N. Fla and took her 3 children on a camping trip. The kids were ages 10... 12... and 16. The 16 year old was a girl and she talked her mother into letting her go a couple of miles to a 7-11. She had just gotten her driver's license. The store was on a hiway, but it was all dirt roads to get there, so her mother let her go. The 12 year old went with her. On the way back, they hit a deep sandy rut in the road. The car slid over into a 6ft ditch, sideways and was underwater, except for the driver's door.
She got her little brother out, but they estimated he was underwater for 10 or 15 minutes. They airlifted him to a hospital and he was in a coma for a week, then finally passed away.
From the time we were at the family affair, until he passed away was 7 days. The pictures hadn't even been developed, but when they were... somebody had caught a shot of the little fella trying to pet the dog. She was reared back, with her teeth showing.