The layoffs are part of the nonprofit health system's effort to restore its financial health after several years of losses.