If a doctor saw a patient on Shabbat, such as a doctor or midwife who was called to deliver a baby on Shabbat, may he or she receive payment for the work performed on Shabbat?
As a general rule, it is forbidden to work for money on Shabbat, unless one is also paid for services provided during the week. And thus, for example, a Rabbi may certainly receive a salary for the work he performs on Shabbat, since he also works during the week. Likewise, if a doctor receives payment for monitoring a woman throughout her pregnancy and birth, he may certainly be paid also for delivering the baby on Shabbat, since this payment is received "Be’habla’a" – meaning, it is included together with the payment for his weekday work. The question, however, arises in the case of a doctor who tends to a patient only on Shabbat, such as in an emergency, and now wants to receive payment for his services.
Hacham Ovadia Yosef, in Hazon Ovadia (vol. 6, pp. 3,8; listen to audio recording for precise citation), writes that a physician may receive payment for providing services on Shabbat, because this is considered a Misva. He explains that receiving payment for work performed on Shabbat is forbidden only by force of Rabbinic enactment, and the Sages did not apply their decree to services that constitute a Misva. Thus, for example, Hazanim may receive payment for leading the prayers on Shabbat even if they do not perform any service for the congregation during the week. By the same token, Hacham Ovadia writes, tending to an ill patient is a Misva, and therefore it is not included in the prohibition against working for pay on Shabbat.
Summary: A doctor who tends to a patient on Shabbat may receive payment for his services because this constitutes a Misva, just as a Hazan who works only on Shabbat may receive payment for his services.