A system for detecting dislodgment of a catheter or needle in a vascular access comprising a first and second catheter or needle in a blood vessel, fistula or graft, the system comprising: a first line fluidly connecting the first catheter or needle to an inlet of a pump; a second line fluidly connecting the second catheter or needle to an outlet of the pump; a first connector connecting the first line to the first catheter or needle, and a second connector connecting the second line to the second catheter or needle, each connector having an electrode in fluid communication with a fluid-carrying lumen of said connector; an electronic circuit electrically connected to the electrodes of the first and second connectors, and configured to measure electrical impedance of fluid between the first connector and the second connector via a conductive path through the blood vessel, fistula or graft; a controller configured to receive a series of sampled electrical impedance values from the electronic circuit, and to process the electrical impedance values as a signal and characterized in that the signal comprises a difference between a first filtered value of the impedance values using a first time constant and a second filtered value of the impedance values using a second longer time constant; wherein the controller is configured to: provisionally set a disconnection flag and initiate a counter if at a point in time the signal is greater than a first threshold value; clear the disconnection flag if the signal decreases to less than a second lower threshold value before the counter has reached a pre-determined count; and declare a vascular access disconnection if the disconnection flag is not cleared before the counter has reached the pre-determined count. a first line fluidly connecting the first catheter or needle to an inlet of a pump; a second line fluidly connecting the second catheter or needle to an outlet of the pump; a first connector connecting the first line to the first catheter or needle, and a second connector connecting the second line to the second catheter or needle, each connector having an electrode in fluid communication with a fluid-carrying lumen of said connector; an electronic circuit electrically connected to the electrodes of the first and second connectors, and configured to measure electrical impedance of fluid between the first connector and the second connector via a conductive path through the blood vessel, fistula or graft; a controller configured to receive a series of sampled electrical impedance values from the electronic circuit, and to process the electrical impedance values as a signal and characterized in that the signal comprises a difference between a first filtered value of the impedance values using a first time constant and a second filtered value of the impedance values using a second longer time constant; provisionally set a disconnection flag and initiate a counter if at a point in time the signal is greater than a first threshold value; clear the disconnection flag if the signal decreases to less than a second lower threshold value before the counter has reached a pre-determined count; and declare a vascular access disconnection if the disconnection flag is not cleared before the counter has reached the pre-determined count.