What happens when a pilot is incapacitated?
Is there a contingency for such a situation, where one of the pilots leaves the cockpit, the other pilot is incapacitated (for example losing consciousness) while the first pilot is still outside the cockpit and can not reenter the cockpit.


Yes, a keypad on the door will allow the second pilot back into the cockpit. It doesn't help when the pilot outside doesn't know/forgets the code or if the unlock code is denied from inside the cockpit.