He denied the charges but was convicted of four out of seven counts following a trial.
The court was told Fairfield committed the offences on a “vulnerable” patient who was admitted to the hospital after self-harming.
He supervised the girl to go outside for a walk in the early hours of the morning and committed the offences in areas which were not captured by CCTV.
During sentencing, Judge Michael Bowden said Fairfield knew the victim was underage.
“Not only were you the adult but you were also a security guard employed by the hospital, you knew that the victim was a child, you knew that the victim was vulnerable,” he said.
“There is a need to protect vulnerable victims who are seeking medical treatment in a public hospital from behaviour of this sort.”