Hello and welcome to HCM.
Thank you for your query.
Most liver conditions are not associated with coughing up of blood, as there is no link whatsoever. The only possibilities could be a secondary condition caused due to a primary liver abnormality.
Like for example an alcoholic or non-
alcoholic liver disease with secondary bronchial and/or
tracheal varices that could be causing the hemoptysis (coughing of blood). An endoscopy will greatly help in visualizing and finding the cause of the blood.
Another possibility to consider is a gastrointestinal (GIT) bleed, which can be associated with hematemesis (vomiting of blood). A few of the most common conditions associated with this are: peptic ulcers, varices, gastritis, hepatitis, viral hemorrhagic fevers, tumors,
Mallory-Weiss syndrome, poisoning, parasite infections, etc.
A few other conditions that could be causing hemoptysis are:
aspiration pneumonia, tuberculosis, sarcoidosis, Goodpasture's syndrome,
pulmonary embolism, bronchiectasis, etc.
A few other conditions like blood coagulation disorders, mitral stenosis of the heart, etc. should all be ruled out if no other lung or GIT cause is found.
I hope I have succeeded in providing the information you were looking for. Please feel free to write back to me for any further clarifications. I would gladly help you.
Best wishes.