Medical conditions that affect the function of the adrenal glands, such as Addison's disease or Cushing's syndrome.