An artificial pancreas that will help diabetes patients monitor their glucose levels will likely be available in the next two years.

The revolutionary iPhone-sized device monitors the blood sugar levels of patients with type 1 diabetes and automatically injects the right amount of insulin. The device will be attached to the patient's clothing and will monitor glucose levels and administer insulin as required through patches on the skin.

In the United States, about 1.25 million children and adults are affected by type 1 diabetes. Type 1 diabetes happens when the pancreas' beta cells cease to produce insulin, the hormone responsible for removing glucose from the blood and carrying it to the cells to be used as energy.

Patients currently have to constantly monitor their blood sugar levels and inject themselves with insulin up to five times a day to keep their blood glucose in control. Insulin injections are the most common for of insulin administration

But insulin requirements vary every day, depending on the patient's diet and activity levels.

According to a press statement, the scientists working on the artificial pancreas combined two existing devices - insulin pumps and glucose monitors - into an automatic closed-loop system known as the artificial pancreas.

"In trials to date, users have been positive about how use of an artificial pancreas gives them 'time off' or a 'holiday' from their diabetes management, since the system is managing their blood sugar effectively without the need for constant monitoring by the user," study authors Roman Hokorva and Hood Thabit of the University of Cambridge, UK said in a statement.

In the research, which was published in Diabetologica, scientists compared the results of a number of studies and analyzed how adults and children responded to the device.

The researchers found that the artificial pancreas had been successful in managing the condition and at the same time significantly reduced the time patients had to spend on fluctuating sugar levels compared with the self-administration technique.

According to the researchers, the device could also eventually replace the need for pancreas transplants in the future.

In an interview with Mail Online, the researchers said that the artificial pancreas will be available to the public by 2017 in the U.S. and by 2018 in the UK and Europe.

The device is currently being assessed by researchers based on different factors, which includes speed of action of the forms of insulin used, reliability, convenience, accuracy of glucose monitors, and cybersecurity to protect devices from hacking.