It may sound like something from a science-fiction film, but a Canadian inventor believes he has made a device which could eventually allow patients to test for infections and illnesses from home.

Dr. Paul Lem, who created the Spartan Cube, founded the firm Spartan Bioscience in 2005 along with his brother John and Dr. Jamie Spiegelman in an attempt to make the invention a reality.

The cube operates as a miniature DNA analyzer that is roughly the size of a small coffee cup and can fit in the palm of your hand.

A cheek swab is inserted into a cartridge at the top of the cube. The cube's internal hardware breaks open the cells found on the swab, releasing the DNA, making billions of copies and hitting them with a fluorescent light to analyze the sample and determine if the user is suffering from a disease or an infection.

The test results are sent to a tablet or laptop for doctors or patients to read in mere minutes.

"I think this is really going to change the way we treat our patients," said Spiegelman. "Tests like this are really the future of medicine."

Lem said part of his training in medical school involved running a lab, which brought him into contact with DNA analyzers.

He admits part of his fascination with creating the cube came from Star Trek and its ubiquitous Tricorder, which scans a person and immediately provides a diagnosis.

Witnessing a cancer patient wait a month to find out what sort of drug they needed was another pivotal event, Lem said. It solidified his goal to create a device that would drastically cut down that wait.

"We get instant email, instant communication and so why should it be that lab results should take that long to get back to you?" said Lem.

The cube can identify infections such as strep throat or sexually transmitted diseases, foodborne infections and more.

Heart specialists in Ottawa are testing the device to see if it can cut the time it takes to do a seven-day genetic test used to prescribe the correct blood thinner to just minutes.

"We are able to test this technology and prove that, in the context of real patients, we can identify the gene and then pick the right drug for the right patient," said Dr. Derek So, an associate professor at the University of Ottawa Heart Institute.

The goal is to eventually make the Spartan Cube a device that people can bring home to conduct their own testing.

"When I am 80 years old, I want to look back at whatever I have picked and say, 'Those were years that were really worthwhile, I worked on something that really mattered,'" Lem said.

With files from CTV’s medical specialist Avis Favaro and producer Elizabeth St. Philip