Hi,
Welcome to the forum. For me, in the past pleurisy was an off and on sharpe pain in the rib area. Percarditis was a constant pain when breathing and worse when lying down. With pericarditis, I couldn't stand to take a breath it hurt so bad.
I hope you find out whats going on and get treated right away. Both are painful! Take care and let us know what you find out.
I'm sure others will be along soon to give you more info. You will be in my thoughts and prayers.
Babs