Pilot medical emergency prompts course change