A medical device determines operating situations and a method determines operating situations in a medical device. Based on pressure measured values (99) and flow measured values (97), it is determined whether an elevation of an airway pressure (105) in a medical device is due to a cough event (113) or to a plurality of cough events (117), which indicate an accumulation of secretion. An outputting (41, 42, 44) of a warning (44) or alarm (41, 42) is provided indicating the accumulation of secretion.