They have the same pinyin, but I have had an interesting issue when using my phone's voice-to-speech feature.
My Chinese friend can say a sentence involving 医生 and it comes up correct for him, however when I say it, maybe it's because of my accent but it comes up as 一生 even though the tones I use are the same.
I would get it right if I say 医生 on its own, but as soon as I add even a little behind it (e.g. 他们的医生) it would come up as 一生