The main goal of autonomic computing is to make the software systems able to manage themselves and minimize the human intervention. Various methods have been used to implement autonomic computing. This research focused on one of the autonomic computing characteristic which is self optimization. "Self-optimization capability optimizes various parameters at run time according to environmental conditions. It enables monitoring, experimenting and tuning various parameters to make best use of the existing resources". This research tried to implement self-optimization system that help to get result used to support reports used by doctors to diagnose. To achieve this patients records are collected from Sleep disorders and lung function Research Center in Sudan (Army medical hospital) contains 18 attributes from different patients of different situations. Case based reasoning algorithm applied which is problem solving paradigm of artificial intelligence used old experiences as case base in form of problem-solution pair to solve a new problem.