An Improved Rule-Base Expert System for Diagnosis of Obesity

Download Full-Text PDF Cite this Publication

Text Only Version

An Improved Rule-Base Expert System for Diagnosis of Obesity

Ndukwe O. E

Department of Computer Science University of Port Harcourt

Onyejegbu L. N.

Department of Computer Science University of Port Harcourt

Onuodu F. E

Department of Computer Science University of Port Harcourt

Abstract:- In many developing countries there are inadequate healthcare facilities and few medical expert personnel. They often concentrate on emergency cases and the diseases they believe are life threatening overlooking the slow killer diseases such as Obesity. In this paper, we present a rule-based expert system that will allow medical experts and even Para-medics to diagnose patients of Obesity and its related diseases. The proposed system uses rule sets developed from getting information from Obesity experts to build a system that allow user to measure their weights, heights, blood pressure and feed the result into the system for diagnosis. The system uses the received input to compute the patients Body Mass Index (BMI) and using the rule set and the inbuilt expertise; it diagnoses the patient and makes informed reports. Object- oriented analysis and design methodology (OOADM) was used in designing the system. The model is implemented using PHP programming language and MySQL database.

General Terms:- Diagnosis, Expert System, Body mass Index Keywords:- Obesity, Rule-based expert system,


    Obesity is generally referred to as persons weight that is greater than what is considered as a normal or healthy weight. Obesity is simply monitored or screened by a tool known as Body Mass Index (BMI). BMI for adults is actually an adult weight in kilogram divided by the square height which is basically measured in meters. High BMI indicates high body fat. A patients bodyweight is recognized as underweight when the value is less than 18.5, when the BMI is 18.5 to 25, the weight is normal. If patient has BMI of 25 to 30, the weight is overweight. If patient has 30 or more, the weight is extreme or severe obesity classified as overweight where the range of 40 or more is extreme or severe obesity.

    Obesity is subdivided into 3 categories:

    1. The Class 1: BMI is 30 to < 35

    2. The Class 2: BMI is 35 to < 40

    3. The Class 3: BMI is 40 or higher.

    This Class 3 obesity is sometimes considered as severe or extreme obesity.

    BMI is just a tool used for screening body weight and height but not a diagnostic tool. However, the expert system was trained to function like a healthcare provider and execute Obesity health assessment diagnosis. Obesity occurs Obesity occurs whenever a person consumes a complex calorie than the body whenever a person consumes a

    complex calorie than the body may use and it is resulted by ones genetic makeup, high-calories foods, overeating and insufficient workout.

    When someone is mark obese, it increases the persons risk of suffering from dreaded diseases for example, stroke, heart disease, gall bladder stone and sometimes cancer.

    In computer science, Rule-based systems are mainly used to process knowledge and deploy that knowledge to construe information in a useful way. They are often used for expert system developments in artificial intelligence applications. Normally, the term 'rule-based system' is applied to systems involving human-crafted or curated rule sets [1].


    Expert system is computer software capable of solving identified problems or tasks as related to that of human expert in a specific field or any domain. According to [2], expert systems are computer programs that represents and reasons with experts knowledge with computer background and has the capability of providing solutions or advice. They are known as systems that mimic the thinking of human experts and provide solution to knowledge base problems as applied to different fields such as medical diagnosis.

    [1] opines that Rulebased systems represents the expert knowledge as rule set that decides on what it does in an instruction and concludes the result by itself rather than representing the information as true declarative knowledge or static one. Therefore, to solve expert-related problems, expert systems needs effective right of entry to a considerable domain base knowledge and reasoning process to apply knowledge to problems tendered among them, thereby have every tendency to explain how they achieved their decisions to its users that depends on them.

    1. studied diagnosis of Obesity and postulated it as a condition that occurs when the Body Mass Index (BMI) of an individual is greater than 30. The study however did not consider Obesity related diseases.

    2. in their work on rule-based expert system on diabetes considered the knowledge base which was represented as an If --> Then. IF is demonstrating the situation and THEN shows the suggestion for transforming experts knowledge to these rules. The work considered overweight and Obesity as a cause of diabetes but concentrated on other causes of diabetes derived from its expert knowledge extraction. It did not actually calculate Obesity from any Real standard

      parameter but simply used overweight as a measure of Obesity.

    3. work on non-expert system diagnosis and Treatment of Obesity in Adults, posits that Obesity is epidemic and leads to substantial morbidity/mortality. The work also suggested a strategy for managing obesity which is rarely used by physicians. This applied evidence-based review provides a rationale for the diagnosis and treatment of obesity in adults by providing test characteristics for the body mass index (BMI) and number needed to treat (NNT) for relevant treatments. The work also suggested a method which integrates evidence supporting recommendations from scientific bodies addressing obesity in adults, including: the National Heart, Lung, and Blood Institute, the World Health Organization, the Canadian Task Force on Preventive Health Care, and the US Preventive Task Force.


The proposed system is an expert system that identifies the limitations of the existing Obesity diagnostic system and offers solution to some of the challenges identified. The system is designed to correct the limitations and include the omitted diagnostic conditions such as induced cancer, infertility, Osteoarthritis and others which are very important to determine extra health condition of the type 3 obesity. These diseases symptoms gotten from the patients surveillance and Obesity parameters are collected and used in implementing the rule set (knowledge base) that is infused into the inference engine (which serves as the decision house) processes the knowledge base of the Obesity system.

The proposed system architecture is clearly illustrated in figure 3.2 below; the rule set injection clearly demarcated. The system received extra feedback from Obesity related diseases as displayed in this architecture into its rule set to make more accurate diagnosis.

The specific Obesity related diseases in this diagnosis are extracted from patients records. These related illnesses are known to cause or escalate obesity , when found these illnesses in the patients body being diagnosed are integrated in this proposed system general rule sets that guide obesity even when of the immediate conditions are not clearly showing obesity.

In this way, this expert system not only gets accurate in handling diagnosis but it also improved on identification of related illnesses that are assocated to Obesity. The Obesity rule set and pre-processed Obesity data from the human experts handled in this system are directly fed into the inference engine for inference analysis. In inference handling, its engine system ensure that this knowledge base system and system rule set are properly handled to achieve maximum result.

The patient's medical information collected and stored in the database and are sent and handled by the obesity data processing module, later send this to its inference engine where further inference analysis is taken place before moving it to diagnostic inference module. The systems

knowledge base are also feed into the inference system where it always guide the expert system in making well informed conclusion on the disease that is investigated. Inference engine processes this system and from the diagnostic, the system gets to the conditions using the expert postulator to develop the final diagnostic outcome. The user refines the outcome as the final result.

3.1 PROPOSED SYSTEM DESIGN Automated expert system for diagnosing Obesity system is information technology-based system, in which medical diagnosis are done automatically and records are kept and generated instantly and automatically. Information is well managed in this system, patient record and treatment history generated for patients. The proposed system design focuses on diagnosing Obesity conditions that will be cost-effective, flexible, and high quality medical environment for handling the condition. This particular system is actually divided into several sections namely Frontend level (User Interface) and backend level (Database level, Admin level, Application level).

In figure 3.2, a high-level model of proposed system clearly indicate when and exactly how the Obesity data is being collected by the personal interaction with patients registration structure and the previously available insights from the inference system. The diagnosis statistics system thereby relies on the number of Obesity patient diagnosed by the expert (doctors) and the facts derivable from such experience. Collectively, the increase in the statistical value means increase of diagnosed patients and as the diagnosed patients increases, the more reliable result of the diagnostic skill from the human expert. The experts information derived by the system are stored in its database and the knowledge base managed by the System Database Manager (SDBM). The database uses a Relational Database Management (DB) System as MySQL Server and the design will represent this reality.

The combined action by these system components is aggregated as the expertise used in developing this system and believed to take over from human expert. The system uses human expert knowledge stored as data and its manager advantage coupled as the knowledge base and the inference system to build this expert system.

3.2. ADVANTAGES OF OUR PROPOSED SYSTEM The benefits derivable from the system include:

  1. Automated diagnosis of Obesity.

  2. Ability to check and discover early stages of Obesity in patients.

  3. Use of generated patient records and medical treatment history as body weights used in the expert system for improvement of diagnosis.

Fig. 3.1 Architecture of the existing System

Fig. 3.2: Architecture of the Proposed System

Fig 3.3: Use -Case Design of the Obesity diagnosis Expert System

    1. Obesity Diagnostic Use case Design

      Use case design often shows the actions executed and the actors that trigger the actions. It clarified the interrelationship between the actions taken place and the stakeholders that actually trigger the actions. In figure 3.3, the use case design diagram clearly show doctors, patients, paramedics, medical records personnel and system administrators as the main actors. The actions carried out include getting the patients medical history from the records and doctors who want to diagnose a patient, the record contains the particular patients record in examined.

      Store record action is done only as displayed in the diagram. The login activity is done by the every actors since all need to login to have access or admittance to the expert system.

      The Obesity rule set is usually generated by admin and records unit, they are stored as procedures being added to the proposed systems inference engine at future phase in the development. The actual diagnosis system is used by the doctors and paramedics using the system developed. In the diagnosis, inferences are made which is clarified in Use-case design.

      If the diagnosis is carried out, Obesity can be presumed after examining the inferences outcome through the diagnoses.

    2. OBESITY DIAGNOSTIC UML DESIGN The UML design shows the main classes inexpert system for diagnosis of Obesity and how the classes interact in the system. It shows the class inheriting from another class and subclasses that are gotten from the super class. It also shows the arrangements of the classes from the modules that perform specific actions to the ones that perform major activities. In figure 3.4, the UML diagram shows the diagnose class as the super class from where the knowledgebase and the inference engines are deriving their attributes and their methods. The diagnose class may be abstract than the subclasses but the concrete concerns of inference and Obesity knowledge engineering carried out in clear detail at the sub classes but the upper abstraction serve the purpose of holding the modules together as they are implemented.

      The Obesity rule set class is a class injected into the concrete part of the class definition and is inherited by the record solution set class that provide the injection into the inference class that will need the rule set in making decision on the obesity condition of the patient. The diagnosis processing class inherits from the inference class and implements the Obesity knowledge base interface making the two to actually interact in a way as to produce the ideal results. The diagnosis processing with the processed record of solution set is use as super class which functions in the components of the diagnosis result as a final decision of the diagnostic findings, the class contain methods that act more like output of conclusions arrived at by diagnosing any patient in the expert system.

      All the UML design class diagram work closely together to accomplish the key objective of this system. Most of the related classes used in the system are internal compiler classes which must be imported or added as included or required classes to enhance the system functional and the graphical interface very interactive. The UML design actually offer the system advancement a clear guide on how the modules are projected to interact, the methods, functions and the fields or data that drive the modules can be bundled together for them to function as one single entity.

      Fig 3.4 UML Design of the Expert system for Obesity Diagnosis

    3. Algorithm of the Proposed Diagnostic System

The algorithm is a step-to-step procedure the system can take in other to arrive to the expected result. The algorithm directs the developer on the necessary steps to take in deploying the system not relying on any particular programming language. In modern development paradigm, the internal structures of class methods are implemented using the techniques specified in the algorithm.

Algorithm Obesity Diagnosis Step 1: Start

Step 2: Initialize the variable parameters Step 3: Check the Patients Registration Step 4: If student is Registered then Step Step5: Register Patient

Step 5.1: Initialize Registration variables Step 5.2: Input patients Name

Step 5.3: Input patients Address Step 5.4: Input patients Genda Step 5.5: Input patients ID

Step 5.6: Input patients UserName Step 5.7: Input patients Password Step 5.8: Confirm Password

Step 5.9: Send Patients Data to the Database

Step 6. Enter Patients UserName and PassWord to Login

<>Step 7: If userName and Password is Correct Continue Else Move to Step 5

Step 8: Initialize Knowledge Base Step 9: Get Obesity Rule Set Step 10: Get Patient BMI Data set

Step 11: Perform Inference Analysis

Step 12: Initialize Diagnosis and Inferences Step 13: using patients data Diagnose Step13.1 Compute Patients BMI

Step 13.2: If Weight > 30BMI then Assign threshold value

Step 13.3: If patient have Hypertension assign Hyp_ threshold value

Step 13.4: If patient is diabetic Assign Diab_threshold value

Step 13.5: If Patient is Hyperlipidemia assign Lipid_ tresshold value

Step 14. If All Treshhold is greater than Normal Then Step 15: Infer Obesity and Recommend Remedies Step 16: Otherwise Infer None Obesity

Step 17: Output Result. Step 18: Stop.

    1. RESULTS

      The system has a GUI feature with a very user friendly define contents, enable to particularly display graphically the analyzed data and results of the diagnosis of Obesity. The users are expected to register and login to the system before he can operate the diagnostic page of the system. This diagnostic system used the rule set and the inference engine to examine the submissions of the user based on the boxes and the combo buttons selected. The user interface is as shown in figure 3.5 with the checked button sending the value that was entered into the PHP code used in checking the knowledge base before inference will be made. The outcome of this implementation is a diagnostic result that is displayed on the web page in the systems.

      Fig. 3.5: Screen of the Diagnostic page

      The input diagnostic form shows the textbox for entering the values for the body weight and the body mass read from weighing equipment. The blood pressure values both the systolic and the diastolic are also recorded using the textbox. The checked boxes of the related diseases are also used to collect responses based on symptoms that the patient may also be having. Figure 3.6 below shows how the result is displayed.

      Fig. 3.6 Output of obesity related diseases diagnosed.


Improved Rule-Based Expert System for diagnosis of Obesity is important in the medical field. This provides doctors and healthcare persons with a tool which access Obesity dangers in any patient present at a health-care facility and enable physicians to initiate solution without delay. This has ways of providing cost effectiveness, improve the screening process and accurate in diagnosing obesity in any community. This system was achieved using the improved rule-based expert models and design drivers that support the system to track and detect type 1, type 2 and even type 3 obesities that were lacking in existing systems. The system went further to look into the related diseases that are trigger by type 3 Obesity and proffer diagnostic findings on them once they are confirmed.

Paramedical experts can use this system application established from this work to be carrying out Obesity diagnosis with the perfection of medical expert in the area study.


  1. C. Grosan and A. Ajith, Rule Based Expert System, Intelligent Systems Journal, Intelligent Systems Reference Library, vol. 17, pp. 149-185. Springer, Berlin, Heidelberg. 2011.

  2. A. B. John, IAI: Expert Systems, Journal of Expert Systems, vol. 4, no. 3, pp. 47-59. 2005.

  3. H. Orpana, B. I. Graubard, K. M. Flegal, and B. K. Kit, "Association of all-cause mortality with overweight and obesity using standard body mass index categories: a systematic review and meta-analysis". JAMA. Vol. 309, no. 1, pp. 7182. 2009.

  4. S. Tawfik, V. Mohammad, A. Yousef, and S. Talayeh, An Expert System for Diabetes Diagnosis, American Academic & Scholarly Research Journal. Vol. 4, No. 5, 2012.

  5. A. J. Orzano, and J. G. Scott, Diagnosis and treatment of obesity in adults, an applied evidence-based review. Vol. 17, no. 5, pp. 359-369. 2004.

  6. J. Liebowitz, The Handbook of Applied Expert Systems, CRC Press LLC. 2006.

  7. J. F. L. Peter, and C. V. Linda, Principles of Expert Systems, Centre for Mathematics and Computer Science, Amsterdam, Addison-Wesley USA. 2014.

  8. N. S. Abu, and A. Ola, An expert system for diagnosing eye diseases using Clips. Journal of Theoretical and Applied Information Technology, 2008.; vol. 4, no. 5, vol. 4, no 10. 2008.

  9. N. S. Abu, SL5 Object: The Simpler Level 5 Object Expert System Language, International Journal of Soft Computing, Mathematics and Control (IJSCMC), vol. 4, no. 4, pp. 25-37. 2015.

  10. W. P. Dan, Introduction to Artificial Intelligence and Expert Systems, Prentice-Hall of India, New Delhi. 2004.

Leave a Reply

Your email address will not be published. Required fields are marked *