. . "A chest X-ray may be needed to rule out pneumonia, and if the cough lasts more than two months, a chest X-ray may be done to rule out another lung disease, such as lung cancer." . .