First it has to be ascertained whether blood is coming from stomach/oesophagus or lungs/pharynx etc, Whether it is coming with cough or vomiting. If with cough, You have to be investigated for TB. If vomit, then endoscopy. CBC with ESR & X Ray Chest is the first thing you should do.
Next Steps
Consultation from Internal medicine Physician