Nitrofurantoin should be discontinued at term (38 weeks) due to potential for hemolytic anemia in the newborn.