Dialysis system designed to perform a defined treatment in order to achieve a collection of objectives, the dialysis system being designed to perform several successive cycles having an injection phase, a stasis phase and a drainage phase and comprising: • a processor designed to control the dialysis system according to at least two modes of operation: ▪ a mode of normal operation determined by a first collection of parameters making it possible to achieve substantially all of the objectives defined by the treatment; and ▪ several modes of safe operation determined by several collections of parameters that do not allow all of the objectives defined by the treatment to be achieved but that do allow the treatment to be performed substantially; • a sensor designed to send signals to the processor, • a pump controlled by the processor and designed to displace a medical fluid to and from the peritoneum of a patient in which the processor is configured for: - determining at least one condition of operation, - actuating the pump, - receiving and analyzing the signals from the sensor, - automatically selecting the mode of normal operation or one of the modes of safe operation according to the signal analysis and/or said at least one condition of operation, - controlling the dialysis system according to the mode of operation selected. • a processor designed to control the dialysis system according to at least two modes of operation: ▪ a mode of normal operation determined by a first collection of parameters making it possible to achieve substantially all of the objectives defined by the treatment; and ▪ several modes of safe operation determined by several collections of parameters that do not allow all of the objectives defined by the treatment to be achieved but that do allow the treatment to be performed substantially; ▪ a mode of normal operation determined by a first collection of parameters making it possible to achieve substantially all of the objectives defined by the treatment; and ▪ several modes of safe operation determined by several collections of parameters that do not allow all of the objectives defined by the treatment to be achieved but that do allow the treatment to be performed substantially; • a sensor designed to send signals to the processor, • a pump controlled by the processor and designed to displace a medical fluid to and from the peritoneum of a patient in which the processor is configured for: - determining at least one condition of operation, - actuating the pump, - receiving and analyzing the signals from the sensor, - automatically selecting the mode of normal operation or one of the modes of safe operation according to the signal analysis and/or said at least one condition of operation, - controlling the dialysis system according to the mode of operation selected. - determining at least one condition of operation, - actuating the pump, - receiving and analyzing the signals from the sensor, - automatically selecting the mode of normal operation or one of the modes of safe operation according to the signal analysis and/or said at least one condition of operation, - controlling the dialysis system according to the mode of operation selected.