Delirium is a common manifestation of severe acute neuropsychiatric dysfunction prevalent in hospital settings, which due to the complex multi-factorial causes is often under-diagnosed and neglected. Early detection of delirium is a critical concern that can be effectively addressed using machine learning (ML) techniques. As such, some methods to improve the accuracy of ML classification models for the detection of delirium are covered in this document. The aim of this paper is to develop and validate a tool for use in a hospital setting to accurately identify delirium during the admission of a patient. A database collected at a Portuguese hospital between 2014 and 2016 was used to conduct this experimental research. Available data comprised 511 records and 124 variables, including patient demographics, medications administered, admission category, urgent admission, hospitalization period, history of alcohol abuse and laboratory results. The methodologies used included data pre-processing, data imbalance processing, feature selection, train and test model with different ML classifiers, evaluating model performance and development of a Python web-based application. The model achieved consists of 26 predictors assessed during admission to a healthcare facility. This model combines the SelectFromModel method with the logistic regression algorithm, resulting in an area under the receiver operating characteristic curve of 0.833 and an area under the precision-recall curve of 0.582. Although the prediction model can be enhanced, this approach could be a useful support tool to identify patients at increased risk for delirium in healthcare settings. The application developed is available on: https://bit.ly/3waT3T7.