Goosefoot, it's the law - quite simply, medical staff cannot force human beings with capacity to undergo medical treatment against their will.
As several people have pointed out, this is not clear-cut in the way that you seem to think.
I've been in a situation where HCPs did not take my medical desires seriously and refused. It sucks.
But consent in an emergency or emergent situation is not always a clear-cut thing. Especially if there seems to be reason to think the patient is unable to make a rational decision, because of fear or anxiety.
A doctor could face really serious legal and professional consequences for not acting in that situation, if things went badly. Removed from practice, even prison if it went that far.
Did the woman in that article really appreciate that if she refused a male carer, she might well have no help, and that could result in extremely serious consequences? I am not convinced she did, she seemed to have very little understanding of most of the decisions she was making, including the consequences of not seeking pre-natal care. She was stuck in magical thinking that somehow if things were just done as she wanted, everything would be fine, and still seems to believe it for that matter.
There are good reasons that consent in situations like that is not considered black and white. People come into ERs all the time needing care butt saying they don't want it, because they are in the middle of a trauma.