Yes. You can eat.
They will do a TB test for you and ask you to come back two days or several days later. If it shows the result is postive, you can do X-ray in the same day. However it depends on the medical office. Some small medical offices don't have X-ray doctors coming to the offices every day. So you need to check with your medical office.