ms hug or not :/

Hi all , the last week i have had flu and been really ill However im over the worst of it now but today i Started to get the most awful pains on the right hand side of my chest near the bottom of my ribs . The pains where so bad they made me scream in pain . They was not constant but came in Waves Every few minutes then got less and less then stopped. It freaked me out so much i went to the emergency doctor who told me i have a lung infection. However i felt fine again and was for hours then it Started again now coming and going and its agony . I think its odd this coming and going of the pains if it is a infection the pain is so intense. My question is Could it be ms hug instead of the infection ? Thanks x x