First, you need a little lesson of hydrodinamics.
http://dwarffortresswiki.org/index.php/DF2014:Pressure
AND
You can Channel next to the river.... or you can use a Screw Pump to move water 1z level up.... a dwarf with pump operating, or a connected water wheel/windmill to automatized the process (use a gear and a lever to stop the pump).
If the "pipe" is to long, make a screw pump next to the river and the fortress. You need the extra pressure to fill the pipe.
I think the "pipe" is a Channel or dig in the hole, not a real pipe section that is a component of screw pumps.
As seen in the image (number 2), break a river can make all your fortress at river level or below flooded. Make the water 1 level up is worse if the cistern have a hole.
A screw pump is a technique to build pump over pump, and remove a floor between them permit the power to flow, useful to permanent bring magma to the surface, but not so useful to 1 or 2 levels of pump, 2 dwarves can manage the pumps.
I don't understand your diagram, or your intentions to give more help.
You can't clean contaminants with water, only move them... or worse, see the next page.
http://dwarffortresswiki.org/index.php/DF2014:Contaminant
Sorry the Diagram isn't clear. Let me try again...
A...............................B
wwwwwwwwwwwwww
w C
w C
w C
So this is all on ground level (Main outdoor area). A is the river location.
B is my front gate and
C is my 5 (wide) and 20 (deep...North/South) Cistern enclosure. The bottom of the cistern is the main ground z-level. I've walled around it. So I want to fill up this 5x20 area with 7/7 water.
So, I need to move the water laterally from the river to the cistern wall. Then go up one (maybe two?) z levels to get "over" the wall in order to then fall down into the cistern to fill it up.
Keep in mind my cistern is inside my outer walls (w) as well.
And this isn't really to "clean" the water. It won't be a useable cistern (although I guess I could use it). I will dig an appropriate below ground well at some point. I just got the idea to make this kind of reflecting pool type thing that would bling up my entrance. And I figured it was a small enough mega-project to not kill me.