To address the critical spatiotemporal imbalance of medical resource supply and demand, as well as the pervasive issue of system congestion in modern smart healthcare environments, this paper proposes a comprehensive closed-loop management model that seamlessly integrates demand time-series forecasting with resource allocation decision optimization. First, utilizing extensive patient admission logs and detailed bed utilization records extracted from the widely recognized MIMIC-IV clinical database, we construct robust, multi-dimensional time-series feature engineering. A sophisticated combined XGBoost machine learning model is subsequently employed to accurately predict medical service demand for future operational periods. This predictive framework effectively captures the complex, non-linear fluctuation patterns characteristic of patient arrival rates in dynamic clinical settings. Second, based on these highly accurate prediction results, a rigorous bi-objective resource scheduling optimization model is established. This model is specifically designed to simultaneously minimize patient waiting costs and maximize overall resource utilization rates across various hospital departments. Furthermore, a dynamic recommendation mechanism is introduced to automatically generate optimal scheduling and bed allocation schemes tailored to real-time conditions. Finally, comprehensive simulation experiments conducted using the MIMIC-IV demo data conclusively demonstrate that, when compared with traditional fixed allocation modes, the proposed integrated model significantly reduces patient queue waiting times. Moreover, it substantially improves the overall operational efficiency and adaptability of medical resources, thereby providing vital, data-driven decision support for the refined, sustainable management of next-generation smart hospitals.