Development and validation of an electronic frailty index using routine primary care electronic health record data