An army veteran died from health complications weeks after being admitted to hospital, an inquest heard.