New figures show people in Scotland are spending a greater proportion of their life in poor health than previously.