An Expert System for Diagnosis and Treatment of Mental Ailment

DOI: 10.4236/oalib.1106166   PDF   HTML   XML   67 Downloads   144 Views  


The stigmatization and the accompanying problems with mentally challenged persons in the third world countries like Nigeria in getting good medication are better imagined than experienced. This paper presents the design, implementation of expert system for the diagnosis and treatment of mental ailment on interactive platform for remote consultation and monitoring of mental health patients within and outside the hospital. The study of the existing system was carried out using Structural System Analysis Design Methodology (SSADM) which involved personal observation and visits to 3 National hospitals. These data collected were analyzed using computer software and an expert system for the diagnosis and treatment of mental ill health developed using Hypertext Preprocessor (PHP), Hypertext Markup Language (HTML), Cascading Style Sheet (CSS) and AJAX programming Languages while backend was carried out with MySQL. The diagnosis that was rule-base was modeled based on expert knowledge and statistical analysis of the record of patients collected from this hospital database and existing literature.

Share and Cite:

Oguoma, S. , Uka, K. , Chukwu, C. and Nwaoha, E. (2020) An Expert System for Diagnosis and Treatment of Mental Ailment. Open Access Library Journal, 7, 1-22. doi: 10.4236/oalib.1106166.

1. Introduction

The high impact and importance of good health and healthy leaving of any individual must be handled and treated with immediate action, and quest for faster diagnosis and treatment of these individuals when need arises can be guaranteed if information and communication in brought into the health sector. Mental illness or mental disorder as it cannot be handled as a minor issue as many scholars have written a lot on the importance of introducing information communication technology (ICT) in treating mental disorder at the same time solidifying and ensuring greater accuracy to good health care services.

Today artificial intelligence has made it easy for medical professionals in handling some vital medical cases comprising of surgical, mental disorder, dental and other sensitive parts that accuracy is required [1] . In ensuring that mentally ill patients get the best diagnosis and treatment they anticipated, then there is need for an expert system (a branch of artificial intelligence) which could enable faster diagnosis and suggest the best method of treatment. Therefore this paper tends to provide a remote and mobile friendly computer based interface for easier diagnosis and treatment of mental ailments as a result of the high increase and economic consequences of mental health losses, more especially to enable these ill patients to have a better life and live normally rather than living as a marginalized and in disadvantaged situation.

Nevertheless, mental health can be defined as an online or internet based computer systems that help both medical and ill patients to have access to quick mental diagnosis and treatment from a remote area without visiting the hospital or clinic [1] . It also can be said to be an information communication technology device that aids in faster diagnosis and treatment of mentally ill patients online.

Hence this paper provides development of an expert system in diagnosis and treatment of mental ailment, the new system can be accessed through the web browser by entering the URL or by the icon on the computer desktop. The new system hence allows access for mentally challenged patients to receive information, report issues towards their health status, check for mental diagnosis and solution (Therapy). The administrator (User) could update the latest information on mental illness through the system dashboard after login authentication, parents or guardians could book medical appointment with the doctor on the platform. The new expert system design is shown in Appendix B of this paper. Furthermore, this paper reviewed some related work on artificial intelligence and expert system, e-mental health, causes of mental health illness, factors responsible for mental health in Nigeria, difference between the proposed system and existing works, advantages of the new system, analysis of the proposed system, system algorithm, forward and backward chain mechanism algorithm, proposed system data flow diagram and choice and justification of programming language used for the design of the platform.

2. Literature Review

Artificial Intelligence and Expert Systems

[1] noted that intelligence is the ability for an object to learn and understand, also further to be able to solve problems and make decisions based on the understanding already gotten. On the other hand an artificial intelligence (AI) could be said to be an intelligence by a machine and to provide a mechanism for machines to do or solve things that would require intelligence if operated by humans.

[1] also outlined a central problem of AI as being (locomotion), that is to say that AI includes traits such as reasoning, knowledge, planning, learning, communication, perception and the ability to move and manipulate objects. Looking at the early 90’s, AI attained its highest feast in practical application, notwithstanding all its previous hindrances. It was effectively applied in logistics data mining and medical diagnosis; though AI success started being revitalized with the commercial attainment of expert systems. Expert system is a form of Artificial intelligence program that stimulates the knowledge and analytical skills of one or more human experts.

Though [2] stated that conventional expert system is produced for a very narrow domain with obviously defined expertise whereby making the entire system performance fully reliant on the right choice of experts although a common strategy is to find just one expert, when a more complex expert system is being built or when expertise is not well defined, multiple experts might be needed.

Expert System

[3] defined expert system as a computer program or application that solves complicated problems that would otherwise require extensive human expertise.

Therefore for an expert system to effectively simulate the human reasoning process, a predefined and specific knowledge and interface must be applied. Secondly an expert system also makes use of human knowledge to solve complications that require normally intelligence. [4] is of the view that expert system signifies the expertise knowledge as data or rules within the computer. According to Aikins, rules and data that the expert system uses to operate can be called upon when needed to solve problems. [5] also stated that expert System usually has several components that must be periodically followed to solve a problem. Looking at the knowledge base, which is the component that contains the knowledge obtained from the domain expert. Typically, the way of demonstrating how knowledge is applied into the expert system is by using rules; the inference engine is one of the most important components of the expert system, it is the component that allows the user to query the system and receive the results of query made by the user. [6] highlighted that most of the expert systems have a component as an explanation facility which clarifies why a question was asked and how a result or answer was achieved. An expert system application can be applied in various domain areas and expertise namely: Agriculture, Education, Environment, Law, Manufacturing, Medicine, Power systems etc.

[7] review about Agriculture, Education, Environment, and Medical Expert System are some of the key aspects expert systems can be applied. These four application areas are widely used among the practitioners due to the ripeness of the field by revealing the acceptance of the technology by the commercial sectors. [8] is of the view that most common form of expert system is a in a form of a computer program which is built and contained a set of rules that analyzes information, it could be supplied by any user of the system depending on the class of the problem and therefore commends one or more causes of user action. On the other hand, the expert system may also provide mathematical analysis of problem(s) or indices. The Expert System utilizes what appears to be reasoning proficiencies to draw conclusions.

An Expert Systems Knowledge Representation

Studying how knowledge representation is done in an expert system could be looked at in two various ways namely: cognitive science and artificial intelligence. Cognitive science deals with how people store and process information they receive while looking at how artificial intelligence handles its knowledge representation, [9] stated that an artificial intelligence (AI) has a primary aim which is to store knowledge so as to enable programs to be able to process it and achieve the verisimilitude of human intelligence.

[9] also noted that since knowledge is used to achieve intelligent behavior, the important goal of knowledge representation is to represent knowledge in a manner as to facilitate inferenceing i.e. drawing conclusions from knowledge.

Knowledge Engineer

[10] , is of the view that knowledge engineers are responsible for knowledge representation and must ensure that it was chosen for the expert's knowledge declarations and also ensure that the required inference engine is used for the processing of the knowledge. The knowledge engineer can use the knowledge acquisition component of the expert system to input the several characteristics known to be appropriate to a good inference technique, including:

• Designing a good inference technique ensures independency of any kind of problem domain.

• In effectively identifying the benefits of explanation, knowledge, reusability and transparency of any program in any new problem domain, an inference engine must not contain domain specific expertise.

• A good inference technique must ensure that a specific or particular task so as to provide adequate accuracy. While other techniques may be committed only to a particular processing technique.

• Every inference technique must be specific to the knowledge structures.

• [11] stated that the perfect example of a successful rule processing technique is forward chaining and backward chaining.

End User

It is the end user that interacts mostly with the expert systems, and that is why a friendly interface must be created and make it easy to interact with. The end-user usually sees an expert system through an interactive dialog, an example of which follows:

Q. Do you know the name of the website where you can access mental illness solution?

A. No

Q. Is there any kind of food you would particularly like?

A. No

Q. Do you experience any had headache?

A. Yes

Q. Do you feel much depression constantly?

A. Yes

Q. Will you prefer an online mental disorder treating application/Website?

A. Why

Notably one could see that the dialog above, is leading the user through a set of questions, the purpose of which is to determine a suitable set of mentally treatment to recommend a user for. Looking at how the dialog as the user some question and the user answers the question asked by the system is a typical example of how an expert system works and interacts with a user. (a common feature of expert systems) and immediately illustrates a characteristic of expert systems; users may choose not to respond to any question. In expert systems, dialogs are not pre-planned. There is no fixed control structure. Dialogs are synthesized from the current information and the contents of the knowledge base. Because of this, not being able to supply the answer to a particular question does not stop the consultation [8] .

User Interface

[12] stated that the function of the user interface is to present questions and information to the user and supply the user's responses to the inference engine. It is a medium in which the user interacts with the system.

Whichever values entered by the user must be received and understood by the user interface. Some responses are restricted to a set of possible legal answers, others are not. The user interface checks all responses to ensure that they are of the correct data type. Any responses that are restricted to a legal set of answers are compared against these legal answers. Whenever the user enters an illegal answer, the user interface informs the user that his answer was invalid and prompts him to correct it.

Types of Problems Solved by Expert Systems

[13] is of the view that most organizations that have a very high-level of technical knowhow and experience or expertise cannot be easily be transferred to members within the organization before, can now achieve such actions with the help of an expert system. They are aimed at carrying the intelligence and information found in the intellect of experts and provide this knowledge to other members of the organization for problem-solving conditions.

Usually, the problems to be solved are of the sort that would normally be tackled by a medical or other professional. Real experts in the problem domain (which will typically be very narrow, for instance “diagnosing skin conditions in human teenagers”) are asked to provide “rules of thumb” on how they evaluate the problems, either explicitly with the aid of experienced systems developers, or sometimes implicitly, by getting such experts to evaluate test cases and using computer programs to examine the test data and (in a strictly limited manner) derive rules from that. Generally, expert systems are used for problems for which there is no single “correct” solution which can be encoded in a conventional algorithm. One would not write an expert system to find shortest paths through graphs, or sort data, as there are simply easier ways to do these tasks.

E-Mental Health

e-Mental Health (eMH) is the provision of services aiming at common mental health difficulties through online and mobile phone, interactive websites, apps, sensor-based observing devices and computers. It is therefore the use of the aforementioned technologies to render health services to ill patients. Furthermore, encyclopedia and [14] defined e-mental disorder as internet based interventions and support systems to aid mental health conditions from a remote location. [15] outlined that it can be referred to as the use of information and communication technologies (ICT) like the use of social media, landline and mobile phones to render health care services. Looking deeper, Department of Health and Ageing [16] stated that E-mental health services also deal with various informative platforms which include: peer support services, computer and internet based programs, virtual applications and games as well as real time interaction with trained clinicians or medical professional from the comfort of once home without visiting the clinic.

[17] is of the view that other programs like telephone call and interactive voice response devices could also aid in rendering accurate e-mental medications or treatments. Furthermore, the [18] stated that mental disorders include a range of conditions such as much consumption of alcohol and drugs. Others causes of mental disorder as stated by (APA) includes mood disorders such as depression, dementia and Alzheimer's disease, delusional disorders such as schizophrenia and anxiety disorders are all various mental illness and could be treated through some of the outlined technologies.

[16] is of the view that intervention programs have focused on the treatment of mental ailments like that of depression and anxiety only while other mental disorder exist therefore call for immediate action. There are, however, programs also for problems as diverse as smoking cessation, [19] highlighted gambling, [20] and [21] outlined post-disaster of mental health programs as an approach towards helping mentally challenged Individuals have effective and immediate treatment. Adoption and use of Innovations in information and communication technology (ICT) are transforming the landscape of health service delivery. [22] is of the view that emerging field, often referred to as “e-health,” includes key features, such as electronic, efficient, enhancing quality, evidence based, empowering, encouraging, educating, enabling, extending, ethics, and equity.

E-health is a broader concept than telehealth (and telemedicine), which involves the use of ICT to connect patients and providers in real time across geographical distances [23] . Interest is also increasing in the application of ICT in mental health care. For example, the first international e-mental health summit held in 2009 in Amsterdam, and a summit-specific issue of the Journal of Medical Internet Research was published [24] .

[25] defined e-mental health as “mental health services and information delivered or enhanced through the Internet and related technologies.” However [26] stated that there is no agreement on a field-specific definition on e-mental health as some scholars consider e-mental health to include only initiatives delivered directly to mental health service where users can only have access through the Internet. [27] is of the view that e-mental health is a delivery via stand-alone computers or video seminars.

Causes of Mental Health Illness

[28] stated that mental disorder could be traced towards a combination of biological, psychological, and environmental factors. The great scholar further narrated that biologically, some mental illness was linked to deal with abnormal functioning of the nerve cell circuit or pathways that connect the brain regions. The nerve cells within the brain circuits communicate through chemicals called neurotransmitters which the researcher noted that with a very good ‘tweaking’ might result in a chemical medication or psychotherapy or other medical procedure which could aid in ensuring that the brain circuits runs perfectly well.

Psychological Factors

[28] is of the view that another factor like psychological factors could also cause mental disorder mainly witnessed in childhood. That is why it is advised that parents should always live in peace and harmony as any cause of emotional trauma could cause great harm to their children. Therefore parenting style and the communication approach of the family unit are crucial factors that are capable of defining the mental status of the growing child. Though it is obvious that children come to the world carrying an empty cognitive slate called tabula rasa and it is therefore the duty of the family, as the first socializing agent, paints pictures and imprints codes of conduct that they will use to navigate this world.

Psychological conditions are one of the major factors causing mental disorder and hence parents are advised to try their best in ensuring that they present a good and conducive environment for their wards to grown in and learn.

Marital Challenges

[28] also pointed out another factor responsible for mental disorder which is bad marriage. I could remember how it feels as a child watching your parents fight. It is not a good sight to behold at not even the trauma associated with it. The relationship within a family plays a long role in maintaining a health family instead of a dysfunctional unpleasant view. Furthermore, the emotional environment of a dysfunctional family is toxic for the children as communication takes a defensive dimension. The mother can exhibit her frustrations on the innocent child. Instructions that could have been simple become unclear and formless, such that when the mother intends to say ‘come,’ she says ‘go away.’ This style is capable of setting up a form of cognitive dissonance that may be a foundation for future mental illness in some children.

Factors Responsible for Mental Health illness in Nigeria

[29] is of the view that about 33% Nigerians health budget goes to mental health with over 90% of the budget going to mental health hospitals. Therefore looking at Nigeria’s mental health policy which was first formulated in the year 1991 and therefore includes the advocacy, promotion, prevention, treatment and rehabilitation of mental health related problems. According to [29] outlined some of the causes of ill mental health issues in Nigeria as follows:

1) Family History

2) Biological like brain chemistry, or genes

3) Life experiences like abuse or trauma

Various early signs of mental illness by [29] .

1) A change in eating or sleeping habits.

2) Withdrawing from people and usual activities

3) Beginning to feel less concerned about situations you or like nothing matters.

4) Feeling hopeless

5) Feeling on edge

6) Angry

7) Confused

8) Scared and inability to perform well as before.

9) Fighting unnecessarily

10) Heavy drug usage.

Explanation of the Key Differences between This Work and Existing Related Studies

Though other scholars has done various work on this topic, some uses rule base, forward chain technique, backward chain technique and etc., but the proposed system is quit difference in the sense that a combination of both forward and backward chain mechanism are used. The forward chaining starts with the available data in this case (the mental symptoms in the knowledge base) and uses inference rules (if-then rule) to extract and provide solution to patient (from an end user) until the exact goal is reached. While the backward chaining begins with a list of goals (or assumption) and works backwards from the resultant to the antecedent to see if any data (solution) supports any of these consequents [30] . An inference engine using backward chaining would search the inference rules until it finds one with a consequent (Then clause) that matches a desired goal and inference engine using forward chaining searches the inference rules until it finds one where the antecedent (If clause) is known to be true. That is to say once a symptom is being searched by a user, the forward and backward mechanism is at work at same time hence making it faster for possible solution of the ailment is displayed for the user.

Another aspect this work differs from already existing works is in the area of software development and implementation, the software supports both standalone/remotely access. The software was designed in a way that it has an application icon on a computer desktop which could enable user double click on it to launch the software without using the URL only. This is a modern method of software development approach and hence it makes users not have a website address offhand.

3. Adopted Methodology

An expert system can be seen as branch of artificial intelligence (AI) which serves as a computer program that answers or solves difficult problems that would then require extensive human expertise whose primary objective is to store the knowledge assembled from various experts by the knowledge engineer, so that it can be processed by a computer program, whereby achieve the likelihood (similar) of human intelligence and also to represent knowledge in a manner so as to provide smooth inferencing i.e. drawing conclusions from knowledge by the use of an inference engine. To do so, it stimulates the human reasoning process by applying specific knowledge and inference. These rules and data can be called upon when needed to solve problems.

An Expert System is typically made up of the following components (Figure 1).

System basic requirements Identification

For proper development using expert system method, input and output requirements and are looked into which include:

Input Requirements:

The requirement is partitioned into various sections:

1) Hospital Admin Login

2) Patients Book Appointment Requirement

3) Check Mental Symptoms, Diagnosis and Treatment (Forward Chain approach)

4) Select Types of Mental Ailment Signs (Backward Chain approach)

5) Update New Mental ailment Diagnosis and treatments

Knowledge acquisition subsystem: the main source of knowledge was published materials, internet, and psychiatric hospitals and also through (interview questions and answers) gotten from experienced doctors/nurses. The knowledge had been built according to the selection criteria, before design, the knowledge was gotten and assessed by psychiatric doctors and pharmacist for critic recommendation and modification. Figure 2 shows the knowledge extraction process.

Figure 1. Expert system components.

Figure 2. Knowledge extraction process. Source:

Knowledge Acquisition

Knowledge base: At this stage it is referred to as the component that contains the knowledge obtained from the domain expert. The way of representing knowledge in an expert system is using rules and is called knowledge representation. For this work, all knowledge base facts and rules are stored in the database which will be designed with MySQL database shown in software.

Explanation subsystem: A subsystem that explains the system's actions. Here deals with the solution of each asked problem or explains why a question was asked or how a result or solution was obtained.

Inference engine: The inference engine performs the role of inferring the required decision from the knowledge base to the user interface. In the proposed expert system, it uses the (if… else) conditions to compare users request and the stored facts in the knowledge base (database).

User interface: The interactions between the users and the system were supported through a friendly graphical user interface running under windows environment.

It is designed such a way that a computer program is used to simulate the human reasoning process by applying a specific knowledge and inferences, to solve complicated mental challenge issues, using a set of rules that analyzes the information (symptoms, usually supplied by the users/doctors of the system) about a specific class of problem (mental sign witnessed on patient) and recommends one or more course of action and method they normally use in treating such cause, which require a high degree of expertise (equal or better than its human counterpart (Psychiatric Doctors/Nurses) and a rich knowledge base. The methodology that possesses these characteristic and fits into this description is no other but an EXPERT SYSTEM; thus it is suitable for the development of the “diagnosis and treatment of mentally ill patient” and as such is adopted for the purpose of this work. Figure 1 above explains the stages and components adopted for the design.

Architecture of the Rule Based Expert System

The below diagram (Figure 3) explains the architecture of the expert system and how the interaction between one subsystem and the other starting from the knowledge domain.

Figure 3. Architecture of the rule based expert system. Source: West African Journal of Industrial and Academic Research, Vol. 3, No. 1, June 2014.

4. Advantages of the New System

The researcher wouldn’t have gone into this work without identifying its major advantages over the traditional diagnosis and treatment of mentally ill patients. Therefore below are some of the advantages of the new system over the existing one.

1) Faster means to medical diagnosis and treatment

2) An access to remote consultation and medication

3) Easy medical attention placement/booking

4) Delay free and encourage accuracy

5) Promote proficiency and adaptation of ICT in rendering medical treatment

6) An adequate means for transferring knowledge between medical personnel’s within the medical organizations

7) Eradicate discrimination and promote privacy of patients

8) A perfect means of treatment of mental disorder once identified.

5. Analysis of the Proposed System

The proposed system required two (2) different users namely: Patient and Administrator, each user of this system have some granted privilege. Below are the analysis and performance of the proposed expert system.

PATIENT USER: Once a patient visit the platform through the web browser by entering the platform Uniform Resource Locator (URL), the Home (index.php) is opened, it is on this Home page that the patient can either check for mental ailment Symptoms and get solution or book appointment to meet the doctor based on the appointed date shown in Figure 4 while the book appointment interface shown in Figure 5.

Once the button is clicked “CHECK MENTAL SYMPTOM”, an interface is opened which will allow user enter the type of symptom or sign witnessed, shown in Figure 6.

On the other hand, once the button is clicked “LEARN MORE ABOUT MENTALLY DISORDER”, an interface shown in Figure 7 is displayed where the patient could select any symptom from the box and hence the expert system will display any information about such type of mental ailment.

Figure 4. Mental ailment diagnoses and treatment.

Figure 5. Patient medical appointment form.

Figure 6. Mental ailment search interface.

Figure 7. Mental ailment information interface.

ADMINISTRATOR USE: The administrator (admin) is one with overall privilege on the platform. The admin could update the expert system knowledge base (database) with latest mental ailment symptoms, causes, drugs, treatment or therapy. Removal or cancellation of any treatment or therapy that is not in use again can only be done by the admin, checking of all updated treatments are also one of the privileges given to the system administrator. But before an access is given to the administrator, the system will perform an authentication process which will guarantee if the username and password combination of the administrator is accurate through the administrator login interface shown in Figure 8.

Figure 8. Patient medical appointment form.

After a successive login, the dashboard will be opened. It is on the dashboard that the about activities are done.

6. Proposed System Algorithm

Diagnosis and Treatment Algorithm

Step 1. Start program;

2. Enter Symptom;

3. Process input;

4. if (symptom = “Depression”){

5. Treatment=“Antidepressants. Antidepressants are used to treat Depression, anxiety and sometimes other conditions. They can help improve symptoms such as sadness, hopelessness, lack of energy, difficulty concentrating and lack of interest in activities. Antidepressants are not addictive and do not cause dependency”;

1. } if (symptom = “anxiety”){

Treatment=“Anti-anxiety medications. These drugs are used to treat anxiety disorders, such as generalized anxiety disorder or panic disorder. They may also help reduce agitation and insomnia. Long-term anti-anxiety drugs typically are antidepressants that also work for anxiety. Fast-acting anti-anxiety drugs help with short-term relief, and they also have the potential to cause dependency, so ideally they'd be used short term”;


2. if (symptom = “difficulty concentrating and lack of interest in activities”){

Treatment=“Antidepressants are used to treat depression, anxiety and sometimes other conditions. They can help improve symptoms such as sadness, hopelessness, lack of energy, difficulty concentrating and lack of interest in activities. Antidepressants are not addictive and do not cause dependency”;

8. } if (symptom = “bipolar”){

Treatment=“Mood-stabilizing medications: Mood stabilizers are most commonly used to treat bipolar disorders, which involve alternating episodes of mania”;

9. }

else {

display “No treatment yet”;

end program;


Forward/Backward Chaining Algorithm

Step 1: Program start;

Step 2: Choose a module;

Step 3: if (Module=“Forward Chain”){

Step 4: Open Module;


Step 5: if (Module=“Backward Chain”){

Step 6: Open Module;


Step 7: Enter Ailment symptom;

Step 8: if (Symptom==“feeling hopeless”){

Step 9: Open Another question;

Step 10: if (Symptom==“angry”){

Step 11: Open Another Question;

Step 12: if (Symptom==“Feeling on edge”){

Step 13: Display Diagnosis=“YOU HAVE MENTAL AILMENT”;

Step 14: Proceed for treatment;

Step 15: }

Step 16: else if (Symptom==“depression”){

Step 17: Display: Sign of Mental ailment;

Step 18: else if (Symptom==“Heavy drug usage”){

Step 19: Display: Sign of Mental Ailment;


Step 20: No Sign of Mental Ailment Found;

Step 21: end if;

Step 22: stop;

7. System Design and Implementations

System design deals with putting solutions to the problems with the available resources. It is the blue print of the system that is to be developed. Therefore, software life cycle requires some basic activities which include: Decomposition of the entire system into components: Identification of the system architecture including various menu and screen displays, how the system can be installed, the hardware and software specifications/requirements for the installation of the system and how to start up the system, Component of the proposed system and their relationship as well as its dependencies are covered, and Inter component communication mechanism is also achieved.

8. Proposed Expert System High Level Model (HLM)

Figure 9 illustrates the Proposed Expert System High Level Model (HLM) designed in a top-down approach. It comprises of all the module, sub-module and sub-sub-module of the new system. It best describes the main components of the new expert system and hence makes it easier for full understanding and for accurate implementation in real life scenario.

9. System Description

The system description talks more on the entire functions and modules in the entire system, therefore the new system has four main modules, and more than four sub modules. Below is the description of the entire modules that made up the entire new system.

Hospital Administrator Login: The module grants access to an update and entire management of the new system.

Patients Book Appointment Requirement: This module provides a remote and mobile friendly interface for patients to place medical appointment date to consult and interact with the medical professional online.

Check Mental Symptoms, Diagnosis and Treatment (Forward Chain approach): This module was achieved following a mechanism known as forward chaining such a way that inquiry to mental diagnosis and treatments are asked through the user interface.

Select Types of Mental Ailment Signs (Backward Chain approach): This module also was carried out following the backward chaining mechanism such that users select a symptom from the provided mental illness signs and the system provide the causes, diagnosis and treatment based on the type of illness selected.

Update New Mental ailment Diagnosis and Treatments: This module is in charge of update and upload of new mental illness causes, diagnosis and treatments or even any new therapy that has to deal with mental disorder.

Figure 9. High level model of new system. Source: Field Work 2019.

Note: All mental cases, treatments, diagnosis, causes, drugs, medical specialist contact and locations are updated by the clinic administrator and hence are all stored in the database designed with My Structural Query Language (MYSQL).

10. Data Flow Diagram of the New System

Logical flow of the proposed system is shown in Figure 10. As stated earlier during the analysis of the proposed system, two different users are identified namely: Patient and Administrator, hence once a successive access is granted to either user through the login interface, the user could perform some operations base on the privilege given as a user. As shown on the diagram on figure 10, the selection of mental ailment is handled by the backward chain mechanism while the search mental ailment was done by the forward chain mechanism which both gets solution from the knowledge base (database).

11. New System Forward and Backward Chaining Mechanism Design

Figure 11 illustrates the logical interaction when a request is made by a user towards providing an inference to a given mental symptom. Once a request is sent from the search symptom link, the forward mechanism takes in charge and immediately checks for suspicious disease then proceed to interrelated symptom after which validation of ticket and provision of recommendation and presentation of disease solution. In the same approach, the backward chain mechanism is triggered once the selection (Drop Down) button is click. Both the forward or backward chain mechanism is controlled by the inference process rule after which a solution is presented on the user interface.

12. Choice and Justification of Programming Language Platform

The new system is an expert system for diagnosis and treatment of mental ailment. The front end was designed hypertext markup language (HTML), Cascading Style Sheet (CSS), Bootstrap, JavaScript (JS) while the backend was

Figure 10. Data flow diagram of the new system. Source: Field Work 2019.

Figure 11. New system forward and backward chaining mechanism design. Source: Field Work 2019.

done with Hypertext preprocessor (PHP) and My Structural Query Language (MySQL). The system has an easy and simple friendly interface design such as the user only enter the URL of the website in the browser to access the application. The system brings out the result of the search displaying the causes of the illness, drugs or therapy best suit for the treatment, and medical professional specialist in charge. Figure 11 displays how the forward and backward chain communication flows between the user and the mental ailment expert system.

13. Results

Figure 12 serves as the control center of the new system; it is on this interface that a user could carry out diagnosis of patient mental ailments. Before a result of any diagnosis or treatment is displayed on the screen, a user must first select the likely symptom (Sign) in the provided input text field (as shown in Figure 13).

Figure 12. Home.

Figure 13. Checking of mental ailment symptoms through selection.

The new system provides an interface for patients to book appointment with the doctor for medical checkup regularly from remote area (as shown in Figure 14). Instead of selecting from the options, user can search for the treatment or diagnosis for the mental ailment related to a particular symptom (as shown in Figure 15). The backward chaining mechanism fetches treatment of a mental ailment based on a particular mental symptom (as shown in Figure 16).

14. Conclusion

In conclusion, the stated objectives of the design were met such as patients’ booking appointments with doctors, searching for mental ailment diagnosis and treatment was achieved, update and management of the expert system were also accurately done. The online diagnosis and treatment of mental ailment is a welcome development if adopted by various states and countries more especially in African countries if not now but should be considered in the nearest future.

Figure 14. Patients medical appointment placement.

Figure 15. Searching for mental ailment diagnosis, causes and treatment.

15. Recommendations for Further Studies

Therefore this study recommends the following:

• Further study should look at the development of an android mental ailment expert system that will incorporate other medical activities that were not covered in this paper.

Figure 16. Result of an enquiry asked by a user (using the backward chaining mechanism).

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.


[1] Russels, S. and Norvig, P. (2003) Artificial Intelligence: A Modern Approach, 3rd Edition.
[2] Negnevitsky, M. (2005) Artificial Intelligence. 2nd Edition, Pearson Education, London.
[3] Oliver, O. (2010) Expert Systems. Oliver’s Publishers, FUTO Owerri Imo State, Nigeria.
[4] Aikins, J.S., Kunz, J.C., Shortlife, E.H. and Fallat, R.J. (1983) An Expert System for Interpretation of Pulmonary Function Data. Computers and Biomedical Research, 16, 199-208.
[5] Barnett, G.O., Cimino, J.J., Hupp, J.A. and Hoffer, E.P. (1987) Explain: An Evolving Diagnostic Decision Support System. The Journal of the American Medical Association, 258, 67-74.
[6] Basri, H.B. (1998) An Expert System for Planning Landfill Restoration. Water Science and Technology, 37, 211-217.
[7] Brusilovsky, P. and Gorskaya-Belova, T.B. (1992) The Environment for Physical Geography Teaching. Computers and Education, 18, 85-88.
[8] Omenyi, A.S. (1995) Artificial Thinking, a Tool for Effective Counseling. Journal of Counseling and Communication, 2, 24-25.
[9] Kelly, D. (2001) Expert System and Medical Issues. Ibadan, SME’s. Oxford University Press, London, 48-62.
[10] Seybold and Pat (2001) Artificial Intelligence Medication Recommender. Knowledge.
[11] French, C.S. (1993) Data Processing and Information Technology. DP Publication Ltd., London.
[12] Seybold, et al. (2013) Artificial Intelligence/User Interface.
[13] Nissann of Daniel (2003) The Microsoft Manual of Style for Technical Publications (Versions 3.0).
[14] Bennett, K., Bennett, A.J. and Grfifiths, K.M. (2010) Security Considerations for E-Mental Health Interventions. Journal of Medical Internet Research, 12, e61.
[15] Rebecca, C., Jen, H. and Matthew, P. (2013) E-Mental Health: What’s All the Fuss about? Discussion Paper 12. NHS Confederation, London, UK.
[16] Department of Health and Ageing (2012) E-Mental Health Strategy for Australia (Report). Australian Government, Canberra, Australia.
[17] National Institute for Health & Clinical Excellence (2006) Computerized Cognitive Behaviour Therapy for Depression and Anxiety. NICE, London, UK.
[18] American Psychiatric Association (2000) Diagnostic and Statistical of Mental Disorders. 4th Edition, Department of Health and Ageing. Analysis and Prototyping of Effective Graphical User Interfaces, American Psychiatric Publishing, New York.
[19] Civijak, M., Lindsay, F., Hartmann-Boyce, J., et al. (2013) Internet-Based Interventions for Smoking Cessation. Cochrane Database of Systematic Reviews, No. 7, CD007078.
[20] Hodgins, D.C., Fick, G.H., Murray, R. and Cunningham, J. (2013) Internet-Based Interventions for Disordered Gamblers: Study Protocol for a Randomized Controlled Trial of Online Self-Directed Cognitive-Behavioral Motivational Therapy.
[21] Ruggiero, K.J., Resnick, H.S., Paul, L.A., Gros, K., McCauley, J.L., Acierno, R., Morgan, M. and Galea, S. (2012) Randomized Controlled Trial of an Internet-Based Intervention Using Random-Digit-Dial Recruitment. The Disaster Recovery Web Project.
[22] Eysenbach, G. (2001) What Is E-Health? Journal of Medical Internet Research, 3, E20.
[23] Sood, S., Mbarika, V., Jugoo, S., et al. (2007) What Is Telemedicine? A Collection of 104 Peer Reviewed Perspectives and Theoretical Underpinnings. Telemedicine and e-Health Journal of Medical Telemedicine Research, 13, 573-590.
[24] Riper, H., Andersson, G., Christensen, H., et al. (2010) Theme Issue on e-Mental Health: A Growing Field in Internet Research. Journal of Medical Internet Research, 12, e74.
[25] Christensen, H. and Griffiths, K.E. (2002) The Internet and Mental Health Practice. Evidence-Based Mental Health International Journal of Information Management, 8, 66-69.
[26] Lambousis, E., Politis, A., Markidis, M., et al. (2002) Development and Use of Online Mental Health Services in Greece. Journal of Telemedicine and Telecare, 8, 51-52.
[27] Ybarra, M.L. and Eaton, W.W. (2005) Internet-Based Mental Health Interventions. Mental Journal of Health Services Research, 7, 75-87.
[28] Adeoye, O. (2000) Causes of e-Mental Health Illness.
[29] Olawale, S. (2018) Mental Health in Nigeria.
[30] Backward Chaining.

comments powered by Disqus

Copyright © 2020 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.