In the developing world tuberculosis is a common cause but it is rare in the developed world. Viral causes include coxsackievirus, herpesvirus, mumps virus, and HIV among others.Pneumococcus or tuberculous pericarditis are the most common bacterial forms. Anaerobic bacteria can also be a rare cause. Fungal pericarditis is usually due to histoplasmosis, or in immunocompromised hosts Aspergillus, Candida, and Coccidioides. The most common cause of pericarditis worldwide is infectious pericarditis with tuberculosis. Other
Idiopathic:  No identifiable cause found after routine testing. Autoimmune disease: systemic lupus erythematosus, rheumatic fever, IgG4-related disease
Myocardial infarction
Dresslers syndrome)
Peri-Myocardial Infarction Pericarditis
Trauma to the heart
Uremia (uremic pericarditis)
Cancer
Side effect of some medications, e.g. isoniazid, cyclosporine, hydralazine, warfarin, and heparin
Radiation induced
Aortic dissection
Postpericardiotomy syndrome—such as after CABG surgery
Vaccines-such as smallpox and Covid-19 Vaccines in rare yet documented instances. Diagnosis
Laboratory test
Laboratory values can show increased urea (BUN), or increased blood creatinine in cases of uremic pericarditis. Generally, however, laboratory values are normal, but if there is a concurrent myocardial infarction (heart attack) or great stress to the heart, laboratory values may show increased cardiac markers like Troponin (I, T), CK-MB, Myoglobin, and LDH1 (lactase dehydrogenase isotype 1).The preferred initial diagnostic testing is the ECG, which may demonstrate a 12-lead electrocardiogram with diffuse, non-specific, concave ("saddle-shaped"), ST-segment elevations in all leads except aVR and V1 and PR-segment depression possible in any lead except aVR; sinus tachycardia, and low-voltage QRS complexes can also be seen if there is subsymptomatic levels of pericardial effusion.
Drug Information Portal. U.S. National Library of Medicine.