IF DIABETICS are to keep their blood-sugar levels in a healthy range, they must rely not only on periodic visits to the doctor, but also on careful daily management of their medicine, meals and exercise. For years, this regime included regular self-administered blood-sugar tests and similarly self-administered insulin injections. Now, in the better-off parts of the world at least, these things can be automated. There are gadgets that monitor sugar levels, and implanted pumps that deliver insulin. But Ed Damiano of Boston University and Steven Russell of Massachusetts General Hospital think things could be improved further by using software to make these devices work together as what would, in effect, be an artificial pancreas.

As they outlined on June 15th to a meeting of the American Diabetes Association held in San Francisco, Dr Damiano and Dr Russell have created an app, housed in an iPhone, which receives data every five minutes from a glucose monitor implanted in a patient’s body. The app analyses these data, plus the patient’s weight (a good proxy for his blood volume), and draws appropriate conclusions. The phone then transmits the app’s instructions to two implanted pumps. One of them delivers insulin, to lower blood sugar. The other delivers glucagon, which helps raise it.

The findings of a trial of this system, on a group of adults and teenagers with Type 1 diabetes, were published in the New England Journal of Medicine to coincide with the talk. They look promising, particularly in adults. The combination of detector, algorithm and pumps reduced the amount of time patients spent with low blood sugar by two-thirds compared with their usual care.

The new system is bulky, so a streamlined version is being developed. And though all the hardware is standard, the app itself counts as a medical device, meaning the Food and Drug Administration must give it its blessing. If it passes muster, then the lives of those diabetics who can afford it will be made better.