Abstract
β-thalassemia is an inherited blood disorder in which the body cannot produce hemoglobin normally. Since patients with this condition receive blood transfusions regularly, iron builds up primarily in organs such as the heart, liver and endocrine glands. Accumulation of iron in the organs necessitates chelation therapy. These patients must visit the hospital frequently to assess and follow up on their health condition. Physician intervention is required after each regular assessment to adjust the treatment. Lifelong healthcare support using a web-based expert system with a quick response code is designed for β-thalassemia management in order to deliver benefits to patients, physicians, and other healthcare providers. The aim of this study is to implement a web-based expert system for β-thalassemia management in order to provide treatment recommendations and support the lifelong healthcare of patients. The system provides patient-related details, such as medical history, medicines, and appointments, in real-time. It has been also tested in real-life cases and shown to enhance β-thalassemia management.
Introduction
β-thalassemia is a fairly common genetic disorder in which the body produces an irregular form or an insufficient amount of hemoglobin. According to the ministry of health in Saudi Arabia, almost 7% of the total world population have hemoglobin disorders, and about 50,000–100,000 children die from complications due to thalassaemia major every year. 1 β-thalassemia also has been categorized as either β-thalassemia (TDT, transfusion-dependent β - thalassemia) or non-transfusion (NTDT) dependent based on clinical practice. The TDT β-thalassemia patients are often required to have blood transfusions every 3 or 4 weeks throughout their entire lives while patients with NTDT typically require few or no blood transfusions. The secondary complication most commonly associated with blood transfusion is iron overload, which requires the removal of the excess iron in the organs such as heart, liver and endocrine glands by iron chelation. Desferrioxamin B (DFO), when used as monotherapy, is administered 5 to 7 days a week through 12 h of continuous infusion via a pump, is started after 10–12 blood transfusions. The recommended dose depends on the age of the patient and the concentration of serum ferritin in the blood. However, the concentration of serum ferritin in the blood is not always reliable as it is affected by other factors, most significantly inflammation. The follow-up in monitoring the efficacy of transfusion and chelation therapy for individuals with β-thalassemia includes regular monthly physical examinations, an assessment of liver function tests (LFT) every 2 months, the measurement of serum ferritin concentration every 3 months, and other re-examinations every 12 months to determine any side effects. 2
The complexity of β-thalassemia management, the huge amount of diverse medical information, and the continuous update of medical records are all impacted by possible errors. The use of computers has expanded in the medical field for the diagnosis, management, and treatment of diseases. 3
The expert system is an area of artificial intelligence (AI) that aims to simulate human expertise by means of a software that provides solutions based on the interactions of knowledge. Such knowledge is represented in the form of rules learned from medical experts, which are replicated in the system software to inform decision-making. 4
Web-based expert systems (WBESs) are a collection of web applications created through the incorporation of software-based expert system technology, and access to the expert system is via the internet. A WBES uses the internet to propagate expert knowledge to non-experts and deliver knowledge to users anywhere and anytime. In the medical domain, the WBSE is used in various activities, such as consultation and diagnosis. 5
The daily practice in hospitals is full of commitments around patients. After a patient’s visit, the physician will often book a follow-up appointment for further assessment. According to Schwebel and Larimer, 6 the text message is an important alert tool for encouraging patient compliance and improving care. Text reminders are a cost-effective, easily implemented and automated way to improve medical compliance and appointment attendance.
Furthermore, it can be time consuming to obtain and insert data laboratory results from other healthcare providers into the local systems of the hospital. However, despite its inherent drawbacks, the manual entry of data is still normal in many hospital procedures. Intrinsically slow, error-prone manual data entering is subject to the variability in human resources. Thus, healthcare providers constantly seek ways to automate data capture in an economical way. Technology can assist in entering report results into the hospital system through a technique called information extraction. For example, methods have been developed to translate data from unstructured health reports into a standardized format. 7 This allows healthcare providers to access the medical history of patients by using automated data instead of having to rely on the printed report or repeating tests.
The QR (Quick Response) code is a type of barcode that consists of small black and white squares in a printed square pattern that codes data to open a web page, showing an image, video or text that can be scanned onto a computer system. 8 The use of QR codes is a very secure and inexpensive way of transmitting medical information to patients. For example, in 2016, Deepika et al. 9 developed a health monitoring android application through which patients enter their information into their servers, which allows doctors to access their health information using the QR code during an emergency. The system supplies both the personal information and medical records of the patient.
In a previous study by Paokanta, 10 a filter and a hybrid classification technique were developed and used for classifying the β-thalassemia types. Another recent study investigated the design of an expert system that aimed at diagnosing and prescribing treatment for hypertension and anemia. 11 This study used Bayesian network to model the causes and symptoms of the conditions. The expert system was also designed to be user-friendly, such that the interface for the diagnosis had questions the users answer, after which the system returned hypertension and anemia diagnosis probabilistic values. However, the study did not include β-thalassemia. Moreover, a study by Jahangiri et al. 12 used tree-based diagnostic methods for the differential diagnosis of the β-thalassemia carrier state from iron deficiency anemia. However, this method was used to differentiate between the β thalassemia carrier state and iron deficiency anemia. Six tree-based algorithms were applied, and red blood cell count, total hemoglobin, hemoglobin A2, hematocrit, platelet count, mean corpuscular volume, mean corpuscular hemoglobin, and red cells distribution width were used as independent variables. The result showed that the mean corpuscular volume was an important variable in differentiating between the β-thalassemia carrier state and iron deficiency anemia. Thus, computer-assisted determination systems have become increasingly important in supporting physicians. The literature mentions a variety of web-based expert systems. 3 However, a web-based expert system with a QR code for β-thalassemia patients that will support their life span healthcare has not been considered previously.
The main question posed in this study is how technologies can improve β-thalassemia management. Three important issues need to be considered in this inquiry: (i) Outpatient appointments can be missed, and β-thalassemia patients who frequently miss medical appointments have poorer health outcomes; (ii) Physician intervention is required after each regular assessment to adjust and make proper decisions around treatment before any major complications occur; and (iii) β-thalassemia patients require lifelong blood transfusions. Therefore, numerous tests are required to follow up β-thalassemia patients. Tracking the medical history of patients online can assist other healthcare providers to focus on conducting accurate physical examinations for ongoing patient care. Technical solutions can also provide real-time access to patient-related information, such as reports, medical records, diagnosis, medications, and appointments. For example, an expert system that works as an appointment reminder can help to reduce missed appointments. It can also support the physical examination by recommending the best treatment based on the patient’s tests. In addition, patients can access their private medical health records by using a QR code, and the pertinent information can be available on request by other physicians or healthcare providers. Physicians are thereby assisted to focus on their patients and provide effective, coordinated care with other specialists in order to plan coherent, tailored treatment plans.
Methods
The Software Development Life Cycle (SDLC) is a framework that defines the steps involved in software development at each phase in order to deliver a high-quality product. The proposed website includes four subprojects: expert system, reminder system, information extraction from reports, and data accessibility by QR code. In Figure 1, the web-based expert system components are demonstrated. The following are the descriptions for each subproject and its development phases.

The Web-based expert system components. The diagram shows the users (patients, healthcare providers, and physicians), expert system (knowledge base, inference engine, user interface, knowledge engineering, database), reminder system, extraction of information, and QR code.
Web-based expert system development
According to Dokas, 13 by combining an expert system and website developing technologies, web-based expert systems can be created. Developing a web-based expert system requires an understanding of the basic concepts underlying such system development and the principles of web engineering. The merging of knowledge in both these areas produces the following framework. First, the knowledge engineers study and analyze medical problems by asking medical experts unstructured questions to address the needs of the web-based expert system in terms of treatment management. This knowledge acquisition process is carried out through interviews between knowledge engineers and field experts. Second, the information gained during the acquisition of knowledge is modeled in flowcharts, and field expert verification is needed before applying the knowledge in the expert system design phase. Third, the design phase includes the entire expert system development process (knowledge base, inference engine, and user interfaces). Fourth, changes made over the whole process of the expert system prototype development force website design changes and vice versa. Fifth, implementation of the expert system interfaces, database, and website pages. Sixth, a validation and verification process of the expert system is conducted, during which some problems may be identified by the medical experts. Finally, the means for improving and maintaining the website or expert system needs to be built into the website design and entire expert system development process and vice versa.
Knowledge acquisition
During this phase, the knowledge engineers identify and capture knowledge relevant to β-thalassemia and study the nature of the medical domain in more detail. In this study, two techniques were used to explore the medical domain: conducting interviews and reviewing the treatment guidelines. The interviews were held at King Abdulaziz University Hospital with three hematologists (G. Zaher, S. Alnajjar and A. Barefah, Nov. 11, 2019, personal communication). The expert’s knowledge and experience might reveal the difficulty of following up on the patient’s condition in cases where regular appointments for physical assessments are needed to support the patient’s healthcare needs. The β-thalassemia patient needs to undergo frequent laboratory tests because the results of the tests can assist clinicians to decide which treatment plan should be applied. Clinicians use guidelines to treat patients after assessments, and these include many medical rules and detailed information.
A medical guideline is an important document that outlines the criteria regarding diagnosis, management, and treatment. At King Abdulaziz University Hospital, clinicians use the guideline published by Thalassemia International Federation and is available at the Thalassemia International Federation Web site. 14 The guideline features the most prominent clinical morbidities commonly encountered in β-thalassemia patients, treatment recommendations, and clinical expertise in treating β-thalassemia patients. Thus, collecting knowledge and using the knowledge base allow distribution of expertise. The knowledge will be easy to update, and it will be available to access any time. However, there are several limitations that should be considered: (i) knowledge is limited to a very specific domain, (ii) it is very hard to extract knowledge from experts especially if we need a creative response as human expert with unusual circumstances, 15 and (iii) in routine clinic practice, the way a disagreement among different clinical opinions can or should be resolved is often unclear. 16
Knowledge modeling
The declarative knowledge formed a hierarchical representation of the data. A flowchart was used to represent the knowledge gained from the interviews with experts and the thalassemia guideline. Draw.io software was then used to model the thalassemia guideline to extract the logical rule (if-else-then).
Iron overload is the major cause of morbidity for β-thalassemia patients. 17 Even nontransfused patients develop iron overload secondary to the increased intestinal absorption of dietary iron and ineffective erythropoiesis. In infants, chelation therapy may be delayed to beyond the first year because of the known toxicity of such agents in young children. The decision to use chelation therapy is based on the total amount of blood transfused, ferritin levels, and the degree of iron loading based on liver iron concentration (LIC). CardiacT2* mapping is a non invasive Magnetic resonance imaging (MRI) technique used to determine iron load in the heart. The lower the value, the higher the iron load. Cardiac T2* greater than 20 ms is not associated with normal cardiac function. Values between 10 and 20 ms suggests excess iron in the heart and is a sign of possible cardiac dysfunction. T2* value below 10 ms, is associated with high risk of cardiac failure, and it is considered as an indication for starting aggressive chelation. There are three types of iron chelation agents: desferrioxamine B (DFO), deferiprone, and deferasirox. Chelation drugs can also be used in combinations. The use of DFO and deferiprone combinations has been successful in those patients with severe iron overload. 18 However, over recent years deferasirox has also gradually been used in combination with one either DFO or deferiprone. 19 The treating physician decides on a suitable treatment options based on the patient’s age and iron load evaluation, as shown in Figure 2.

Flowchart describes the treatment plan based on age and ferritin level. Ferritin*: use the average of 3–5 ferritin measurements to determine the direction of change in iron. DFP: Deferiprone, DFO: Desferrioxamine, DFX: Deferasirox, MRI: Magnetic resonance imaging, SC: subcutaneous, and OR*: if not adequate improvement on DFO SC.
If the patient is over 5 years, then the treatment plan can be changed based on the cardiac T2* value, as shown in Table 1.
Recommended chelation therapy and monitoring.
Intensive chelation: consists of at least 12 h of DFO per day, 7 days per week, or the maximum tolerated DFX, as well as consideration of combination therapy.
Aggressive chelation: 24 h DFO therapy in a combination of DFO and DFP or DFO and DFX.
Knowledge verification
This stage focuses on the quality assurance of the flowchart. The feedback process was performed by three domain experts, and a majority vote was taken to solve any conflicts in opinions. After reviewing the flowchart, all the comments were addressed to match the correct knowledge.
Reminder system
The reminder system assists in managing the follow up process in β thalassemia patients. The regular assessments of the efficacy of transfusion and chelation therapy and its side effects includes physical examination, assessment of liver function tests, serum ferritin concentration determination, assessment of growth and development for pediatric patients, and assessment for liver and heart iron with MRI which could be required every 2, 3, 6, or 12 months. Figure 3 shows the assessment of the medical evaluations based on patient age, which is monitored closely throughout the person’s life. Figures 4 to 6 show the details of the monitoring for side effects. The reminder system is used to send notifications for upcoming assessments. All the flowcharts are part of the knowledge base that physicians consider in recommending treatment plans for patients, and the expert system monitors upcoming appointments and sends notifications to the patients.

Flowchart describes the evaluations based on patient age.

Monthly and three-month follow-up assessments.

Biannual follow-up assessments.

Annual follow-up assessments.
Inference engine
The forward chaining inference engine takes the initial facts that are first processed and uses the rules to draw new conclusions from those facts. The inference is implemented in the website and acquires and manipulates the patients’ data, the facts stored in the database, and the guidelines in the knowledge base to recommend the treatment plans, the required tests, and the next assessment appointments.
Information extraction
The laboratory information system (LIS) 20 is used to control and manage samples, test results and reports in clinical laboratories. The system has three process: pre-analytical, analytical and post analytical. The first process includes test requests by doctors, specimen collection by nurses, request management by specimen processing service. Secondly, after the test is performed, the technologist reports the test results. Finally, the results are reviewed by doctors. Information can be exchanged between different systems within the hospital or between different health organizations via internet connection. The web-based expert system accepts two methods for inputting the patients’ data: the PDF laboratory report that can be sent from LIS as an electronic report, or manual entering by physicians. The first approach is to extract the laboratory results from the laboratory report. The report can be generated by the laboratory information system (LIS) in the form of the Portable Document Format (PDF) which is developed by Adobe. The automated solution for PDF data extraction is called optical character recognition (OCR). The OCR converts images of printed text from a scanned document to machine-coded text in an electronic or mechanical way. 21 The web-based expert system thereby allows clinicians to import patient details and test results from a PDF file. However, the physicians might prefer to enter the information manually, as the automated extraction might convert the information with errors. Therefore, the manual approach is enabled in the website.
QR code for data accessibility
The system starts when a patient gives other healthcare providers the QR code to check the previous tests, reports, and medications. The QR code encodes the URL for each patient and can be read by a QR Code Scanner, Smartphone (where a QR Code app is installed), or desktop application. When the QR code has been successfully decoded, a four-digit randomized password is requested from the other healthcare providers to provide them access to a patient’s profile. Then, the patient’s personal information interface is shown, and the licensed physician can log in to read the patient’s health history. The physician is able to view and update patient data per single login, and any new information is saved in the database.
Through the better data usability provided by this system, more complete patient data can be accessed and used by healthcare providers. In addition to allowing data to be shared with other healthcare providers, the system is paperless, saves time, and avoids test repetition.
Implementation
The web-based expert system was implemented in Visual Studio. The database consisted of the collection of facts that matched the first parts of the (if-else-then) rules in the knowledge base and was developed using the SQL Server. The database also stored personal patient data. The inference engine was coded by the C# language. The implementation of interfaces varied based on the services provided to the users of the website (log-in authority). There were two users: physicians and patients. The patient’s pages included their login information, personal page, current treatment, appointments, and medical history. The medical history showed the previous treatment plan and all the previous assessments (X-rays, tests, and results). The physician’s pages included summaries of current treatments and the patient’s health history as well as those for adding a new treatment plan, a new medical assessment request, and so on.
The reminder system was implemented with Windows Services and Topshelf. Windows Services has a process that runs continuously in the background. Topshelf is a framework that makes it easy to launch Windows Services written in .NET. Windows Services checked the appointments in the database every day, and if a patient had an appointment the next day, the system sent a reminder. To extract the information from the PDF document, two libraries were used in Asp.net MVC. The first one was SautinSoft to convert the PDF into an image, and the second was Tesseract library to read the image and convert it into text. The QRCoder library was also used, which is written in C# language, to generate the QR code for the website. The QRCoder object was implemented in the patient controller, and the HTML code was used to display the QR code on the patient page. The bitmap object was used to organize and store a QR image defined by pixel data.
Validation and verification
System verification ensures that specific subsystems meet their design requirements while the system validation is to demonstrate that the overall system satisfies the requirements under realistic conditions. For validation, a more systematic approach is to objectively test the agreement between the expert system and an expert medical practitioner. 22 The web-based expert system recommendation result was tested using data from the FerriScan Case Study Booklet 23 to compare the expert’s selection with the expert system recommendation. The first case was a 22-year old male with β thalassaemia dependent on blood transfusion 3 to 4 weekly ever since the age of 4 months. Pretransfusion Hb levels should be 90–105 g/L in patients with TDT, and post-transfusion Hb levels should not exceed 140–150 g/L . 24 The initial therapy with iron chelation consisted of subcutaneous (SC) desferrioxamine (DFO) 5 days a week. However, DFO chelation was not effective, with the concentration of ferritin staying elevated at 1000–2000 ng/mL from 1999 to 2006. In 2006, at age 18, he complained of persistent palpitations, a 24-h tape showed atrial fibrillation. A transthoracic echocardiogram was normal with negative adenosine challenge. Cardiotoxicity due to iron overload was suspected but he failed to turn up repeatedly for three cardiac MRI appointments. T2* has been 4.2 msec. Since 2006, levels of serum ferritin have consistently reached 2000 ng/mL. In 2006/2007, his iron chelation therapy was modified to deferasirox at a daily level of 30 mg/kg.
The case was considered in two phases. In the first phase, iron chelation therapy began before 2 years of age. He had received blood transfusions more than 10 times because he had been receiving blood transfusions every 3 to 4 weeks since the age of 4 months. Ferritin level was not tested when he was 2 years old, but serum ferritin levels remain high at 1000–2000 ng/mL from 1999 to 2006. In the second phase, at the age of 18, therapy was switched to deferasirox because his T2* was 4.2 msec. Dosage began at 10 mg/kg daily, and the effectiveness of chelation therapy was monitored by routine determination of serum ferritin concentration. The dose was increased to 30 mg/kg daily because serum ferritin concentration remained high. In Figures 7 and 8, the rule diagram to trace the rules followed by the expert system is demonstrated. It shows the agreement between the expert’s choice of treatment (Prof. Swee Lay Thein, Prof. of Molecular Haematology, King’s College London and Consultant Haematologist at King’s College Hospital NHS Foundation Trust) and the expert system’s recommendation therapy.

Rule diagram for the first phase in patient treatment.

Rule diagram for the second phase in patient treatment.
The automated tasks of the system are:
To assist patients in managing transfusion therapy procedures at a different healthcare provider.
To assist in the control of iron overload, assessment of iron overload, and iron chelation.
To remind the patients about routine tests and appointments.
To use QR code technology to enable multi-platforms data access points.
To update and share complete, up-to-date lifetime patient records.
Conclusion
Technology can enhance the management of β-thalassemia. The web-based expert system provided patient-related details, such as reports, medical records, diagnosis, medicines, and appointments, in real-time. The system served as an appointment reminder and thereby reduced missed appointments. Additionally, the expert system can support physicians by recommending the appropriate care based on patients’ test evaluations. β-thalassemia patients can access their health history by using a QR code, which also makes communication and information available on request by other physicians and healthcare providers. The system scheduled outpatient appointments and sent reminder messages for medical appointments. By using the website after routine assessments, physicians can change treatment plans and make appropriate decisions, as recommended by the expert system. Physicians can also communicate with their patients and provide effective care with personalized treatment plans.
A limitation of the web-based expert system is its lack of precision in defining a proper treatment for some health problems compared to a group of medical experts. In addition, the validation case is just a preliminary indication of what the software can do rather than indicating conclusions which clinicians must follow. In the future, the expert system will be expanded to cover all the possible medical complications of β-thalassemia, such as splenomegaly, in order to provide the full range of services these patients require.
Footnotes
Acknowledgements
The authors wish to thank the anonymous reviewers and the associate editors for their critical comments and suggestions on a previous draft of this paper.
Author contributions
Conceptualization, H.B.; Methodology, H.B., H.A., A.A., and G.A.; Software, H.B., H.A., A.A., and G.A.; Validation, H.B., H.A., A.A., and G.A.; Investigation, H.B., H.A., A.A., and G.A.; Resources, H.B., H.A., A.A., G.A., H.A., S. B., A.B, S.A., and G.Z.; Data Curation, H.B., H.A., A.A., G.A., and G.Z.; Writing Original Draft Preparation, H.B.; Writing—Review and Editing, H.B., H.A., A.A., G.A., H.A., and G.Z.; Visualization, H.B., H.A., A.A., and G.A.; Supervision, H.B.; Project Administration, H.B.; Funding Acquisition, H.B.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This project was funded by the Deanship of Scientific Research (DSR), King Abdulaziz University, Jeddah, under grant No. ( DF-388-165-1441). The authors, therefore, gratefully acknowledge the DSR technical and financial support.
