Your son must have suffered from a viral fever
.After an episode of Viral one suffers from post viral malaise
and loss of appetite which comes corrects in a week.
However the pain in the left rib cage
after a bout of cough could indicate inflammation of the pleura i.e lung covering.
Give him a painkiller if it doesn't get better then I would suggest you to get him examined by his doctor to rule out Pneumonia