Travelling to work on the London Underground 18 years ago, I bumped into a particularly well-informed old friend. He told me that the High Court had just been dealing with a case of conjoined twins, born in Manchester a few days earlier to parents from abroad. As the doctors had requested – but contrary to the parents’ wishes – a judge had ruled that the children could be separated to save the life of one twin, even though that would cause the other’s death. The hospital’s application had been decided in private though the parents’ appeal would shortly be heard in open court.

Having just left the BBC after 25 years, and still thinking like a broadcaster, I made a mental note to cover the forthcoming hearing for the newspaper I had recently joined. But I completely failed to realise I was sitting on what my new employers would have regarded as a front-page scoop. Fortunately, they never found out.

I was reminded of all this by a simulated photograph of conjoined twins in The Children Act, a superb new film starring Dame Emma Thompson and Stanley Tucci. The story of the Manchester-born twins, known during the hearing as Jodie and Mary, is lightly fictionalised in the novel by Ian McEwan on which his screenplay for the film is based. In the book, McEwan’s fictional Mrs Justice Maye quotes from the judgment delivered in 2000 by the real Lord Justice Ward, reported as In re A (Children) (Conjoined Twins: Surgical Separation), [2001] Fam 147. 

But it was a case decided by Ward when he was still a High Court judge that gave McEwan his main story. In 1990 – several months before the Children Act 1989 came into force – Mr Justice Ward ruled that a hospital could give blood products to a boy aged nearly 16 who was being treated for leukaemia. The boy and his family had refused to consent to transfusions because they were devout Jehovah’s Witnesses. That case is reported as Re E (A Minor) (Wardship: Medical Treatment), [1993] 1 FLR 386. In it, Ward says ‘the welfare of the child… dominates my decision, and I must decide what E’s welfare dictates’. That remark is cited by McEwan’s fictional Maye, who is based closely on Ward – with a sex-change that is dictated by the plot.

In a scene central to both the novel and the film, Maye visits the young leukaemia patient in hospital, accompanied only by a Cafcass officer, to see whether he understands what would happen to him without a blood transfusion. This struck me as implausible when I first read the novel. But it turns out that Ward did just that, flogging across London in the Friday rush-hour to spend a few minutes at the boy’s bedside. The denouement is also drawn from life.

As McEwan says in the acknowledgments, his novel would not have existed without Ward, ‘a judge of great wisdom, wit and humanity’. The retired judge advised McEwan on the legal technicalities as well as assisting Duncan Kenworthy, who produced the film, and Sir Richard Eyre, who directed it. As a result, the movie avoids many of the solecisms that so irritate lawyers – although counsel get away with leading questions and broadcast journalists know better than to run to a microphone.

But what is so striking about both the book and the film are their widespread use of real locations. Ward managed to get permission to film inside the great hall of the Royal Courts of Justice in London. Though the courtroom in the Queen’s Building and the judges’ corridor behind Maye’s court were constructed at Pinewood Studios, they are so convincing that it is hard to see the join.

And this is where I have to declare an interest. Much of The Children Act is shot in Gray’s Inn. The film’s emotional climax, a Christmas entertainment, was recorded in the hall at Christmas time while the real Christmas entertainment was being rehearsed nearby. Even the tree was a real one. 

And having based Maye on Ward, McEwan based Maye’s flat – where much of the subplot takes place – on Ward’s flat in Gray’s Inn. When Ward and his wife Helen moved out some years afterward, I moved in.

Because the story was set in what is now my flat, Thompson and her co-star Stanley Tucci filmed a key scene on the staircase outside my front door. But when Thompson opens that door, the flat they enter is a magnificent apartment that bears no relation to my own. That, too, was Pinewood.

Kenworthy pulled the same trick when he produced Notting Hill, with its famous blue door in Kensington Park Road opening to reveal a fictitious bedsit. It all goes to show that to convey the truth of love and life you sometimes have to make things up.