Judge clamps strict limits on spending by hospital