Patients will be able to stop their NHS records being uploaded electronically under government plans announced today.
Lord Warner, the junior health minister, announced the shift in position as he accepted the recommendations of a taskforce set up to assess the future of electronic NHS patient records.
And in an interview today Lord Warner defended the system against charges that it would allow police to go on "fishing expeditions" for suspicious information about patients.
The minister set out plans for patients to be able to view their records and amend details as well as how they would be able to consent to information being shared with professionals across the NHS in England.
The records system is part of the government's 10-year, multi-billion pound upgrade of NHS IT.
Initially, patient records will contain data on medication, allergies and adverse drug reactions and will be known as Summary Care Records.
How they will be extended to include more sensitive information - such as if a patient has HIV or a mental health problem - is still being negotiated.
Responding to criticisms of police using the system to "trawl" for information, Lord Warner told BBC Radio 4's Today programme that the situation would remain the same as it is now.
"In certain circumstances the police now in particular types of situations where a case is in court can [access information], and the courts can require information to be given to the court. It will not change in any way," he said.
"The police will not be able to have fishing expeditions. It's only a matter for the courts, in particular cases where the courts require that information to be provided for criminal cases."
He said that the system would have "a smart card and a range of Pin number entries" in order to make sure not every "Tom, Dick or Harry" could access sensitive material.
It would be a criminal offence for unapproved people to gain access to this information, he said.
Today's announcement means that patients will be allowed to veto their records being shared nationally, a shift on the government's original position.
How the veto can be achieved has not yet been decided.
Lord Warner said that, for all people, "if they don't want to have information uploaded, they can stop it before it is uploaded."
Under the taskforce proposals, a public information programme would inform patients they have a set period of time to view their record.
They will either be able to view it on the website HealthSpace - which will act as a secure internet "window" onto their record - or can ask their GP for a printed copy.
Patients will be invited to correct or amend their record and offer explicit consent for the information to be shared with medical professionals caring for them.
Those who do not wish their record to be shared electronically at all will be able to opt out, meaning it will remain in their GP's surgery.
After a set period of time - possibly around two months - it would be assumed that patients who have not viewed their record had given implied consent for it to be shared.
As at present, patients who demonstrate that they are suffering mental distress through having their record held electronically, even in the GP's surgery, will have the right to ask for it to be removed.
The taskforce recommendations on consent go some way to alleviating fears expressed by doctors' and patient bodies about patient confidentiality.
There are worries that a compulsory electronic records system could damage the GP-patient relationship, with patients not wanting to give information in case it was shared.
Responding to this point, Lord Warner told Today: "We agree that at a point where people can make an informed view that they don't want this record shared any more widely than with their own GP they should be able to do so.
"We're just going to test the system on a limited population along the basis on which it's already operating in Scotland."
Concerns have also been expressed about how secure the entire electronic system is and whether implied consent would lead to some patients having information shared that they regard as confidential.
Lord Warner said that it was important that the majority of people, who do not object to having their information shared or uploaded, did not "lose out" due to the views of a few.
He added: "At the moment this debate is being driven by what I would regard as a minority of people."
Those who could miss out were vulnerable groups like the elderly, for whom it was vital that emergency paramedics had the right information on things like medication, Lord Warner said. He continued: "We believe that, despite the noise it has generated, electronic patient records will be of huge benefit to patient care.
"We believe there are myths about how effective the present arrangements are on safeguarding the interests of patients."
The new system will electronically link more than 30,000 GPs in England with hundreds of hospitals and will hold records for 50 million people in England.
Pilots on the electronic records system will start next spring, with an anticipated wider roll-out planned for 2008.
Lord Warner said that there were many problems with the current system, which was why the NHS had to move forward with the IT programme.
These included records being wrong or getting lost, tests being repeated and patients being forced to recount their medical history to different health workers, and the difficulty in patients finding out what had been written about them.
Under the new system, incorrect information is unlikely to be deleted altogether.
However, it could be "suppressed" on the system or marked up as an error and patients can have their comments added.
James Johnson, chairman of the British Medical Association, said: "The recommendations in this [taskforce] report provide a good first step and we look forward to building on this work ...
"It is crucial to the success of the NHS Care Record that the anxieties of both patients and professionals are properly dealt with and that the wishes of patients are fully respected."
But Guy Herbert of the pressure group NO2ID said: "You are expected to petition an official to be allowed to keep intimate details of your life private, permission which he may, in his wisdom, decide to grant ... but only after having examined whatever it is that you don't want others to know and agreed that you are sufficiently distressed for you to be permitted exemption.
"Medieval trial by ordeal was fairer."