HMBS and autoimmune pancreatitis: Acute intermittent porphyria (AIP) is an autosomal dominant inborn error of heme biosynthesis due to a pathogenic mutation in the Hmbs gene, resulting in half-normal activity of hydroxymethylbilane synthase.