
Venod Skantha (32) was on his final warning at Dunedin Hospital when the Crown says he murdered 16-year-old Amber-Rose Rush in her Corstorphine home on February 2 last year.
Hospital bosses had originally decided to sack the defendant but gave him one more chance, after he explained his mother had recently died.
Crown prosecutor Richard Smith told the jury yesterday that had been a lie.
Through 2017 and early 2018, Skantha was supplying young people with drugs and alcohol at social gatherings.
His friendship with Amber-Rose soured after she accused him of indecently assaulting her.
Minutes before her death, she spoke to the defendant on Facebook Messenger, an exchange which became increasingly strained.
"YOU'RE PREYING ON YOUNG KIDS VINNY, WHAT THE F * * * IS WRONG WITH YOU . . . YOU'RE 30 AND A DOCTOR FOR F * * * SAKES,'' Amber-Rose wrote.
"Imma make sure EVERYONE knows what a sick * * * * you are, including your work AND the police.''
After she confirmed the threat was legitimate, Skantha allegedly contacted a 16-year-old friend and organised to go to her home.
He had a "master plan'', he said.

The marks in the dust on the vehicle's dashboard used to map the scene were still visible when police examined it.
Skantha followed those directions, Mr Smith said, found the victim, muffled her cries with a pillow and stabbed her six times in the throat and neck.
One injury penetrated through to the bone and almost severed her ear, the court heard.
Amber-Rose's phone was dumped in a pond at Blackhead, which Mr Smith said was consistent with Skantha trying to hide the incriminating messages.
The defendant and his teenage associate then allegedly went back to the man's home where he instructed the boy to clean the silver BMW.
Mr Smith said police found blood, likely to be Amber-Rose's, in the passenger side of the car.
More was found on the inside of a plastic bag in which the defendant allegedly put his clothes before burning them at his girlfriend's home in Balclutha.
A pair of shoes at that address also had blood on them, the court heard.
Before dropping his teenage friend off at his home, Skantha allegedly threatened to kill him and three family members if he spoke of what happened.
Shortly after, however, he went to police.
Amber-Rose's mother Lisa Ann Rush, who died of a suspected suicide last year, described seeing "a glimpse of red'' when she went into the teen's bedroom in the morning.
She suspected a nosebleed at first before discovering the tragedy.
"Amber wasn't moving at all. I was screaming.''
Ms Rush recalled a time she picked Amber-Rose up from Skantha's home when she was unusually quiet and withdrawn.
One of the girl's friends later explained the defendant had offered Amber-Rose money for sex.
It began at $50 and ended at $20,000, they said.
"When I found out ... I told her I wanted to kill him,'' Ms Rush said.
Defence counsel Jonathan Eaton QC, in his opening address, told the jury the evidence the Crown relied upon to prove the charges was either untruthful or unreliable.
It was accepted that Amber was killed in her bed by an intruder, "an intruder who knew how to get into the house in the dark of night, an intruder who knew where her bedroom was. That intruder was not Venod Skantha''.
He told the court the idea that the defendant committed murder to protect his career did not fit.
"It makes no sense.''
The trial before Justice Gerald Nation and a jury of 10 men and two women continues.