Intensive care pediatrician Salman Siddiqi, 44, worked at the Queen Elizabeth the Queen Mother Hospital (QEQM) in Margate, Kent.
The court also noted that after obtaining a police caution for flashing, he had been permitted to continue treating minors.
The vigilante organised the ‘sting’ in the early hours of January 8 of this year by pretending to be a 14-year-old boy, arranging to meet Siddiqi at his lodgings on hospital grounds.
Siddiqi sent naked pictures of himself ahead of the planned encounter and he was expecting to take part in sexual activity with the boy – but he was instead confronted by the 49-year-old vigilante.
He then tried to run away, chased by the vigilante into the hospital who also called police.
When officers arrived and arrested him two hours later, Siddiqi had changed into hospital scrubs.
He appeared at Folkestone magistrates court the next day where he pleaded guilty to engaging in sexual communication with a child and attempting to arrange or facilitate the commission of a sex offence.
Siddiqi, of Hornchurch in east London, was sentenced to two years and four months imprisonment at Canterbury crown court on Friday.
He was also added to the sex offenders register and was made subject of a sexual harm prevention order for 10 years.
In preparation for the sting the vigilante asked Siddiqi in messages ‘Are you okay with me being 14?, to which he replied ‘Yes’.
The paedophile hunter, who was allowed to remain anonymous, said in a statement read to the court: ‘I took my hood down and uncovered my face.
‘I said, “I am obviously not Lee, I am Kenny and I am a sexual protection activist”.’
Explicit messages were discovered when police searched Siddiqi’s phone.
Kevin Dent KC, said in mitigation for Siddiqi: ‘At the time, Mr Siddiqi was struggling with the stresses and strains of caring for a severely disabled four-year-old son and the trauma of his condition.
‘He was also trying to cope with his attraction to adult males.’
Siddiqi had previously been cautioned by police in 2019 for flashing in broad daylight in Tower Hamlets Cemetery Park in east London.
He failed to tell the General Medical Council (GMC) about the caution, and in January 2021 started working for East Kent Hospitals, which runs QEQMH.
Despite the fact his police caution would have shown on a Disclosure and Barring Service certificate, it was not picked up.
Two months later Siddiqi told GMC officials about the caution following an ‘informal discussion’ with a senior colleague.
But a disciplinary hearing did not take place until July last year, after which he was suspended for a month.
East Kent Hospitals deemed Siddiqi not to be a risk to patients and he was allowed to continue working until his arrest.
Judge Mark Weekes described Siddiqi’s actions as ‘deeply troubling’.
During sentencing the judge told him: ‘With the knowledge and training you have in your profession, you of all people should have known the deep and everlasting harm you were prepared to cause.
‘There was mercifully no child victim in this case and this was no thanks to you.’
The judge said he hoped East Kent Hospitals will conduct an investigation into Siddiqi’s actions.
He added: ‘To my mind, very real safeguarding concerns are raised by your behaviour and I hope appropriate investigations are conducted by QEQM and associated hospitals following your sentencing.’
Following Siddiqi’s arrest Rebecca Martin, the chief medical officer at East Kent Hospitals, said the incident was immediately reported to the GMC.
She added: ‘Our review did not identify any patient involvement or failures in our processes that would have directly prevented this criminal offence.
‘There were missed opportunities to identify his previous caution and we have taken steps to ensure that it cannot happen again.’