Weeks of protests and walkouts by medical trainees in South Korea have prompted the government there to promise improved pay and working conditions.