It’s the year 2029 and your Apple Watch has just flashed an important — and terrifying — alert. Apple’s location tracking technology, working in partnership with your national health networks, has shown that you may have come in contact with an outbreak of influenza. But with immediate treatment, any chance of infection can be eliminated.

In 1918, the H1N1 influenza virus Spanish flu is estimated to have killed between 50 and 100 million people worldwide. This virus strain remains an active threat to this day, along with thousands of other infectious diseases that could flower into pandemic status at any time. Humankind lives in fear of the next mass outbreak, but new technologies have the power to mitigate, or even eliminate that fear.

At the cutting edge of this new medical revolution is the emerging technological superpower of China. The government and citizens of China have adopted new technologies such as the smartphone, social networks and machine learning, at a rate unseen anywhere else. The same innovations that raise concerns of privacy and state overreach are also empowering the emergence of the IoMT — the internet of medical things.

By the year 2021, the new network of medical “things” connected via the internet, with investment giant Goldman Sachs estimating the IoMT will save healthcare providers some $300 billion a year. Prevention is far, far cheaper than treatment. The heart monitor in your Apple Watch can help make zero-cost lifestyle changes, potentially avoiding cardiac surgeries costing millions of dollars.

The real value of the IoMT rests in the big data it generates. Billions of on-body, wearable medical devices connected to hospital monitoring networks create data sets with value beyond easy imagining. In this data may rest the answer to preventing every major illness from cancer to Alzheimer’s, before we even know we are at risk for them.

Imagine that the next Spanish flu hits a world fully empowered by the IoMT. New infections are detected, not within days, but within seconds. Genetic markers shared by patients are cross-checked, to synthesise a treatment not in months, but in hours. An infectious outbreak that today might kill millions could, within a decade, kill only a few dozen before being crushed by human innovation.

To achieve this apparently miraculous outcome requires one additional element. The IoMT and the huge datasets it generates can never be fully exploited by human clinicians. Instead, this work will rely on the emerging powers of artificial intelligence (AI). Yes, the same algorithmic deep learning system that empowers self-driving cars and the chess-playing super-computer AlphaZero holds the key to the future of medicine.

This future poses an important moral question. Will we, the people, be willing to share our most private biomedical data, en masse, to empower the full potential of the IoMT and AI? On one hand are privacy concerns and the real risk of abuse. On the other is the end of infectious disease and many other horrors — consigned to history forever.

Which will you choose?