Endocarditis vs Pericarditis

What changes between endocarditis and pericarditis?