P.M.
Sounds like a double whammy... formula definitely causes the two extrmemes of pooping - constipation and diarrhea. But having too much pain medication can do it too.
Vicodin IS commonly used and found to be safe in breastfeeding. Older infants have a much lower chance of having a constipation side effect. The basis of the study was done with 5-10mg of Hydrocodone every 4-6 hours as needed.
Medications and Mother's Milk by Dr. T Hale - 2008 Ed