The doctor performed a pericardiocentesis to remove the excess fluid from around the patient’s heart.