If 'poisonpickup' is a subclass of the healthvial-pickup you're replacing ... then you simply make sure you're not replacing a poison-pickup ...
Or maybe you need '(Other.Isa("PoisonPickup.PoisonPickup") == False)
if ( (MiniHealthPickup(Other) != None) AND (frand()<=0.1) AND (PoisonPickup(Other) == None))
ReplaceWith( Other, "PoisonPickup.PoisonPickup");
That's for you to decide.
I have slightly more complicated code in my powerpills-mutator.
I replace 1 in X adrenaline pills with my powerpills and eliminate the rest ...