Scottish NHS faces uncertain future as demand outstrips activity