Artículo relevante ya publicado. Revista de publicación: Pervasive and Mobile Computing Available online : 24 May 2016 Numero: 34 Páginas: 106 – 125 DOI: http://dx.doi.org/10.1016/j.pmcj.2016.05.001 Factor de impacto: JCR 2.079, SJR 0.872, IPP 2.289, SNIP 2.051 Abstract: With the increase in the elderly population, there is a concomitant growth in the number of cases of cognitive impairment. The early stages of these disorders can cause the elderly difficulties in performing their daily activities. To improve their independence while keeping their caregivers informed, this paper presents a monitoring system that focuses on the use of rich contextual information to detect a wide variety of a cognitively impaired persons routines and deviations from those routines. A detailed architecture of the system is presented together with an in-depth description of the algorithms for the identification of routines and deviations. In an experimental test with students, the algorithms identified some 91% of the routines and some 96% of the deviations.