One patient in Tayside waited 2,049 days for a hip replacement, according to figures released by the NHS.