Microsoft Word - Issue-4.docx 154 Virtual General Physician System using Artificial Intelligence Saleem Ahmed Dept.of Computer Systems Engineering, Dawood University of Engg and Technology Karachi New M. A. Jinnah Rd, Jamshed Quarters Muslimabad, Karachi, Karachi City, Sindh 74800, Pakistan Phone: +92 21 99231195 saleem3714@gmail.com Naveed Ali Khan Dept. of Electrical Engineering Federal Urdu University of Arts, Sciences &, Technology New M. A. Jinnah Rd, Jamshed Quarters Muslimabad, Karachi, Karachi City, Sindh 74800, Pakistan Phone: +92 21 99231195 naveedali64@yahoo.fr Dost Muhammad Saqib Bhatti, Dept.of Computer Systems Engineering, Dawood University of Engg and Technology Karachi New M. A. Jinnah Rd, Jamshed Quarters Muslimabad, Karachi, Karachi City, Sindh 74800, Pakistan Phone: +92 21 99231195 saqibbhatti128@gmail.com Kainat Ali, Dept.of Computer Systems Engineering, Dawood University of Engg and Technology Karachi New M. A. Jinnah Rd, Jamshed Quarters Muslimabad, Karachi, Karachi City, Sindh 74800, Pakistan Phone: +92 21 99231195 Mona Sahar Dept.of Computer Systems Engineering, Dawood University of Engg and Technology Karachi New M. A. Jinnah Rd, Jamshed Quarters Muslimabad, Karachi, Karachi City, Sindh 74800, Pakistan Phone: +92 21 99231195 Abstract Health related issues have been regarded as one of the major problems which directly impact quality of life of an individual and development of the nation. Healthy population is attractive in all countries and healthcare is the one of the most widely concerned topic in research. The objective of study is to introduce a system through which people can diagnose and treat their minor illness such as cold or diarrhea. In this paper, a virtual general physician system approach is proposed using artificial intelligence. K-Nearest neighbor algorithm which is a part of artificial intelligence is used for disease diagnosing. This virtual general physician system can diagnose the diseases based on symptoms. It collects the symptoms from patient in the form of Yes or No. Four categories can be diagnosed by the systems which include Respiratory Tract/Viral infections, Gastrointestinal Tract/Stomach infections, Fever, Headache. Each category include some diseases which the system can detect or diagnose like in Viral infections (Flu, Tonsillitis, Cold and Pneumonia), Respiratory infections (Acute Diarrhea, Dysentery, Food Poisoning and Gastroenteritis), Fevers (Dengue, Malaria, Viral and Chikungunya) and Headaches (Migraine and Cluster Headache). The goal of this system is to assist patients get their treatment without going to the clinic and to reduce the doctor’s effort, time and working. Keywords: Artificial Intelligence; Health care, Virtual, Physician, System. 1. Introduction The conventional diagnosis depends on a gathering of clinical information including side effect which means the problems that occur when treatment goes beyond the desired effect, physical examination and laboratory examination. It is made by the specialist's own insight and clinical S. Ahmed, N. A. Khan, D. M. S. Bhatti, K. Ali, M. Sahar - Virtual General Physician System using Artificial Intelligence 155 experience (Han-Bin et. al., 2009). With the ascent in innovation everything is getting automated nowadays to limit human endeavors. Medical decisions turns into a hard action in light of the fact that the human specialists, who need to decide, can scarcely process the gigantic measures of information (Dehariya et. al., 2011), because of this Computer based analysis are getting to be certain in disease diagnosis (Mahesh et. al., 2014). Medical and clinical fields have demonstrated a vast interest for utilizing choice emotionally supportive networks over the previous years, particularly for helped finding expectation of therapeutic inconveniences, image analysis, and so on. Machine learning procedures have been effectively connected to medical decision emotionally supportive systems. The strategies include taking in theories from a lot of analyzed examples, i.e., the information gathered from various vital medicinal examinations alongside the comparing analyze made by medical specialists, to help the medical specialists in making a diagnosis after gathering information (Li & Zhou, 2007). The basic models in the supported medical diagnosis framework are: strategy in view of measurable speculations, technique in light of fuzzy arithmetic, technique in light of case induction, strategy in view of artificial nervous systems and strategy in light of machine study, strategy in view of ontology and data mining innovation is likewise utilized as a part of the aided medical systems (Zhou, 2011). Utilizing artificial intelligence strategies, this can be likewise be performed utilizing procedures, for example, Bayesian system (BN), artificial neural network (ANN), fuzzy inference system (FIS),genetic algorithm (GA), swarm insight (SI), fluffy cognitive maps (FCM), and others [6]. In (Zhaoxia & Yueling, 2010), an expert system was constructed utilizing CAP2 algorithm by giving cases of spotlight on the likelihood of the span of the condition of division as the heuristic data keeping in mind the end goal to give examples in light of binary tree-based classification technique. According to (Bannet & Hauser, 2012), design a common purpose (non-disease-specific) computational/AI model. This method mixed two different approaches i.e markov decision process (MDP) and dynamic decision networks (DCN) in order to study from clinical data. Moreover, hybrid prediction application was launched for gene expression data analysis, which is mixture of rough-based feature selection method and radial basis function neural network (Chiang & Ho, 2008). Contemporary another neural network called ARTMAP was proposed by using fuzzy method which is more efficient in situ hybridization image signals (Vigdor & Lerner, 2006). It enables to diagnose the clinical numerical genetic abnormalities. For virtual healthcare particularly for those patients who are suffering from chronic diseases such as metabolic syndrome, an efficient system developed by (Tseng et. al., 2015). It collects facts and Figures, then analyze the results on regular basis, finally based on findings suggest some kind of diet plans and also useful recommendations. For the approximate entropy calculations, EEG detection application was given by (Srinivasan et. al., 2007), it is also neural network and based on automated epileptic. Although for the liver cirrhosis a noninvasive approach based on artificial networks analyzes data from laboratory was proposed in (Bostan & Pantelimon, 2015). Similarly, an expert system based on Generalized Regression Neural Network (GRNN) proposed, it used to find hepatitis B viruses is positive or negative (Mahesh et. al., 2014). For pre-testing of psychiatric issues, a decision support system was accomplished by comparative study with Case-Based Reasoning is proposed in (Bouaiachi et. al., 2014). Further, a programmed technique for incorporating the control for a neural prosthesis (NP) that might enlarge elbow flexion/augmentation and lower arm pronation/supination in people with hemiplegia was depicted (Iftime et. al., 2005) utilizing the Radial basis function artificial neural networks (RBF ANN) to decide synergies. To compare benign and malignant nodules in Low-dose helical computed tomography (LDCT) scans, a CAD built in scheme by applying massive training artificial neural network (MTANN) (Suzuki et. al., 2005). By the use of real hypoglycemia episodes an automated program was proposed in order to Type 1 diabetes mellitus in the patients (San et. al., 2013). Hybrid rough-block-based neural network (R-BBNN) algorithm has been used to design for the development of above stated application. Generally, Hypoglycemia terminology used in medical science to symbolize the lower level of blood glucose. It signifies an optimum hazard in Type 1 diabetes mellitus (T1DM) patients. BRAIN – Broad Research in Artificial Intelligence and Neuroscience Volume 9, Issue 4 (November, 2018), ISSN 2067-3957 156 In addition to that an improved cardiovascular diseases application developed by (Feshki & Shijani, 2016). The foundation was based upon Particle Swarm Optimization (PSO) and Neural Network Feed Forward Back Propagation algorithm. In order to identify the abnormal tissues in the patient those are affecting by tumors, entropy in the neural (brain) system, the intelligent application constructed by (Bhanumurthy & Anne, 2014), which recognized through MRI images. Extensively, a neuro fuzzy divider used to divide MRI images in to normal as well as abnormal. In (Islam et. al., 2013), a stochastic technique for describing tumor surface in cerebrum MR images was developed. The brain tumor texture was formulated using a multiresolution-fractal model known as multi- fractional Brownian motion (mBm). Various scholars put their efforts in the medicine field and innovated several computerized applications to assist the specific diseases but the common diseases like flu, cold and diarrhea etc. has not been given proper attentions as concluded by (Shofi et. al., 2016). Since a minor infection might be the cause to a serious ailment. In this study, we have suggested a virtual general physician system using an artificial intelligence algorithm, K-Nearest neighbor. The rest of this paper is classified as follows. Next part of this paper present a holistic view about thee building process of the virtual general physician system. Third part contains the analytical results of our system. Lastly, we suggest this work and point out some future work directions in Section IV. 2. Proposed Method In the proposed method, we have attempted to simplify the diagnostic procedure through our virtual general physician system. The proposed system can diagnose disease without consuming much time. Diagnosis can be done in number of phases. In the first phase, the system diagnoses the category of disease on the basis of symptom based questionnaire. It collects the symptoms from patient on the basis of these symptoms it decides that from which disease category it belongs to. The category is specified in this phase. In the second phase, the system diagnoses specific disease on the basis of specified category relevant symptom based questionnaire after detection of disease category. The system can deal with four categories i.e. Viral infections (Respiratory Tract), Stomach infections (Gastrointestinal Tract), Fever and Headache and their relative some diseases. All the symptoms and diseases of the categories are mapped in sample datasets. The core implementation is on PHP, Python, and database designed on MySQL. The diagnoses occur by using the Artificial Intelligence and its algorithm that is K-Nearest neighbor (KNN). The choice of KNN is made due to its suitability in proposed scenario because it calculates the distance amongst the entities and assigns weights. This system is expected to provide cost effective solution for patients. It can be very helpful for physical disabled people, they can diagnose diseases from their own home without any doctor. An overview diagram for the proposed system is shown in Figure 1. S. Ahmed, N. A. Khan, D. M. S. Bhatti, K. Ali, M. Sahar - Virtual General Physician System using Artificial Intelligence 157 Figure 1. Entity Relationship Diagram of Virtual General Physician System A. Dataset The system contains sample datasets for diseases diagnosing purpose. In which five datasets are included, dataset used to identify category is a general category dataset which is combination of all four categories. Other four datasets are relevant to each category specific diseases. General category dataset consists of 200 samples, in which 50 for each category is included. Datasets related to specific disease contains 20 samples for each disease. These sample datasets consists of features and labels, symptoms is used as features and category or specific disease name is used as labels in datasets. Some sample dataset of general category is shown in table 1. Table 1. Category Dataset Runny/ congested nose Low grade fever High grade fever Body ache Nausea/ vomiting Diarrhea Headache Blurred vision Category 1 1 0 1 0 0 1 0 Viral 0 0 1 1 0 0 1 0 Fever 0 0 0 0 1 1 0 0 GIT 0 0 0 0 0 0 1 1 Headache BRAIN – Broad Research in Artificial Intelligence and Neuroscience Volume 9, Issue 4 (November, 2018), ISSN 2067-3957 158 B. K-Nearest neighbor Algorithm As Compared to other machine learning methods, K-Nearest neighbor is one of the simplest classification method. Generally, it is very accurate classifier in most of situations. It is based on principle that the samples belong to same class if they are close in the instance space. K-NN is instance based learning method. It requires less computation time for training phase as compare to other learning algorithms such as decision trees, neural networks and Bayes networks [22]. Nearest neighbor classifier learning is based on resemblance. If any unlabeled sample is given, first it calculates the similarity with each sample of training set. Its K-Nearest neighbors are searched and then unlabeled sample is assigned to class label which majority of its neighbors belongs to. It fundamentally based on the belief that the data is connected to feature space and all points are considered in order, to find out the distance with the other data points. Euclidian distance is used according to the data type of data classes used. K-NN is easy to implement as compared to other methods, it has low space complexity and time complexity. K-NN classifier working is very simple. First, value of K is initialized. After initialization of k value it calculates the distance between test sample and training samples then Sort the distances. We have worked on Euclidean distance formula which is given by:      2222 2 11),(),( nn pqpqpqpqdqpd   (1) Then, take top K-nearest neighbors and apply simple majority. After that, it Predicts class label with more neighbors for test sample. Figure 2 shows the block diagram for the K-NN algorithm. 3. Results And Discussion To get the results from our classifier, we divide our dataset into training, testing and evaluation set. 80% of data was divided for training assessment, 20% for testing assessment and 10% of training data for evaluation assessment. After that, we gave some input to predict and the classifier predicted as according to our classification as shown in table 2. Figure 2. Block Diagram of K-NN Algorithm S. Ahmed, N. A. Khan, D. M. S. Bhatti, K. Ali, M. Sahar - Virtual General Physician System using Artificial Intelligence 159 Table 2. Category Dataset Runny/ congested nose Low grade fever High grade fever Body ache Nausea/ vomiting Diarrhea Headache Blurred vision Category 1 1 0 1 0 0 1 0 Viral 0 0 1 1 0 0 1 0 Fever 0 0 0 0 1 1 0 0 GIT 0 0 0 0 0 0 1 1 Headache We tested our system on multiple input sets and get our desired result with an accuracy of 97%. 4. Conclusion and future direction In this paper, we have proposed virtual general physician system for diagnosis of four disease categories in which Respiratory Tract/Viral infections, Gastrointestinal Tract/Stomach infections, Fevers, Headaches are included. Each category has some diseases which our system will detect or diagnose like Viral infections (Flu, Tonsillitis, Cold and Pneumonia), Respiratory infections (Acute Diarrhea, Dysentery, Food Poisoning and Gastroenteritis), Fevers (Dengue, Malaria, Viral and Chikungunya) and Headaches (Migraine and Cluster Headache) are included. Disease diagnosing is based on Artificial Intelligence algorithm which is K-Nearest neighbor to provide reliable results. In our system, we have used different datasets based on symptoms in which Category Dataset, Fever Dataset, Headache Dataset, GIT Dataset, and Viral dataset are included. These datasets are used by our system to diagnose diseases. The main contributions of our proposed system is to facilitate the patients in such a way that they do not need to visit the general physicians and don’t need to pay heavy charges. They can easily examine their selves at their home. Our proposed system provides cost effective solution for patients. Patients from rural areas or in travel can take advantage from the proposed model. It helps in providing 24 hour service availability and also provides a great assistance for repetitive and monotonous jobs, so physicians and nurses can more concentrate on their actual jobs instead of repetitive tasks. This system can be very helpful in those countries or areas where healthcare facilities are not good. The results obtained by virtual general physician system are satisfying and sufficient to conclude that it can be very helpful for general disease diagnosing. For future work, it is recommended that system can be extended to deal with different categories and medicine prescription feature can also enhance its healthcare services. Test feature can also be added to make it more efficient. If in case system is not sure about the disease, so it can assigns some test to patient to continue further treatment. Datasets and the number of symptoms can also be increased to provide more accurate results. References Bannet, C.C., Hauser, K. (2012). Art f c al Intell gence Framework for S mulat ng Cl n cal Dec s on-mak ng - A Markov Dec s on Process Approach. Elsev er. Bhat a, A., Mago, V., & S ngh, R. (2014). Use of Soft Comput ng Techn ques n Med cal Dec s on Mak ng: A Survey. IEEE. Bhanumurthy, M.Y., & Anne, K. (2014). An Automated Detect on and Segmentat on of Tumor n Bra n MRI us ng Art f c al Intell gence. IEEE. Bostan, V.M., & Pantel mon, B. (2015). Creat ng a Model Based on Art f c al Neural Network for L ver C rrhos s D agnose. IEEE. Boua ach , Y., Khald , M., & Azman , A. (2014). Neural Network-based Dec s on Support System for Pre-d agnos s of Psych atr c D sorders, IEEE. Ch ang, J.-H., & Ho, S.-H. (2008). A Comb nat on of Rough-Based Feature Select on and RBF Neural Network for Class f cat on Us ng Gene Express on Data. IEEE. Dehar ya, A., Khan, I., Chaudhary, V.K., & Karsol ya, S. (2011). An Effect ve Approach for Med cal D agnos s Preceded by Art f c al Neural Network Ensemble, IEEE. BRAIN – Broad Research in Artificial Intelligence and Neuroscience Volume 9, Issue 4 (November, 2018), ISSN 2067-3957 160 Feshk , M.G., & Sh jan , O.S. (2016). Improv ng the Heart D sease D agnos s by Evolut onary Algor thm of PSO and Feed Forward Neural Network. IEEE. Han-b n, O., Shua , L., L , Y., Wen-hua, H., & Sh -zhen, Z. (2009). Study on the New Des gn of Computer-a ded D agnos s System. IEEE. Ift me, S.D., Egsgaard, L.L., Popov c, M.B. (2005). Automat c Determ nat on of Synerg es by Rad al Bas s Funct on Art fic al Neural Networks for the Control of a Neural Prosthes s. IEEE. Islam, A., Reza, S.M.S., & Iftekharudd n, K.M. (2013). Mult -fractal Texture Est mat on for Detect on and Segmentat on of Bra n Tumors. IEEE. Jadhav, S.D., & Channe, H.P. (2016). Comparat ve Study of K-NN, Na ve Bayes and Dec s on Tree Class f cat on Techn ques, Internat onal Journal of Sc ence and Research (IJSR).V gdor, B., & Lerner, B. (2006). Accurate and Fast Off and Onl ne Fuzzy ARTMAP-Based Image Class f cat on w th Appl cat on to Genet c Abnormal ty D agnos s. IEEE. L , M., & Zhou, Z.H. (2007). Improve Computer-A ded D agnos s w th Mach ne Learn ng Techn ques Us ng Und agnosed Samples. IEEE. Mahesh, C., K ruth ka, K., & Dh lsathfath ma, M. (2014). D agnos ng Hepat t s B Us ng Art f c al Neural Network Based Expert System. IEEE. Sr n vasan, V., Eswaran, C., & Sr raam, N. (2007). Approx mate Entropy-Based Ep lept c EEG Detect on Us ng Art fic al Neural Networks. Suzuk , K., L , F., Sone, S., & Do , K. (2005). Computer-A ded D agnost c Scheme for D st nct on Between Ben gn and Mal gnant Nodules n Thorac c Low-Dose CT by Use of Mass ve Tra n ng Art fic al Neural Network. IEEE. San, P.P., L ng, S.H., Nuryan , & Nguyen, H. (2013). Evolvable Rough-Block-Based Neural Network and Its B omed cal Appl cat on to Hypoglycem a Detect on System. IEEE. Shof , I.M., Kesuma, L., & An sa, G. (2016). Andro d Appl cat on for D agnos ng General Symptoms of D sease Us ng Forward Cha n ng Method, Faculty of Sc ence and Technology, Un vers tas Islam Neger Syar f H dayatullah Jakarta. Tseng, J.C.C., L n, B.-H., L n, Y.-F., Tseng, V.-S., Day, M.-L., Wang, S.-C., Lo, K.-R., Yang, Y.-C. (2015). An Interact ve Healthcare System w th Personal zed D et and Exerc se Gu del ne Recommendat on. Zhou, F., & Wu, E. (2011). The Des gn of Computer A ded Med cal D agnos s System Based on Max mum Entropy. IEEE. Zhaox a, L., & Yuel ng, Z. (2010). Appl cat on of Ar thmet c CAP2 n Med cal D agnos s Expert System, 2nd Internat onal Conference on Educat on Technology and Computer (ICETC), IEEE.