The Ambient Intelligence (AmI) paradigm represents the vision of the next wave of computing. By relying on various computing and networking techniques, AmI systems have the potential to enhance our everyday lives in many different aspects. One area in which widespread application of this innovative paradigm promises particularly significant benefits is health care. The work presented here contributes to realizing such promise by proposing a functioning software application able to learn the behaviors and habits, and thereby anticipate the needs, of inhabitants living in a technological environment, such as a smart house or city. The result is a health care system that can actively contribute to anticipating, and thereby preventing, emergency situations to provide greater autonomy and safety to disabled or elderly occupants, especially in cases of critical illness.