The news that a young doctor who had been working very long hours for weeks on end walked off into the Scottish hills after an arduous night shift as an anaesthetist is sad, but comes as no surprise.

British junior hospital doctors have been asked to work longer hours under extreme stress than any other group of people, and it is inevitable that some will break. It is amazing that more don't do so.

In the past junior hospital doctors worked an average of 72 hours a week, with some continuous on-duty shifts lasting 56 hours. That was eased when more doctors qualified in the 1990s, but the new rota systems still mean that hospital doctors have to rotate shifts that mean long days at work interspersed by periods of seven days or more of night shifts - each spell of night duty lasting 13 hours.

These new work rotas made the doctors into guinea pigs in a huge study of shift-system working's implications for health.

Last year the Royal College of Physicians advised, on the basis of the study, that asking doctors to work seven consecutive nights was wrong. It wanted hospitals to limit the number of nights on duty to four in a row, and even, if possible, to limit night duty sessions to one a week.

It was concluded that would be the safest for both doctors and patients, but the numbers of extra doctors needed to work such a system would be too expensive for the NHS.

So what are the dangers of shift work, not just for doctors, but also for anyone whose job means occasionally working at night?

They include the development of stomach ulcers, diabetes and an increased risk of heart attacks in relatively young adults. Danish researchers blame the combination of shift work, passive smoking and stress at work for a massive one-in-five heart attacks in their countrymen.

Women shift workers are even more badly affected by shift working than their male counterparts. The Danes found that women who regularly worked night shifts had a 50 per cent greater chance of developing breast cancer than other women.

In America, women who worked at night for six or more years at night were much more likely to have heart attacks than others. They also were more at risk of miscarriages and premature births. The figures are so disturbing that researchers have recommended that as soon as a woman knows she is pregnant she should stop shift work.

They also recommend that once we reach our forties we should not be doing shift work at all. Naturally, that's not possible in some jobs, but there are ways in which the damage to health can be minimised.

One is that night shifts should be no longer than ten hours, and that the off-duty should be arranged so that the person should have at least seven hours' sleep.

Many night shift workers don't have that luxury. As some of the ill-effects of constant night work are caused by sleep deprivation, one big advantage would be to provide time on the shift for a short nap. Workers should be able to go to a private room where they can sleep for, say, half an hour mid-shift, and then for an hour before driving home.

For small companies this may be feasible. I can imagine that this advice may upset bosses who want their employees to keep the output going through their whole shift time, but the benefit they would achieve from a more alert and more efficient workforce may well more than offset this fear.

For women shift workers, better childcare support would make a big difference, as struggling to look after children between shifts makes a big contribution to their ill-health.

As for arranging shifts so as to please and look after the workforce, the rules are clear. The numbers of consecutive nights on duty should be as low as practically possible, and night shift workers should have as many weekends free as possible.

Rotating shifts should be clockwise' - that is they should change every few days from morning to afternoon to night in that order. No shift should last longer than ten hours.

Probably most important, all employees should be asked to participate in the decision on shift patterns: shifts imposed from above, as has been emphatically proven in hospitals, are not well received and create unhappiness among the staff.

Unhappy staff make for poor work outcomes and ill-health.