Using qualitative reasoning for diagnostic applications