Your statement infers that the fetus's viability factors into this in some manner.
It seems that the law was open to interpretation - since November 28 the hospital has been complying with what they thought the law said. Maybe I am a bit cynical, but is it not possible that the judge was influenced in his decision by the knowledge that the fetus was not just inviable, but damaged?