How do you perform a midstream urinalysis?

Mid-void. When you start to void, let that go into the toilet. After you've voided some, stop, put the cup in place, and provide a sample. There is no magic amount to void before you put the cup in place, just make sure you have enough urine left to submit for sampling.