Welcome to HealthcareMagic.
1)If you have cough problem since three years , you should get tested for TB and HIV.Weight loss
can be managed once these disease are ruled out by high protein , vitamin rich , diet along with protein supplements
need not be a hernia .It could be many other conditions like varicocele , hydrocele.As you have chronic cough
the chances of hernia are high and so you need to be examined by your Surgeon.