Clinical and functional patient characteristics predict medical needs in older patients at risk of functional decline