Under the assumption it only looks like you're crapping out weed as opposed to some strange looking shyt I couldn't imagine coming out someone's butthole, but I haven't thoroughly looked through a lot of people's feces and once mine was clay colored from an infection so who am I to know.
-Throwing up a lot can lead to dehydration can lead to altered mental status and electrolyte imbalance.
-Some infections can cause the same thing.
-Also obviously mania can cause lack of sleep and thinking you're crapping out weed, which given you're throwing up your meds might be likely as well.
Either way, if you're not having any other manic symptoms (abnormally energetic, impulsivity, hypersexuality, pressured speech, paranoia, starting projects and either getting hyperfocused on them or barely doing anything with them and moving on to something else, or whatever else you've noticed with specifically your past manic episodes), the first two would be more likely. Infections would show up on blood work, with other symptoms varying on the infection, and dehydration has other symptoms like headaches, not sweating, peeing less, being thirsty, irritable and/or confused, etc.
I'm obviously not a medical professional, but I've been around the bend a bit and just going based on what I've experienced or been told by docs.