Another IT expert told the tribunal it “just isn’t possible” to edit a mobile phone note prior to the date it is created.

IT consultant James Borwick said only a “catastrophic event” at Google would have resulted in the phone saying a note had been edited before being created.

Mr Borwick was hired by Ms Peggie’s legal team to examine the phone records but denied he had been instructed to undermine Dr Upton.

Asked to explain screenshots highlighting the disparity between dates Mr Borwick said the “version history” of the phone notes appeared to have been superimposed.

He added that he had attempted to recreate the same scenario with a phone and editing dates before creating them, but without success.

He told the panel “it’s just not possible”.

The tribunal heard Dr Upton made additions to phone notes in the days after the Christmas Eve incident, including to a note from 18 December – the date Dr Upton has accused Ms Peggie of risking patient care with her actions.

It stated “working nights, won’t make eye contact, won’t acknowledge my presence, haven’t had direct conversation but can feel the dismissal/hostility” and was then added to in the early hours of 26 December.

Jane Russell KC, who represents NHS Fife and Dr Upton, suggested to Mr Borwick he had been instructed to produce evidence that Dr Upton was lying – a claim that prompted an immediate objection from Ms Peggie’s legal team.

Ms Russell later questioned whether a comment in Mr Borwick’s report saying Dr Upton was “silent on the matter” of phone notes was an “irresponsible accusation”.

He replied that, with hindsight, perhaps it was.

Mr Borwick said he had hoped to meet Dr Upton about the phone situation, but the meeting was cancelled by Ms Peggie’s legal team.

The tribunal will continue next week.