A Flintshire man was told to expect a “lengthy” prison sentence after he admitted assaulting and sexually assaulting a woman at Ysbyty Glan Clwyd.