An unemployed man posed as a doctor and walked the corridors of Queensland’s top children’s hospital for months just to make friends in a terrifying security bungle.

Nicholas Brett Delaney, 25, wore a stolen security pass and roamed wherever he pleased in secure areas of Lady Cilento Children’s Hospital between May and December last year, Brisbane Magistrates Court heard yesterday.

The fake surgeon stole a lanyard from Ronald McDonald House and even seduced a male hospital security guard on dating app Grindr to try and get a permanent swipe card.

The fake surgeon stole a lanyard from Ronald McDonald House. (9NEWS)

“This person then said that he was a security officer at the (Lady) Cilento hospital,” Delaney’s lawyer, Nicholas Hanly, said in court.

“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.”

In court, Mr Hanly described Delaney’s actions as worthy of the Leonardo di Caprio film Catch Me If You Can , where the actor portrays a master of deception by working as a doctor, lawyer and co-pilot.

But Magistrate Barry Cosgrove would not swallow that.

Mr Hanly described Delaney’s actions as worthy of the Leonardo di Caprio film Catch Me If You Can. (AAP)

Magistrate Barry Cosgrove said it was "more like The Secret Life of Walter Mitty". (AAP)

He said it was "more like The Secret Life of Walter Mitty - a film about a loner seeking love and meaning.”

The court heard Delaney turned imposter because he was lonely.

The recently sacked warden from Sunnybank Private Hospital just wanted friends.

And he was only caught out when security finally queried who he was when he asked the security guard to help him renew his credentials.

Delaney wore a stolen security pass and roamed wherever he pleased in secure areas of Lady Cilento Children’s Hospital last year. (9NEWS)

The State Government and the public health system is now facing criticism for allowing someone to walk around in a hospital and access staff only areas.

"It doesn't encourage public confidence in the system,” Magistrate Cosgrove said.

Member for Mudgeeraba Ros Bates told 9NEWS: “I think it’s appalling that someone theoretically could throw on a set of scrubs, wrap a stethoscope around their neck and wander around any of our hospitals in Queensland.