Introduction: Electrocardiogram (ECG) interpretation remains a cornerstone of cardiovascular diagnostics. However, the manual analysis of digital traces can be time-consuming and subject to inter-observer variability. This study presents a computational tool designed to automate the extraction of cardiac parameters and provide a preliminary diagnostic classification based on clinical guidelines.
Methodology: The system was developed in Python, utilizing the NeuroKit2 library for digital signal processing. To ensure robustness, the algorithm was tested using the "A Large-Scale 12-Lead Electrocardiogram Database for Arrhythmia Study" (PhysioNet). The tool performs R-peak detection, calculates heart rate, measures the PR interval to identify first-degree atrioventricular blocks (AVB), and determines the electrical axis. An expert rule-based AI system then processes these findings to identify specific conduction disturbances or potential structural-related alterations based on clinically validated thresholds.
Results: The developed algorithm utilizes an expert rule-based framework aligned with contemporary clinical evidence to perform a pre-diagnosis and issue risk alerts based on electrocardiographic (ECG) parameters. The classification is based on the premise that certain combined abnormalities are not isolated benign findings, but rather clinical indicators associated with a higher probability of underlying or progressive pathologies. For instance:
• A PR interval greater than 270 ms is established as a critical indicator associated with a higher risk of heart failure.
• Patients are categorized as "High Risk" when they simultaneously present a severely prolonged PR interval, bradycardia, and left axis deviation. This specific combination suggests the coexistence of both a conduction defect and a potential structural problem, which demands a deeper medical analysis.
Conclusion: By integrating international databases (PhysioNet) for training and local clinical expertise for evaluation, this AI-driven tool provides a reliable Clinical Decision Support System (CDSS). Through an expert rule-based framework, the system automatically cross-references key ECG parameters—such as axis deviation, rhythm, frequency, and PR interval duration—to determine a pre-diagnosis (e.g., BAV1G) and assign corresponding risk tiers (High, Medium, Low). The system successfully identifies critical combinations, such as a severely prolonged PR interval (>270 ms) paired with bradycardia and a left axis deviation, to accurately trigger 'High' risk alerts. This automated screening optimizes patient triage and clinical referral workflows by highlighting potential underlying structural and conduction abnormalities without relying on unvalidated long-term prognostic assumptions