В результате из двух должно получиться одно предложение. Например: There was nothing left for him to do. He decided to examine the patient. - There was nothing left for him to do but examine the patient (examine здесь инфинитив и используется без частицы to, так как есть союз but)
Думаю, имеется в виду такой вариант:
The woman was shocked to find out that she had to undergo an operation.