Development and external validation of the electronic frailty index 2 using routine primary care electronic health record data