Mother miscarried in hospital bathroom, inquiry hears