T.F.
I don't have a solution but I just got over being sick for a month with alergies, cough.
The cough was so intense at times. Before it was over, I had intense pain on both sides.
About 4 yrs ago, I cracked a rib and this felt just like that. I asked the Dr. and I as told it iw possible to crack or bruise ribs when you have intense coughing for a length of time.
I am still sore now and I have been "well" 2 weeks. The most relief I have received has been standing in the hot shower letting the water hit me.
Best wishes to you..