Knowledge based expert systems for medical diagnosis