The modern pharmaceutical age has granted doctors a panoply of drugs to help with a variety of conditions, but how to ensure the patient takes them?
The latest hi-tech solution to the problem is the "digital pill" - a drug that tells your doctor when you've taken it. An ingestible sensor within the drug transmits a signal from your gut to a patch on your arm. This in turn alerts your GP that you are sticking to your course of medicine.
Such technology could save the UK's NHS millions of pounds that would otherwise be spent treating patients that haven't taken the drugs they are prescribed, particularly vulnerable groups such as the elderly or mentally ill.
The idea is not a fantasy - in November US medicines regulator the Food and Drug Administration (FDA) approved the world's first "digital pill".
The antipsychotic drug for the treatment of schizophrenia and bipolar disorder, a digital version of existing medicine Abilify, was developed by Japanese pharmaceutical company Otsuka and US digital medicine firm Proteus.
It works by incorporating a sensor the size of a grain of sand - made of silicon, copper and magnesium - into a pill. When this hits the acid in the patient's stomach it triggers an electric signal to a patch on their skin, and then on to their doctor and up to four other people.
It is part of a growing wave of digital medicines that doctors hope can provide both effective treatments and remote monitoring of patient health.
Both pharmaceutical companies and Silicon Valley giants are investing in the space.
The past few months have produced not only the world's first digital pill, but also the first mobile app for substance-use disorders and progress towards the first prescription video game for treating ADHD.
However, the encroachment of technology into healthcare has raised security and privacy concerns.
Squaring the benefits with these fears is a challenge for the firms rushing into the market.
London-based digital health company Ixico partners with drug firms to help them develop treatments for neurological diseases.
The firm, listed on London's junior market Aim, has developed wearable monitors that can detect changes to different parts of a patient's brain, helping show the effectiveness of treatments over time.
Ixico's Iain Simpson believes remote monitoring of patients will become "more common" in healthcare practice.
"Many current measures of neurological diseases require a clinical assessment at a hospital," says Simpson. "These are often subjective and cannot be done on a continuous basis so may not pick up changes in disease symptoms between the visits."
Simpson argues remote monitoring holds the potential to save the NHS money; but he is alive to privacy issues calling them "our upmost priority".
Digital monitoring of patients is becoming more commonplace in clinical trials. US-based healthcare tech firm Medidata develops mobile apps for drug companies. Patients in cancer trials, for example, can use the apps to report symptoms and quality of life, while an activity tracker can measure daily movement and sleep.
Joe Dustin, of Medidata, believes this kind of tracking will move fast from clinical trials into an everyday healthcare setting.
"Today if you have a knee replacement you are handed a stack of papers and physical therapy recommendations," he says. "What if instead, a doctor was able to prescribe an app connected to your medical records with a personalised care plan full of daily activities and reminders?"
The most immediate applications of digital health could be in areas like diabetes and respiratory medicine.
In diabetes, Cellnovo is developing a digital glucose monitoring system linked to an insulin pump that works essentially like an artificial pancreas.
Respiratory is another "big area" where digital health can help patients and the NHS, according to Panmure Gordon analyst Julie Simmonds.
"Companies are spending a fortune developing new drugs, but if you could get patients to take the old ones properly it would make more of a difference," she says.
She points out that companies like Propeller Health offer attachments to inhalers that can tell when they've been used properly and send reminders to a patient's phone to use them.
The US is ahead of the UK when it comes to approving digital health products. Last September the FDA approved an app developed by Pear Therapeutics for treating substance-use disorders. It digitises a form of therapy known as cognitive behavioural therapy, with the aim of helping patients overcome addiction to tobacco, alcohol or illicit drugs.
Boston-based PureTech Health is also in the business of developing novel digital treatments, from voice recognition software that can tell if you're ill to video games to treat ADHD. The Aim-listed firm was awarded a US patent last autumn for its voice recognition software.
It can pick up "vocal biomarkers" associated with conditions like Parkinson's disease and depression from as little as "six seconds of speech", according to the company's chief executive, Daphne Zohar.
PureTech is also close to launching the world's first prescription video game - an action-packed tablet game that has been proven in clinical trials to help treat children with ADHD.
"Both the traditional pharmaceutical firms and the consumer tech companies are converging in this space," Zohar says. "It's very exciting to be at the intersection of those two areas."
Consumer tech firms have certainly demonstrated an appetite for healthcare. Google's sister company Verily is ploughing money into numerous health ventures, Apple is beefing up the monitoring capabilities of products like its watch, and Amazon is moving into US pharmacy.
The popularity of products like Fitbit also shows consumers are keen to snap up gadgets designed to monitor and improve their health. But analysts wonder whether consumer tech firms have the stamina for clinical trials and the rigours of obtaining regulatory approval for medicines.
Mick Cooper, analyst at Trinity Delta, says Silicon Valley will not be afraid to wade in: "On the tech side, Google and Apple are making large investments and it is hard to imagine that they will not be at the forefront of artificial intelligence and app-based digital health."
But he adds a note of caution. "It is worth remembering medicine is a very conservative profession," he says.
"Many people still prefer human-to-human interaction for all medical matters, so despite the progress and increased investment in digital health, it could take a long time for the approaches to be adopted."