Help please

Anyone else get really bad pain in upper back and rib area? It hurts to breathe. The past 3 days I have gotten this pain, one episode lasted 18 hours. The only thing that really helps is my heating pad on my upper back and ice pack on the ribs. I cry each time i get the pain because I'm just so miserable