Writer dies while on 'filthy' ward