An inquest has opened into the death of a man who died in hospital.