A pump cassette comprising a midplate interposed between a top plate and a bottom plate, the midplate comprising: a first port on a first end of the midplate connected to a first fluid channel, and a second port on a second end of the midplate connected to a second fluid channel, each said fluid channel defined by the midplate and the top plate; a pump, comprising a flexible pump diaphragm configured to cover an aperture in the midplate, the pump diaphragm separating a pumping chamber between the pump diaphragm and the top plate from an actuation chamber between the pump diaphragm and the bottom plate; and an inlet valve and an outlet valve, each valve comprising two valve ports connecting a first side of the midplate facing the top plate with a second side of the midplate facing the bottom plate, a flexible valve diaphragm configured to cover the two valve ports and to separate a valve actuation chamber between the valve diaphragm and the bottom plate from a valve fluid chamber between the valve diaphragm and the midplate; wherein a first valve port of the inlet valve is connected to the first fluid channel, and a second valve port of the inlet valve is connected to an inlet of the pumping chamber, and a first valve port of the outlet valve is connected to the second fluid channel and a second valve port of the outlet valve is connected to an outlet of the pumping chamber.