A 63-year-old Cree man living on-reserve presents with chronic cough, night sweats and 5 kg unintentional weight loss over 3 months. He has a history of type 2 diabetes mellitus. Chest radiograph shows an upper lobe infiltrate with cavitation. What is the most appropriate next step in diagnosis?