The male officer was treated at the scene by an off-duty doctor before NSW Ambulance arrived.