We have the technology to start a new era in medicine by precisely matching drugs to people's genetic code, a major report says.
Some drugs are completely ineffective or become deadly because of subtle differences in how our bodies function.
The British Pharmacological Society and the Royal College of Physicians say a genetic test can predict how well drugs work in your body.
The tests could be available on the NHS next year.
Your genetic code or DNA is an instruction manual for how your body operates. The field of matching drugs to your DNA is known as pharmacogenomics.
It would have helped Jane Burns, from Liverpool, who lost two-thirds of her skin when she reacted badly to a new epilepsy drug.
She was put on to carbamazepine when she was 19. Two weeks later, she developed a rash and her parents took her to A&E when she had a raging fever and began hallucinating.
The skin damage started the next morning. Jane told the BBC: "I remember waking up and I was just covered in blisters, it was like something out of a horror film, it was like I'd been on fire."
Her epilepsy medicine caused Stevens-Johnson syndrome, which affects the skin and is far more likely to happen in people who are born with specific mutations in their genetic code.
Mrs Burns says she was "extremely, extremely lucky" and said she supports pharmacogenomic tests.
"If it saves your life, then it's a fantastic thing."
Nearly Everyone Is Affected
Jane's experience may sound rare, but Prof Mark Caulfield, the president-elect of the British Pharmacological Society, said "99.5% of us have at least one change in our genome that, if we come across the wrong medicine, it will either not work or it will actually cause harm."
More than five million people in the UK get no pain relief from codeine. Their genetic code does not contain the instructions for making the enzyme that breaks codeine down into morphine and without it, the drug's a dud.
The genetic code of one in 500 people puts them at higher risk of losing their hearing if they take antibiotic gentamicin
Pharmacogenomics is already used for some medicines. In the past, 5-7% of people would have a bad reaction to the HIV drug abacavir and some died. Testing people's DNA before prescribing the drug means the risk is now zero.
Scientists have looked at the 100 most prescribed drugs in the UK. Their report says we already have the technology to roll out genetic testing to guide the use of 40 of them.
The genetic analysis would cost about £100 and could be done using either a sample of blood or saliva.
Initially, the vision is to perform the test when one of the 40 drugs is prescribed. In the long term, the ambition is to test well ahead of time - possibly at birth if genetic testing of newborns goes ahead, or as part of a routine check-up in your 50s.
"We need to move away from 'one drug and one dose fits all' to a more personalised approach, where patients are given the right drug at the right dose to improve the effectiveness and safety of medicines," said Prof Sir Munir Pirmohamed, from the University of Liverpool.
"What we're doing is really going to a new era of medicine, because we're all individuals and we all vary in the way we respond to drugs."
He said that as we age and are prescribed more and more drugs, there's a 70% chance that by the age of 70 you will be on at least one drug that is influenced by your genetic make-up.
Lord David Prior, the chairman of NHS England, said: "This will revolutionise medicine."
He said pharmacogenomics "is the future" and "it can now help us to deliver a new, modern personalised healthcare system fit for 2022".