
Fortunately I've never been in this situation. Would it be possible to clean/disinfect and then rinse the potty thoroughly before use, encourage your daughter to go (or wait until she is ready, depending on the situation) and pour a little into the cup (using a funnel or over the toilet). It's probably a bit messy, but if a soaked nappy doesn't contaminate the sample, a clean potty is unlikely to.

Anyway, your doctor should be able to give you an idea about how it is usually done.