Former Bangladesh captain Tamim Iqbal needed hospital treatment because of a serious illness while playing a match.