When hypoxemia is present, potential cardiac etiologies include pulmonary edema in patients with heart failure and right-to-left intracardiac shunts (a patent foramen ovale in patients with pulmonary hypertension, congenital heart disease including tetralogy of Fallot).