A judge has rejected a motion by the NSW government and 15 local health districts to shut down a class action by the relatives of overseas patients who were forced to serve as guarantors and hit with hospital bills worth tens of thousands of dollars.