Type I and II respiratory failure