The critical necessity for sophisticated predictive maintenance solutions to optimize performance and extend lifespan is underscored by the widespread adoption of lithium-ion batteries across industries, including electric vehicles and energy storage systems. This study introduces a comprehensive predictive maintenance framework that incorporates real-time health diagnostics with state-of-charge (SOC) estimation, utilizing an Improved Random Forest (IRF) algorithm to address the current limitations in battery management systems. The framework integrates physics-informed methodologies with data-driven machine learning models to facilitate the dynamic assessment of battery health and the production of precise predictions. This is achieved by analysing features such as SOC, energy efficiency, and capacity decline. The IRF algorithm outperforms state-of-the-art methods such as Gradient Boosting and standard Random Forest, obtaining the lowest Root Mean Square Error of 1.575 and a R