HMBS and autoimmune pancreatitis: Background: Acute intermittent porphyria (AIP) is a rare metabolic disorder that results from mutations in the gene encoding hydroxymethylbilane synthase (HMBS), an enzyme involved in heme biosynthesis.