Hello,
I have studied your case.
Muscle spasm pain will not come and go.
I will like to give few differential diagnoses for your symptoms.
There can be thoracic nerve compression in
spinal canal leading to pain below rib.
Due to compression of this
nerve root there is pain in your rib till thigh.
I will advise you to do MRI spine for this.
Physiotherapy like TENS and
ultrasound may help.
Another possibility of lesion leading to pain on right side.
CT scan abdomen with pelvis will help to get further details.
Till time for these symptoms
analgesic and neurotropic medication can be started.
Hope this answers your query. If you have additional questions or follow up queries then please do not hesitate in writing to us. I will be happy to answer your queries.
Wishing you good health.
Take care.