The aims of this study were to : ( @ ) construct an algorithm for the diagnosis of delirium using the Geriatric Mental State ( GMS ) examination ; ( @ ) test the criterion validity of this algorithm against mortality and dementia risk ; ( @ ) report the age-specific prevalence of delirium as determined by this algorithm .