Why do nursing homes improperly medicate residents?

Why do nursing homes improperly medicate residents?