Hospital admits failure after sending home man with life threatening condition