A Formal Analysis of Diagnosis and Diagnostic Reasoning.