In mechanically ventilated patients metabolic gas exchange recordings are frequently influenced by routine patient therapy. In this study the influence of such artifacts is investigated and a method for automatic detection and suppression proposed. This method reduced the influence of artifacts on diurnal oxygen and carbon dioxide exchange from up to 10% to a maximum of 1%.