The study has two phases: Phase B and Phase C. The purpose of the Phase B study is to determine the performance (sensitivity and specificity) of a smartphone application (DelApp) to identify delirium in the whole inpatient sample. The study also aims to determine the performance (sensitivity and specificity) of the DelApp to discriminate between delirium (with or without dementia) and dementia (without delirium).