In a few days' time Dr Ann McPherson will be hosting an afternoon tea party for some of the patients who have been in her care over many years.

It will be held in a college quad, not very far from her busy Oxford practice in Beaumont Street, where she has worked for almost 30 years.

She sees it as an opportunity to thank her patients for letting her look after them, even if the patients will all be too well aware that they are the ones who should be expressing gratitude, for the care and attention they have received down the decades.

Most of them know that Dr McPherson would have dearly loved to carry on working in her basement room, doing the job she has always loved and valued.

But that has been made impossible following the diagnosis given to Dr McPherson, a year ago, that she has cancer of the pancreas.

Her patients, conscious of how much she had done for their health, had always clung to the thought that she would return to work.

They had been aware, of course, of their GP's long and difficult battle with illness, after learning she had breast cancer 12 years ago. But Dr McPherson's quiet courage, sense of optimism and readiness to go on throwing herself into cherished projects to help hundreds of seriously ill people, had persuaded them that she might go on.

But the invitation to the tea at St John's College to mark her retirement from the health service has ended those lingering hopes.

"I have very much enjoyed working in the Beaumont Street Surgery, where it has been a great privilege to work with such a lovely group of patients, many of whom have become friends," she says in a moving note to her patients, before thanking them all for their understanding and support, adding: "This has made a huge difference in helping me to cope with the new cancer and subsequent treatment."

Speaking at her home in Norham Road, North Oxford, Dr McPherson recognised it would be an emotional occasion for everyone.

"I have decided that I cannot carry on because it would not be good for me or the patients. It will be strange not going back to the surgery, which has been my life.

"But I felt there should be an opportunity to say goodbye to my patients and for them to say goodbye to me. I want it to be a happy event.

"I have received the most wonderful letters and cards. One came from a lovely elderly gentlemen, who wrote: 'There have been two important women in my life. My mother who brought me into it and you, who stopped me going out of it.' It brought tears to my eyes."

Her intention now is to spend time with her grandchildren but also continue working to build on the success story of DIPEX, the Database of Individual Patient Experience, the award-winnng website she created.

DIPEX offers people the opportunity to watch, listen to or read interviews, with people suffering from a wide range of illnesses, including cancers, heart disease, mental health and neurological conditions. The site attracts more than 2m hits a year.

The idea came about by a chance meeting at a medical conference with Andrew Herxheimer, an Oxford pharmacologist, who had been given an artificial knee. Talking about their illnesses, they recognised the benefit of hearing of other people's experiences. For it seemed only those who coped with illness by climbing mountains or undertaking heroic feats ever had their stories told.

The 62-year-old GP believes her own experience of being a patient has been "odd but instructive", teaching her a great deal about how people are treated by the NHS. "There is this whole thing about choice, which I think must have been drawn up by people who have never been ill. What people want is to be looked after properly, by people who have their interest at heart, and told what is going on. "

Rather than being given difficult options and assessments of risk, she believes seriously ill people often simply want the doctor to tell them what to do.

"Some see that as patronising but I sometimes, I think it has swung too much the other way. Yes, some people will want to go on the Internet and read about their illness and treatments. But patients still want a lot of support. They still need people with real expertise."

Her own ability to explain health issues to thousands of people of all ages, has not only helped establish her as Oxford's best known GP, it has also resulted in her becoming a best-selling author. In 1982 she co-wrote Mum, I Feel Funny with Aidan Macfarlane, the then head of child health services for Oxfordshire. With illustrations by the political cartoonist of The Daily Telegraph, Nicholas Garland, the book specially written for children offered a gently amusing guide to common ailments. The potential of the idea was seen by Hugo Brunner, then a senior editor with Chatto and Windus, who as well as being the Lord Lieutenant of Oxfordshire, is now Dr McPherson's next-door neighbour.

But it was her Diary of a Teenage Health Freak which really took off, selling more than a million copies, eventually being translated into 23 different languages and becoming a hit television series. The central character, 14-year-old Peter Payne, who fretted about everything from sex and drugs to smelly feet, was inspired by that other worried teenager Adrian Mole, whose creator Sue Townsend even wrote the foreword to the book. The health freak website that Dr McPherson created still receives 1,500 emails a month.

There have been many more books, aimed at women (Women's Problems in General Practice; Women's Health: and Cervical Screening: A Practical Guide), aimed at parents (Adolescents: the Agony, the Ecstasy, the Answers) and of course children, with numerous health freak books covering sex, bullying, stress and relationships.

She says that the first book had been inspired by little booklets about illnesses that she had written for her own children. Twenty years later she is still driven by the need to make young people better informed about their bodies. Two years ago she set up a new website Youth Health Talk, which became the UK's main online health resource for young people, offering highly personal accounts of battles with illnesses, along with concerns about sexual health. The need for such a service was spelt out to Dr McPherson over tea with Alice MacLennan, the daughter of her friend and colleague Neil MacLennan, a GP she has worked with for more than 20 years.

At the age of 18, Alice had been struck by rhabdomyosarcoma, an aggressive form of cancer that attacks muscles, which was to kill her four years later. Dr McPherson, who had known her since she was a baby, would routinely meet her for a traditional English afternoon tea at the Old Parsonage Hotel in Oxford.

"She already knew about the DIPEX charity. One day she simply asked me 'Why don't you create one for young people,'" Dr McPherson recalled.

Author Philip Pullman, broadcaster Jon Snow and Radiohead's Thom Yorke were among those who helped her launch Youth Health Talk. About 30 to 40 young people are interviewed for each health and illness issue. Thanks to new funding from Comic Relief and others epilepsy and anxiety will be the latest subjects to go on to the website.

Dr McPherson is to go on working part-time at Oxford University as the medical director of the DIPEX Research Group. She has been greatly helped in this work and her other projects by her husband, who has worked on the epidemiology of women's health for 30 years, and is Visiting Professor of Public Health Epidemiology at Oxford University's Department of Obstetrics and Gynaecology.

Memories of another professor came into her mind, as she recalled working as a house physician in London at the outset of her career. "I was at St George's hospital. I can still remember telling the professor of medicine that I wanted to go into general practice. He replied, 'What is a clever girl like you going into general practice for?"

She fears similar views persist 30 years later, with some hospital doctors tempted to look down on GPs. "A lot of people say 'you must be seeing coughs and colds all the time.' It's actually a fantastic job, one of the most stimulating jobs in medicine."

She is saddened that in recent months about "a lot of anti-GP stuff," with GPs facing criticism for securing more pay for less work.

She would personally like to see practices continuing to hold Saturday morning surgeries. "I am not against doctors working one or two nights a week. It is not that I believe people in the health service shouldn't have time off. I am just worried about it becoming a nine to five job, with people just doing shifts."

She also expresses concern about the adoption of American ideas, with groups of GPs bidding for new health centres and poly-clinics being awarded to private companies.

"Having a strong primary care is the cheapest and best way of running a health service. If you look what has happened to dentistry, we do not want to go the same way." The likes of Virgin simply would not be interested in the personalised form of medicine that she has dedicated her life to. "Listening to patients is the most important thing for a GP to do," she said. "If you do not listen you cannot make the right diagnosis."

She complains that more time has to be spent ticking boxes, while it is more difficult to refer patients directly to individual consultants.

The practice on Beaumont street is now made up of seven doctors, who look after 12,800 patients. She has always relished the social mix of her patients, which has seen her looking after students and dons from Oxford colleges to patients from the probation service and bail hostel.

The practice has continued to expand but she will leave content that its philosophy of personalised, high quality medicine has survived the changes. Now her patients know that she can do no more for them. But they will all recognise that the tea party really should be a celebration - a celebration of their doctor and a woman who represents everything that remains good about general practice in Oxford and indeed the NHS itself.