Public hospitals must provide abortions on site, judge rules