Hello,
The most common causes of pain in the ribs while coughing are:
1) Any tear or pull of intercontinental muscles that are attached to ribs
2)
Costochondritis or inflammation of ribs at their junction with
sternum or breastbone
3) Any inflammation of pleura of lungs called as
pleurisy due to underlying lung disease
4) Bruised ribs as in injury
5)
Chronic cough due to any respiratory infection leading to strain of intercontinental muscles.
Your pain is mainly due to chronic coughing that might have strained the intercontinental muscles. Treatment options are:
1) It doesn't need any specific treatment as you have already got rid of cough, the pain will come down slowly
2) If you have unbearable pain, you can go for pain relievers like tab.
Ibuprofen once daily for 3 days
3) Avoid coughing
4) Avoid straining chest muscles
If the pain doesn't subside even after 2 weeks, you may consult a physician for further evaluation.
Take care. Hope I have answered your question. Let me know if I can assist you further.
Regards,
Dr. Pallavi M., Anesthesiologist