Spain 's current law allows a pregnancy to be terminated in three circumstances - in the aftermath of a rape , when a foetus shows genetic defects , and when the health of the pregnant woman is at risk .