Please try to relax. Are there any other symptoms b/c this doesn't sound too much like pups with liver shunts. 12 weeks is really young, he may have gotten into something around the house. I say this b/c TJ had mucus poops and blood ALL the time starting from when I got him at 12 weeks. We did blood work and it came back that his folate levels were high, the Vet said that meant and Over Growth of bacteria in his small intestines, IBD - Inflammatory Bowel Disease. We changed his diet to a single source protein (Duck and Potato) and since the Flagyl didn't work for TJ, the Vet tried Tylan Powder, which I had to give him everyday for a handful of months, but this type of episodes eventually stopped.
I don't want you to get freaked out. Bring him to your general Vet and go from there. A start is a Bile Acid test, but I would really, really question the validity of a BAT at 12 weeks, reason being is that vaccines, antib's, heartworm pills, etc..all can have an affect on the #s of a BAT - and from what I have been reading, they say the pup should be over 6 months old to get a more accurate BAT.
Mine are going tomorrow for yet another BAT. Roxy most likely has MVD (mild) and TJ had abnormal #s the first time and they have since gone down to below normal (YAY)
Anyway, try to relax and take one step at a time, also try to read up about all you can, from here and from Univ. of Tenn (Dr. Tobais) and Cornell Univ. (Dr. Center).
Keep us posted