A Yorkshire hospital has been upheld as a national example for drastically slashing its waiting lists, with the Prime Minister praising the efforts of staff.