Monitoring of gas exchange in severely ill patients