The judge said he didn't follow the correct procedure for what is effectively a move to deny patients care.