Trust closed maternity units '97 times' in one year