The Halacha prohibits embarking on a ship on Thursday or Friday. Departing within three days of Shabbat is likely to impair one’s Oneg (enjoyment of) Shabbat. It may also create a life-threatening situation at sea, in which one would be forced to violate the Shabbat.
Based on this Halacha, the Poskim rule that one should not undergo non-emergency, elective surgery on Thursday or Friday. Here too, the recovery from such a procedure often entails discomfort on Shabbat and may even require medical intervention that would violate Shabbat. Performing the surgery earlier in the week would generally curtail the negative impact on Shabbat. Similarly, a Caesarian Section should also be scheduled, when possible, before Thursday.
Of course, in life threatening situations, the surgery should be performed even on Shabbat itself. However, even when there is no danger, an elective operation may be scheduled for Thursday or Friday in the event that doctor would not be available earlier in the week or other extenuating circumstances.
SUMMARY: It is prohibited to schedule non-emergency, elective surgery for Thursday or Friday, unless there are extenuating circumstances.