how long does it take to become a doctor after being a nurse