This document presents a patient treatment time prediction (PTTP) algorithm designed to enhance patient queue management in hospitals through accurate waiting time predictions. It utilizes a large dataset from multiple hospitals to develop a treatment time model and proposes a hospital queuing-recommendation (HQR) system that suggests efficient treatment plans via a mobile application. The implementation of the PTTP algorithm and HQR system on the Apache Spark cloud platform ensures real-time analysis and recommendation capabilities to minimize patient wait times.