He met a man through the gay dating app Grindr and during conversations said he was Dr Nick Delaney.
"This person then said that he was a security officer at the (Lady) Cilento hospital," Mr Hanly said. "Mr Delaney felt as though he needed to keep up the ruse as they continued, for the entire period of the offending, a casual relationship."
Delaney's deception came unstuck when he asked the security guard to help him renew his credentials and inquiries were made.
While delivering sentence on Monday, magistrate Barry Cosgrove warned Delaney that had he attempted to treat patients, he would likely have been sent to jail.
A remorseful Delaney, who suffers from a mild intellectual impairment, pleaded guilty to one charge of fraud and one of entering a premises and committing an indictable offence.
He was fined $3000 but no conviction was recorded.
Delaney is not the first person in Australia to pose as a doctor. In March, Phoebe Pacheco was accused of treating at least 145 patients without medical qualifications at a clinic in Melbourne's west for more than three years.
The Australian Health Practitioner Regulation Agency revealed that questions arose about her in 2016, sparking a police raid for patient records in October.
- news.com.au