The primary objective with the COSMOS trial is to improve the QoL in NH patients by enhanced communication in form of ACP, proactive assessment and treatment of pain, discontinuation of unnecessary medication and organization of activities. The secondary objective is to determine the effectiveness by core outcome measurements of mental and physical health, pain, sleep, safety, total drug use, hospital admission and cost-effectiveness. We also investigate how successful the implementation process was and staff satisfaction.