HMBS and autoimmune pancreatitis: Acute intermittent porphyria (AIP) is an inherited disorder of heme synthesis in which decreased hydroxymethylbilane synthase (HMBS) enzyme activity leads to the accumulation of porphyrin precursors.