Entering a hospital was once a death sentence. "Every cure stands still, every wound becomes a sore and every sore is apt to run into gangrene," wrote John Bell, the pioneering Scottish surgeon, in 1780.
Before antiseptics, patients were five times more likely to die from an operation carried out in hospital than one done at home. Any patient who could afford it insisted their surgeon make a house call: in 1810, the novelist Fanny Burney endured a mastectomy in her bedroom - without anaesthetic.
Modern hospitals bear little surface resemblance to 18th-century dying rooms. Since Victorian times, they have been symbols of modern medicine, and politicians close them at their peril. But hospitals kill many people: 40,000 NHS patients die annually because of "adverse events", according to Dr Foster, a medical research firm.
Now, however, the pendulum may be swinging back to home care, thanks to IT. "Hospitals are infection factories," says Dr Ricky Richardson, a consultant at Great Ormond Street children's hospital in London. For years, Richardson has been a passionate advocate for using IT-based care to reverse the trend towards hospital-centred medicine.
Dr Paul Johnson, of the telemonitoring research centre at John Radcliffe hospital, Oxford, says that patients equipped with hi-tech, low-cost "telemonitors" can be encouraged into better health at a fraction of the cost of hospital treatment.
With billions being poured into new NHS IT systems, there is a chance for e-health to become routine. So far, however, the programme has emphasised getting patients into hospital, not keeping them away.
The revolution will come from two health care information technologies - telemedicine and telecare.
Telemedicine has been around since the early 1960s. It covers any arrangement for diagnosing and treating disease remotely, via everything from a telephone call to videoconferencing. At least one pilot project even relied on digital photographs sent through the post - bandwidth was expensive and it was quicker than sending the patient in person.
Clinical trials have shown that conditions such as skin cancer can be detected remotely on a consultant's screen, while x-ray images and data from heart monitors can be assessed thousands of miles from the patient. Telemedicine has been used for years out of necessity in remote parts of the world, and in places where doctors don't want to go: one early installation was in a Texas prison.
Telecare covers the use of IT to monitor people's health at home or in their daily routines. It is newer than telemedicine because it depends on the technology being cheap enough to hand out to patients, rather than being kept inside the health service.
One of the most promising uses of telecare is to allow elderly and other vulnerable people to stay in their homes rather than go into residential care. This week, the London borough of Newham demonstrated what could be possible in a "show home" packed with telecare sensors.
The flat, in a tower block of sheltered accommodation, contains sensors to detect movement, extremes of temperature, gas leaks, whether the resident has got up from a chair or out of bed, and whether the bathroom has flooded. The front door has a "bogus callers" button that can be pressed if the resident thinks she is being hit by a distraction burglar.
Each sensor communicates wirelessly, on the 869MHz frequency, the European standard for telecare, with an alarm device that phones an alert through to a control room over a normal line. Each device has a unique electronic identity, so it will not set off an alarm in a neighbour's flat.
Newham is not the first council to use telecare. Local authorities such as Lothian in Scotland and Liverpool City have similar systems. Liverpool is trialling a telecare system in six homes. A network of sensors monitors the resident's daily movements. They report to a PC in the house, which learns the person's daily routine. If the PC detects something out of character, it triggers action.
Telecare for the elderly is potentially big business. In July, the chancellor, Gordon Brown, announced funding for 1.5m "care alarms" by 2008.
An even more promising development is to help people take control of their health. Studies have shown that patients who monitor their blood pressure, for example, are more healthy than those who have it done in the consulting room. According to a study published in the British Medical Journal in July, home monitoring reduces the incidence of "white coat hypertension" - the rise in blood pressure caused by a doctor strapping a sphygnomanometer to your arm. The procedure also involves patients more closely in looking after their health.
In Oxford, Johnson sees the ability to monitor patients' vital signs remotely as a way to healthcare that is both cheaper and more effective than putting people in hospital. One trial involves remote foetal monitoring, by giving pregnant teenagers a "belly bra" with built-in ultrasound sensors that relay data to a central monitoring station via mobile phone signals. Johnson says that this kind of technology is ideal for reaching young teenagers who are often socially disadvantaged and ignore conventional health services.
Johnson says the national NHS programme for IT represents a "unique opportunity to provide the vehicle for equality of care and support the public ... in adopting cost-saving, life-enhancing self-care". The specification of the programme's £6bn care records service says that e-health and telemedicine technologies will be an essential part.
For the moment, the programme is occupied with more mundane things: replacing the NHS-wide network and getting an electronic appointment-booking service up and running to fulfill the government's promise to offer choice of hospitals.
However, the system of shared electronic health records being created by the programme is an essential ingredient of telecare. Patients will no longer rely on a single institution holding their record - it will be updated wherever they come into contact with the health service.
At public appearances, Richard Granger, the NHS IT chief, has begun to talk about the programme as enabling the treatment of patients away from hospital, and of patients taking control of their records. At an IT conference in London recently, he asked the audience how many had a record of their car's service history. A forest of arms appeared. However, not one admitted keeping a copy of their health record. "That's what we want to change," Granger said.
But it will be years before the national programme catches up with the best local efforts to give patients access to their health records.
Dr Brian Fisher, a GP in Sydenham, south London, provides patients with a kiosk in his waiting room where they can read their record and get electronic advice. The touch screen is a version of the doctor's practice management system, from Emis, a specialist British firm that dominates the GP computing market. Access is controlled by a fingerprint reader.
Patients see everything in the doctor's record, apart from information about third parties. Results of tests are labelled to show whether they are normal or whether the patient should see the doctor. Fisher stresses that patients don't suddenly get hit with bad news. "We wouldn't put anything on the system that would have frightening implications without talking to the patient first."
Patients can print off records and in future, they will be able to burn an encrypted CD. Fisher has been sharing paper records for 18 years and reckons about three-quarters of patients look at them. Computer access was a logical step now that the practice keeps all its records electronically.
The system also helps patients make difficult decisions, for example whether to have surgery. A library of decision aids in the kiosk takes patients through the process and advises them of side effects. This is an important facility: Fisher estimates that three-quarters of his patients don't have the internet at home.
By 2008 or thereabouts, every patient in the NHS in England should have access to their electronic medical record. (Scotland and Wales have broadly similar goals, though they are going about them differently.)
However, whether the NHS uses new IT as a reason to shed some hospitals depends on political and cultural as well as medical factors. Even as the NHS invests billions in IT, it continues to borrow money to build new hospitals.
Clinically, the trend is away from disease-palaces and towards short stays and day-care in specialist centres. Last week, a study in the BMJ claimed that a heart surgical procedure similar to the one carried out on Tony Blair early this month could be safely carried out by a nurse in a day surgery unit.
However, thanks to the animosity between clinicians and NHS administrators, attempts to move procedures out of hospitals are often attacked as cost cutting. Last week's BMJ paper attracted a flood of correspondence voicing fears about the consequences for training junior doctors.
There is a precedent. In the last century, the Royal Navy clung to big ships because senior officers needed something to command and junior officers somewhere to learn. Today's big teaching hospitals are the NHS's dreadnoughts. And like dreadnoughts, hospitals are political dynamite. Hospitals are still vote winners, even if people die there.