Pilot’s medical emergency causes flight diversion