I agree with the lung specialist. You probably sustained rib fracture(s) and they can hurt for a long time. There need be no other explanation for the pain. If the chest x-ray is clear, no further testing is needed. Unless fractured ribs are badly displaced, especially with jagged ends, there is no need to address the fractures. One's rib cage is not very flexible and hard coughing can result not only in rib fractures, but also cartilage tears and torn ligaments, all of which can be quite painful.