Nowadays, global public health crises are occurring more frequently, and accurate prediction of these diseases can reduce the burden on the healthcare system. Taking COVID-19 as an example, accurate prediction of infection can assist experts in effectively allocating medical resources and diagnosing diseases. Currently, scholars worldwide use single model approaches or epidemiology models more often to predict the outbreak trend of COVID-19, resulting in poor prediction accuracy. Although a few studies have employed ensemble models, there is still room for improvement in their performance. In addition, there are only a few models that use the laboratory results of patients to predict COVID-19 infection. To address these issues, research efforts should focus on improving disease prediction performance and expanding the use of medical disease prediction models. In this paper, we propose an innovative deep learning model Whale Optimization Convolutional Neural Networks (CNN), Long-Short Term Memory (LSTM) and Artificial Neural Network (ANN) called WOCLSA which incorporates three models ANN, CNN and LSTM. The WOCLSA model utilizes the Whale Optimization Algorithm to optimize the neuron number, dropout and batch size parameters in the integrated model of ANN, CNN and LSTM, thereby finding the global optimal solution parameters. WOCLSA employs 18 patient indicators as predictors, and compares its results with three other ensemble deep learning models. All models were validated with train-test split approaches. We evaluate and compare our proposed model and other models using accuracy, F1 score, recall, AUC and precision metrics. Through many studies and tests, our results show that our prediction models can identify patients with COVID-19 infection at the AUC of 91%, 91%, and 93% respectively. Other prediction results achieve a respectable accuracy of 92.82%, 92.79%, and 91.66% respectively, f1-score of 93.41%, 92.79%, and 92.33% respectively, precision of 93.41%, 92.79%, and 92.33% respectively, recall of 93.41%, 92.79%, and 92.33% respectively. All of these exceed 91%, surpassing those of comparable models. The execution time of WOCLSA is also an advantage. Therefore, the WOCLSA ensemble model can be used to assist in verifying laboratory research results and predict and to judge various diseases in public health events.