At baseline , the CDS groups differed in median length of stay on the ward , urine incontinence and dementia ( all P < 0.001 ) ; participants in the low CDS group stayed longer , had more frequent urine incontinence and more dementia .