I'd bet you have a bruised rib or lung in addition to whatever your cough issue is. This would pose no threat to the baby. However, a cough that persists after antibiotics was either viral and antibiotics were useless, or it's worsening because the antibiotics weren't efficient. You should see the doctor again. They can listen to your lungs and should be able to determine the problem just by the different sounds (wheezes, crackles, etc.). I think they could treat you for pneumonia or whatever else they suspect the problem may be without having to do an x-ray.