Hi there!
Well, without a detailed description of the pain and occasionally a few tests including x-rays, it would be difficult to determine the cause of the pain. If it hurts to touch it is ‘more likely’ to be the ribs or else probably related to the lung/ pleura; though this is not a hard and fast rule. I would be best to get this evaluated by a primary care physician for an accurate diagnosis and appropriate management.
Hope this is helpful.
Take care!
u should get it checked out because if it is something it might get worse. since it hasnt gone away already and u say its been a couple of weeks. better check it out with a doctor. hope u get better.