Imagine the scenario: you have been suffering from pain in your joints. You go to your doctor but he doesn't need to examine you.
He simply takes a small blood sample and places it in a machine, about the size of a printer, on his desk.
A few minutes later he is able to tell you that you have the early stages of rheumatoid arthritis, a condition which in the past devastated the lives of thousands of people, but not to worry, he can a prescribe a drug which will ease your symptoms immediately.
It may seem like something from the medical bay of the Starship Enterprise but this scenario is coming closer to reality.
People with rheumatoid arthritis will be amongst the first to benefit from the work of a new centre for "stratified", or personalised, medicine in Glasgow.
The centre aims to end the suffering of thousands of people who have to try out different drugs before they find the one which works best for them.
Finding the right drug regime is particularly difficult for people diagnosed with rheumatoid arthritis.
Most are prescribed a drug called Methotrexate but at least 60% of patients suffer side effects, including liver damage, or they simply don't respond to it.
Liz Mackay Saville developed rheumatoid arthritis in 2008. While her consultant tried to find the right drug combination her condition deteriorated so much that she had to use a wheelchair and leave her job.
"For me it was really trial and error," she said. "I took so many drugs, increased them, tried less, then my liver was affected and I had to stop them again. It was like a yo-yo the whole time."
"This stop-start really took about two years out of my life. I mean, people are in prison for less than that. You're really a prisoner in your own body."
"I couldn't get up. I couldn't go out. I had to use a baby's cup with two handles and even then would drop it all over myself."
Scotland is at the forefront of a worldwide revolution in stratified medicine which could consign Liz's experience to history.
The clinicians, geneticists and data analysts working in Scotland benefit from a perfect combination: lots of data about lots of sick people. Scotland has the worst health record but the best health records, particularly in rheumatoid arthritis.
In 2010 consultants and academics joined forces to collect detailed information about every newly diagnosed rheumatoid arthritis patient in the country - a unique cohort which currently exceeds 1,000 individuals.
The massive amounts of genetic, clinical and molecular information generated by this group of individuals is being analysed by data experts Aridhia, in a project which is as much about maths as biology.
"As medicine becomes much more precise and data driven, our role is to find out how we collate that data," said chief executive David Sibbald.
"We're using the data to find answers in advance. Are you a responder to this drug or not? Is this drug going to have a toxic effect on you or not?
"Becoming more precise about how you treat people should have an economic benefit as well."
The University of Glasgow's rheumatoid arthritis specialist Prof Iain McInnes says it is an incredibly exciting time.
"We've seen spectacular advances in the treatment of rheumatoid arthritis in the last 10 years," he said. "But one of the greatest frustrations our patients face is that they're given medicines which could potentially give them benefit or potentially add to the risk.
"They don't know which is going to be their fate. What an easing of the mind if they had some degree of certainty about what their medicine was going to do for them."
The £20m Stratified Medicine Innovation Centre, which is currently based at Thermo Fisher Scientific near Glasgow, will move to the new South Glasgow hospital when it opens in 2015.
It will also study cancer, cardiovascular disease, diabetes, respiratory disease and infectious disease.
Kent Davidson of Thermo Fisher Scientific said: "An ambitious programme like this would have been impossible a few years ago due to cost.
"Semiconductor-based sequencing technology has reduced both cost and the time it takes to 'sequence' an individual patient's DNA.
"This technology will soon be moving from research centres like this to clinics, helping thousands of people."
Although it will take some time for the full benefits to be realised, Prof McInnes expects the first results to be available within a few years.
Looking further into the future, however, he predicts an exciting scenario.
"It's possible a new generation will never know the real effects of the condition because they are treated so accurately and aggressively," he said.