A friend was terrified of his impending by-pass surgery and his doctor told him there was only one chance in twenty that he wouldn't pull through. That's what put the frighteners into him.
So I explained that 1/20 failures was a 95% success rate and he cheered up immediately. It's all in the perception. Try and keep him thinking positively.
A few years ago there was a surgeon in England who used to shout at his patients as they were receiving anaesthetic, "You will get better. I will help you." He's probably still doing it.
Foxteach1's answer (without intending to criticise) is the last thing I'd say. Offering to pray for me would scare the bejesus out of me. "Does he think I'm that sick I'll need Divine intervention to pull through?" Sorry, but no thanks.
Wish them a swift recovery. This leaves no alternative but recovery and the only variable referenced is the swiftness of it.
And make a plan to do something fun, maybe something you used to do together when they get well, "Get well soon so we can get back to hiking." This gives the patient something positive to focus on and look forward to and reminds them that you care about their well-being.