Procedure that can diagnose apnea