Re: Rib pain; elevated liver enzymes
Gallstones in the ducts can cause liver and pancreas issues, because all three share a common duct into the intestines. So if a gallstone gets into that common duct, it can cause issues. With rapid weight loss, the fat is getting metabolized and released into the bloodstream. The liver filters out the cholesterol and dumps excess in with the bile. So you get a lot of cholesterol in the bile which then turns into stones.
I am definitely betting on the gallbladder from what you describe (and it sounds like your doc is too, with the HIDA scan). It is possible for there to be stones (especially small ones, which are the ones that get into ducts) and not show up on ultrasound. My ultrasound report said the largest stone they found was 1 cm, and then when they took the gallbladder out they found stones 2 cm in diameter.