Is curmudgeon used to mean the same thing in the next two sentences?

There's a cranky curmudgeon working at the hospital who gives all the patients and other doctors flak.

John Doe's old age and stubborn aversion to new ideas make him a curmudgeon of a candidate.
the same meaning