IMPLEMENTATION OF A BASE OF RULES FOR DIFFERENTIAL DIAGNOSIS OF CLINICAL AND HEMATOLOGICAL SYNDROMES BASED ON MORPHOLOGICAL CLASSIFICATION ALGORITHM

: The evolving landscape of modern medicine underscores the growing importance of automating diagnostic processes. This advancement is not merely a convenience but a ne - cessity to harness the full potential of technological progress, aiming to elevate research and clinical outcomes to new heights. Among the innovative strides in this field, the development of diagnostic systems based on morphological classification algorithms stands out. Such sys - tems, rooted in comprehensive rule bases for differential diagnosis, promise to revolutionize the way we approach complex medical conditions. This paper introduces a cutting-edge sys - tem that epitomizes this evolution. Designed to harness the power of data analysis, it paves the way for groundbreaking research opportunities. At the heart of this system


Introduction (Literary review)
In recent decades, with the rapid advancement of medical technologies and information systems, there has been a notable increase in interest in developing effective methods for differential diagnosis in the realms of clinical and hematological syndromes.This heightened interest stems from the ongoing expansion of the spectrum of recognized hematological diseases and the continual enhancement of diagnostic methodologies.Given the escalating volume of diagnostic data, there is a need to establish dependable, swift, and precise systems for processing and analyzing such data.An encouraging direction in this field entails setting up a rule base for distinguishing diagnoses through the use of a morphological classification algorithm.Artificial intelligence, as described by Amisha et al. (2019), can play a pivotal role in medicine by offering advanced diagnostic tools and decision support systems that help in identifying subtle patterns in clinical data [1].
The field of hematology is continuously evolving, with an increasing amount of information emerging annually regarding various syndromes and their morphological characteristics.This situation necessitates accuracy and promptness in diagnosis, leading to the advancement of innovative computer techniques and systems.Passamonti et al. (2022) suggest that the future of research in hematology will likely integrate conventional studies with real-world data and artificial intelligence, enhancing the reliability and efficiency of diagnostics [2].
Current methods for differential diagnosis, primarily reliant on empirical data and the expertise of professionals, may not consistently meet the demands efficiently.Hence, the creation of automated systems capable of analyzing and categorizing extensive clinical data becomes imperative for enhancing the quality and availability of healthcare services.Salib et al. (2021) discuss the integration of the Scopio Labs x100 Scanner with artificial intelligence capabilities into routine clinical workflows, which exemplifies the practical application of AI in improving diagnostic accuracy in hematology [3].
As the volume and complexity of medical data increases, the utilization of information technologies, such as artificial intelligence (AI) and machine learning, to process this data becomes crucial.Kaestner (2020) highlights how AI is meeting the challenges of hematology by facilitating the processing of complex datasets and contributing to more refined diagnostic processes [4].The researchers also point out that, despite the active development of AI, rule-based systems remain popular and promising.Moreover, these systems are easier and more cost-effective to implement in medical process administration systems, which are not always equipped with modern technologies.The accuracy of rule-based systems in medicine can reach 80% -90%, and they can be easily customized by adding or removing rules and adjusting weights [5][6].The authors discuss the need for accessibility, widespread use, and a systematic approach in implementing such systems, including in mobile medicine [7].A rulebase, crucial for the performance of rule-based systems through its "IF-THEN" statements that store, manage, and manipulate data for modeling complex problems [8].These mechanisms are particularly useful in systems utilizing biological knowledge, as they enable the incorporation of information that is challenging to describe formally without disrupting the existing knowledge in the model [9].This importance is underscored in a study that emphasizes the necessity of establishing a rule base to address specific medical issues, particularly in the realm of advancing hematology and biochemical analyzers [10].
Anemia is prevalent in Kazakhstan, as indicated by the findings of the National Nutrition Survey conducted by the Kazakh Academy of Nutrition.The survey results revealed that over 40% of school-age children are affected by anemia.The incidence of anemia is notably high among children aged 12-14 years (49.4%),women of reproductive age (48.2%), and children aged 6-59 months (47.4%).It was discovered that in Kazakhstan nearly every third man (28.1%) also experiences anemia.Ryspekova (2019) discusses the role of heavy metals in the development of anemias, suggesting that environmental factors could be contributing to these high rates [11].Across the entire population, the prevalence of anemia stands at 41.9%, indicating that 6.5 million individuals in Kazakhstan are affected by this condition.In context of using the national electronic healthcare system Sakko et al. (2023) provide additional factor by highlighting related health issues such as spontaneous pregnancy loss, which could be influenced by nutritional deficiencies prevalent across the country [12].Bazarbaeva et al. (2021) further enrich our understanding by analyzing the morphofunctional and hematological characteristics of students from different regions of Kazakhstan, identifying regional disparities that might affect overall health outcomes [13].Khozhayev et al. (2023) discuss the organization of hematological care in the Republic of Kazakhstan, providing insights into the healthcare system's response to managing diseases like anemia and ensuring proper care is available throughout the country [14].These studies collectively illustrate a comprehensive picture of anemia's impact and the multifaceted approaches needed to address this widespread health concern in Kazakhstan.
In modern times, a significant volume of hematological medical data is collected through medical tests.Extensive research is underway to extract insights from this data utilizing data mining techniques.For instance, the authors conducted three experiments on a dataset 'test blood' employing three classifiers: decision tree, rule induction, and Naive Bayes [15].The findings indicated that the Naive Bayes classifier exhibits superior predictive capabilities for blood disorders compared to the other two classifiers.Utilizing deep machine learning for the indicators of clinical and hematological syndromes (CGS) will significantly enhance the efficiency of differential diagnoses.This advancement is crucial for the development of algorithms and software that power intelligent clinical decision support systems.Consequently, formalizing the rule base emerges as a vital component in innovating new, high-tech, and personalized strategies for the management and monitoring of CGS.
Modern technologies allow the establishment of relationships between peripheral blood parameters in both normal and pathological conditions.The significance of automating laboratory processes is underscored in the research by Ralph Dadoun, emphasizing the value of automatically validating results against rule-based parameters to enhance laboratory productivity [16].
Special focus is placed on morphological features in hematology.Automated blood analyzers used for differential diagnosis frequently overlook morphological correlations, which are crucial for the diagnosis [17].Chinese researchers have utilized AI-based tools to extract morphological features of lymphocytes for the analysis of chronic lymphocytic leukemia, demonstrating the potential for automation in this domain.
Indian scientists employ hemoglobin and hematocrit levels as input data for an expert system to identify anemia in children [18].Researchers from Australia and Ghana highlight the efficacy of using neural networks in classifying anemia and evaluating hemoglobin levels [19].Turkish scientists, utilizing four distinct artificial intelligence methods, achieved recognition accuracy rates of up to 85.6% in detecting anemia using hemograms and other patient information [20].
American researchers have developed an automated system for leukocyte classification based on morphological characteristics [10].The utilization of deep neural networks has significantly improved the precision of platelet classification according to their morphological features, achieving accuracies of up to 98.6%.Al-qudah and Suen demonstrated that through the use of enhanced incremental training techniques, the classification of blood cells in peripheral blood smears could be significantly improved, which supports these high accuracy levels [21].
Furthermore, Thinaharan and Thiagarasu describe a rule-based clinical decision support system for the healthcare industry, which integrates machine learning algorithms to further refine the accuracy and efficiency of medical diagnostics, including platelet classification [22].Implementation of a base of rules in medical information systems promises to streamline the diagnostic workflow, making it more accessible and efficient for healthcare practitioners [23].
The innovative aspect of this research centers on creating and deploying a database model and software components for the «Health Passport» Web portal.This portal is distinctive because it utilizes a medical algorithm for the differential diagnosis of clinical and hematological syndromes.
At the national level, the project's scientific innovation is underscored by its pioneering status in the Republic of Kazakhstan; it marks the first development of a Web portal, «Health Passport,» dedicated to diagnosing clinical and hematological syndromes.This portal is remarkable for implementing a three-stage differential diagnosis process, which is grounded in a morphological classification rule base: Stage 1 involves establishing the presence and severity of the syndromes; Stage 2 determines their nature according to the morphological classification; Stage 3 confirms and clarifies their nature using clinical biochemistry and enzyme immunoassay methods.
The global scientific novelty of the project stems from a rigorously scientific selection of diagnostic methods for clinical and hematological syndromes, anchored in the principles of a medical algorithm for differential diagnosis.The project's outcomes are poised to significantly advance the technological processes involved in the differential diagnosis of clinical and hematological syndromes.Furthermore, it will contribute to the monitoring of disrupted hemoglobin synthesis due to iron deficiency, a condition arising from various pathological (physiological) states and characterized by signs of anemia and sideropenia.
The core ambition of this investigation is to tackle a pressing challenge in the realm of clinical hematology -the enhancement of diagnostic methodologies for blood-related illnesses through the adoption of advanced computer technologies.

Rules for differential diagnosis of clinical and hematological syndromes
The diagnostic system for clinical and hematological syndromes relies on a morphological classification algorithm that facilitates disease identification, information storage for individual patients, official diagnosis formulation, and subsequent treatment selection [24].This information system enables an initial patient diagnosis, which is segmented into three stages, each guided by a specific set of rules.
The first diagnostic stage involves determining the existence and intensity of the clinical and hematological syndrome [25].This is based on the evaluation of the following six rules: 1) Rule for determining the level of pathology based on hemoglobin m HGB (1): ( where m HGB represents the level of pathology in relation to hemoglobin, and HGB denotes the hemoglobin measurement from the patient's sample. 2) Rule for determining the level of pathology based on the quantity of red blood cells m RBC (2): (5) where m RBC represents the level of pathology determined by the quantity of red blood cells, RBC indicates the result obtained from the patient's sample.
3) Rule for determining the level of pathology based on hematocrit m HCT (3): ( where m HCT represents the level of pathology determined by hematocrit, and HCT indicates the result obtained from the patient's sample. 4) Rule for determining the level of pathology based on the average hemoglobin content in a red blood cell m MCH (4): (4) where m MCH represents the level of pathology based on the average hemoglobin content in the erythrocyte, MCH indicates the result of the patient's sample.
5) Rule for determining the level of pathology based on the average volume of red blood cells m MCV (5): (5) where m MCV represents the level of pathology determined by the average volume of erythrocytes, and MCV indicates the result obtained from the patient's sample.
6) Rule for determining the level of pathology based on the average concentration of hemoglobin in a red blood cell m MCHC (6): (6) where m MCHC represents the level of pathology determined by the average concentration of hemoglobin in erythrocytes, MCHC indicates the result obtained from the patient's sample.
7) The rule for determining the severity of anemia M (7): 3. Associated with normocytic anemia.The rule for anemia to be classified as normocytic ( 17): (17) where Mnorm is the overall criterion for anemia's classification as normocytic ( 18): (18) In this case, the rules for determining the level of pathology based on the average hemoglobin content in the erythrocyte m MCH (19) and determining the level of pathology based on the average volume of the erythrocyte m MCV (20): The third stage is dedicated to confirming and specifying the type of anemia based on biochemical criteria, specifically ferritin (Fer) and vitamin B 12 : 1) Rule for determining anemia in chronic diseases (normocytic) ( 21): (21) where MACD represents the overall severity of pathology for anemia in chronic diseases, and Fer denotes the ferritin value obtained from the patient's sample results.
2) Rule for identifying iron deficiency anemia (microcytic and normocytic) ( 22): (22) where MIDA represents the overall severity of pathology for iron deficiency anemia, and Fer denotes the ferritin value obtained from the patient's sample results.
3) Rule for identifying B 12 deficiency anemia (macrocytic) ( 23): (23) where M B12 represents the overall severity of pathology for B 12 -deficiency anemia, and B 12 B12 indicates the value of vitamin B 12 from the patient's test results.
Therefore, the calculation stages presented above constitute the rule base of the developed system for detecting clinical and hematological syndromes, in particular anemia.
The developed rule bases will provide methodological (algorithmic) support to the computational and analytical modules of the "Health Passport" web portal's diagnostic software package for clinical and hematological syndromes (CGS).This software package, designed for the diagnosis of CGS within an electronic health passport framework, will automate clinical decision-making support.It accomplishes this through the use of differential diagnostic algorithms and models that facilitate the intelligent analysis of medical data.

Designing a database and web application based on a rule base.
The relational anemia diagnostic database was implemented in PostgreSQL using 'sequelize' for machine implementation.PostgreSQL is an open-source relational database management system (RDBMS) known for its extensibility and SQL compatibility.All background information, particularly data on hypoglycemia indicators and glycemic control monitoring, was obtained from MIMIC-III (Medical Information Mart for Intensive Care) [26].This extensive and freely accessible database contains de-identified health data for more than forty thousand patients who were in intensive care units at Beth Israel Deaconess Medical Center from 2001 to 2021.The portal supports numerous scientific and analytical studies, including the improvement of clinical decision-making processes, epidemiology, and the development of electronic tools, all of which currently benefit from a wealth of experimental data.
The application that interacts with the database was developed in express.js,serving as the back-end for the front-end, which includes functionalities for adding and reading records in the database.The machine implementation model of the database is illustrated in Fig. 1.Access to the system is provided via the "Health Passport" web portal.Each module within the system is accountable for a distinct stage.The sequential functioning of these modules is depicted in Fig. 2.  In the initial stage, data in Excel format is uploaded to the Health Passport.Table 1 displays a preview of the data in the "Data Collection" section, accessible to the administrator.The partially processed data is subsequently utilized for mathematical calculations to ascertain the presence of anemia.This involves reducing the data dimensionality through feature selection or identifying the most significant attributes for analysis.Data preprocessing is a critical stage in data analytics and machine learning, encompassing a series of operations to cleanse and convert raw data for analytical purposes [27].The pre-processing of loaded data incorporates the following procedures: • Elimination of noise and anomalies.Utilizing statistical techniques to detect and remove outliers.• Dealing with missing values.Addressing gaps by imputing mean, median, interpolation, or removing rows/columns with missing data.• Data error correction.Rectifying evident errors like typos or inconsistent category usage.
• Normalization and standardization.Standardizing all numerical attributes to a uniform scale to enhance the convergence of machine learning algorithms.The ultimate phase entails mathematical computations to identify the type of anemia based on morphological classification.
For each patient, a history of diagnoses and information regarding the indicators used for diagnosis is accessible; this section is illustrated in Fig. 4. The "Statistics" section aids to create visualizations of statistical patient data through charts and graphs.Graph construction can be based on variables like gender, anemia nature, anemia presence, anemia type, and year of birth.Filters can be applied to the selected data or custom filters can be created using SQL.Hence, generating statistics and utilizing a combination of NO-CODE technology requires only a basic understanding of database principles.For instance, Fig. 5 illustrates the outcome of statistical data in a chart format, with the condition "birth_ year" = 1982 applied.

Discussion
Comparison of the system proposed in this study with existing research demonstrates its superiority attributed to the utilization of a morphological classification algorithm, empowering a comprehensive analysis of the morphological features of blood cells.This highlights the potential of employing machine learning to augment our comprehension of biological and medical practices.
Nevertheless, the study is subject to several limitations.A primary concern is the restricted size and diversity of the training sample, potentially impacting the system's generalization capability.Subsequent investigations should contemplate enlarging the sample size to encompass a broader spectrum of clinical scenarios, thereby enhancing the system's accuracy and dependability.
Future research prospects entail the development and validation of algorithms for various hematologic conditions, alongside the integration of the system with electronic health passports to streamline the diagnostic process.Furthermore, it is imperative to explore the implications of making use of such systems on clinical decision-making and patient outcomes.

Conclusion
This study outlines the creation of an anemia diagnostic system that integrates a morphological classification algorithm with artificial intelligence and machine learning technologies.The findings reveal a notable enhancement in diagnostic precision and timeliness when compared to conventional approaches, emphasizing the value of incorporating advanced technologies into healthcare.
In conclusion, the research underscores the substantial potential of merging process rule base and machine learning in clinical diagnostics.The outcomes present promising opportunities for improving healthcare quality and availability, advocating for continued exploration and development of innovative diagnostic solutions.
Based on the advancement of clinical and hematological diagnostic methods, as well as their successful testing, implementation, and application, this study proposes a system designed to improve the process of diagnosing anemia.A system grounded in technological process rules is expected to strengthen the precision of the diagnostic process, with the ability to store collected data and results for subsequent research and the identification of new relationships between indicator combinations and disease detection.The developed system provides the effective analysis and classification of extensive clinical data, thereby improving the accuracy and efficiency of diagnosing hematological disorders.
The integration of modern technologies into clinical practice significantly contributes to improving the accessibility and quality of medical care.The findings of this study offer novel prospects for advancing and customizing diagnostic systems, emphasizing the significance of ongoing research in the application of artificial intelligence and machine learning in the medical domain.

Figure 2 .
Figure 2. The sequence of processes for data management within the system.

Figure 3 .
Figure 3.The main window of the web application for implementing the rule base

Figure 4 .
Figure 4. Patient diagnosis history window

Figure 5 .
Figure 5.The sample of web-portal visualisation

Table 1 .
Data Collection