A 35-year-old man attends the emergency department in an area of high HIV prevalence with a history of recurrent sexually transmitted infections. He presents with a chest infection and is being admitted. According to current guidance, which approach to HIV testing is most appropriate?