Updated procedure: If you were suffering from TB long time back and treatment was completed properly but still scar is left then don't take it negative to apply for Qatar ID.

The process says, at the medical commission, they will take your x-ray and blood test. It is obvious that they will see the scar in Xray. So they will further refer you to communicable disease center (CDC) for further confirmation if it is active or inactive.
At CDC, they will take your blood and sputum (2wice) and will give you an appointment after 3 weeks. In this procedure, they will examine if you have active or latent TB germs. After three weeks they will share the report or analysis. If you have your treatment medical reports then you can show it to them. Or else they will for double security give you 4 months of medicine. But with this medication, you will get a green signal to get your Qatar ID processing at Medical commision.
So this all process will take you 30 to 40 days only.

After 4 months of medication, again go back to CDC to get the certificate and submit it to Medical commission.