A Comprehensive Expert System for Diagnosing and Assessing Formation Damage