update logic for reports. fix infusion_id nil error