Medical examiner suffers heart attack while testifying