A method and apparatus for controlling blood withdrawal and infusion flow rate with the use of a pressure controller. The pressure controller uses pressure targets based upon occlusion limits that are calculated as a function of flow. The controller has the ability to switch from controlling withdrawal pressure to controlling infusion pressure based upon the detection of an occlusion. The controller distinguishes between partial and total occlusions of the withdrawal vein providing blood access. Depending on the nature of occlusion, the controller limits or temporarily reverses blood flow and, thus, prevents withdrawal vessel collapse or reverses blood flow to quickly infuse blood into the vessel without participation from operator.