NYC hospitals avoid layoffs