I think court-martial is a bit harsh. Given the limited duty pregnant soldiers are put on I would say add the amount of time of pregnancy and maternity leave to the end of their service requirements; therefore extending their active duty time to "pay back" the time missed during combat. It's a contract flaw on the military as far as I am concerned. If they put this in from the get go then there will be less individuals to worry about.
Yes, at that point in time it leaves the command in combat short handed, but it's no different than if a soldier gets wounded and is unable to perform his/her duties. Either situation leaves the command with limited resources. They replace the wounded, they can replace the pregnant. This will also keep the unnecessary paperwork pile down.
Tell me your thoughts on this.