Welcome to Healthcaremagic.
A little details about the previous tests done would help me give a better advice.But anyways , blood in cough can be due to severe cough and so retching
of airways.It could be some other chronic lung diseases.
From your history , i would advise you to firstly rule out any ENT abnormality.I advise you to visit your ENT surgeon and get evaluated. if any anatomical abnormality
, it can be treated well with surgery.
for more than 3 years can cause secondary problems like repeated infections , hernia