A Bunbury doctor has been found guilty of sexually assaulting a patient he first saw as she lay in a hospital cubicle after being attacked by her ex-partner.

Key points: The victim said the doctor inappropriately touched her and asked her out to dinner

The victim said the doctor inappropriately touched her and asked her out to dinner She later received text messages from someone saying he had been her doctor

She later received text messages from someone saying he had been her doctor The victim picked out a photo of another doctor when asked to identify her assailant

Priyantha Padmike Dayananda had pleaded not guilty to digitally penetrating his 45-year-old patient, claiming he was a victim of mistaken identity.

The woman had first presented to the emergency department of Bunbury Regional Hospital in September 2017 with abdominal issues sustained after she was kicked in the stomach by a former partner.

The assault caused complications with gastric banding surgery that she had 20 years earlier.

She underwent emergency surgery and spent two weeks in the hospital recovering, during which time she was seen by a number of doctors.

Prosecutor Joel Grinceri earlier told the court the victim had received "special attention" from one doctor who had asked her personal questions, stroked her hair and suggested he show her around WA.

The woman was admitted to Bunbury Regional Hospital after being attacked by her ex-partner. ( ABC News: Gian De Poloni )

Two months later, while living at a women's shelter, she developed an infection and returned to the hospital.

That is when she said the same doctor assaulted her while she was lying in a hospital bed in a cubicle.

Texts from 'sleaziest slyest doctor'

During an examination, she said the doctor, whose name she could not recall, asked her out to dinner and made comments about her cleanliness as he inappropriately touched her.

She left the hospital, then three days later began receiving text messages that she believed to be from the doctor.

She saved the number in her phone as "sleaziest slyest doctor".

The communication continued over several weeks, with the contact suggesting the pair meet up.

In one exchange, she asked the sender who they were.

"Your doctor at Bunbury," the reply read.

"Remember I touched your beautiful tummy at emergency".

Claim of mistaken identity

The woman lodged a complaint and was asked to identify her attacker from a list of doctors compiled by the hospital.

Dayananda was on that list, but the woman selected a different man, also of Asian appearance.

Dayananda pleaded not guilty to sexually assaulting the woman.

Throughout the trial Dayananda's lawyer, Simon Watters, made the case that it was that other doctor who was responsible for the assault.

The other doctor had also been on duty on the day of the incident and, like Dayananda, had treated the patient on previous occasions.

Mr Watters said the fact the other doctor had been identified by the victim was enough to cast reasonable doubt over the case.

"That was not a dodgy photo board," he told the jury.

"That was not a rushed selection."

'Gross breach of trust': prosecutor

A jury deliberated for almost 10 hours after a 10-day trial before returning the guilty verdict.

Mr Grinceri argued against Dayananda being released on bail ahead of his sentencing hearing, saying a term of imprisonment should begin immediately.

"This was a gross breach of trust," Mr Grinceri said.

"There was an element of grooming involved. This is a very serious offence."

But Judge Belinda Londsdale granted bail, telling the doctor to make preparations for a likely jail sentence.

"In view of the fact that his family are dependent on him and he needs to get his affairs in order, I am going to grant bail, but on very strict conditions," she said.

"Those conditions include a $10,000 personal undertaking, a $10,000 surety and a requirement to report to Cockburn Police Station every day."

Dayananda shook his head and held it in his hands during the hearing.

The WA Country Health Service (WACHS) said in a statement a doctor formerly employed casually at Bunbury Health Campus was suspended immediately after being charged.

WACHS said the matter was reported to the Australian Health Practitioner Regulation Agency (AHPRA) and various other regulatory bodies.

WACHS chief executive Jeff Moffet said any breach of trust by a clinician was "deeply disturbing, completely unacceptable and something we take extremely seriously".

Dayananda will be sentenced next week.