A court has heard television host and white ribbon co-founder Andrew O'Keefe has been an involuntary in-patient at a Sydney hospital, since allegedly assaulting his girlfriend.