The Apple Watch needed a more accurate calorie counter. That's how the story goes. Apple wanted fitness to be a flagship feature for its new device and there was no other way to do the job even passingly right. So, Apple invested in a heart rate monitor.

It wasn't part of some secret multi-year plan to provide customers were health information or pitched to Apple executives and the board as way of grabbing a piece of the multi-billion dollar medical industry. When first envisioned, it wasn't even intended as a way to ensure Apple Pay security on the wrist, though it certainly turned out to be a great way to do just that.

It was simply a way to make sure the Workouts app recorded how many calories you were burning as accurately as possible.

But it lit a spark.

Watch, interestingly enough, is run by Apple's chief operating officer, Jeff Williams. And, as he and his teams, which include Kevin Lynch, the vice president in charge of watchOS software, saw how it was working and what kind of data it was getting, health began to join fitness as an area of interest.

It was still slow. It was still steady. Apple needed a place to store all the information it was getting from the Watch, so the Health app was created. Then, it was realized Health.app could store a whole bunch of similar information, and from more than just the Watch. So, HealthKit was born, which could talk not just to Watch but to other apps and accessories, became an inextricable part of it.

The interesting thing about data is that once you start to get it, you start to imagine all the things that you can do with it.

The heart rate data, for example, led Apple to wonder what could be done if it detected abnormal heart rates. It wasn't a hospital-grade sensor, to be sure, but it was almost always on, and that's not true for most hospital-grade sensors.

So, yes, it turns out that the best sensor is the one you have on you.

But Apple also realized having devices with your all the time, including Apple Watch and iPhone, could be a boon to all sorts of health and medical services.

Medical ID was an obvious example. Just putting your critical medical information in an easy-to-access place could make sure emergency services personnel could get to it when they — and you — needed it most.

ResearchKit was a less obvious example. As Apple started to think about how it could affect health at a larger scale, using the devices we have with us, rather than relying on tear-tag flyers, seemed like it could be transformative. Again, it flew under the radar at first, never part of some big pitch or potential new revenue stream. But the potential benefits were enormous.

ResearchKit is an open source framework introduced by Apple that enables your iOS app to become a powerful tool for medical research. Easily create visual consent flows, real-time dynamic active tasks, and surveys using a variety of customizable modules that you can build upon and share with the community. And since ResearchKit works seamlessly with HealthKit, researchers can access even more relevant data for their studies — like daily step counts, calorie use, and heart rate.

The flip side of tear tag flyers for research were endless lists for follow up care. The same ubiquity of the same devices, Apple realized, could also help with that. So, next came CareKit:

An open source framework for developing apps, CareKit helps users better understand and manage their health by creating dynamic care plans, tracking symptoms, connecting to care teams, and more.

The next and most recent step for Apple is using its devices and its security to link us with our medical institutions through Health Records:

With the Health app in iOS 11.3, a new beta feature makes it easier than ever for users to visualize and securely store their health records. Now your patients can aggregate their health records from multiple institutions alongside their patient-generated data, creating a more holistic view of their health.

Apple has been accused of not consulting with outside healthcare professionals while working on the Watch and on its fitness and healthcare features. While that's sometimes true, it's mainly because Apple actively recruits healthcare professionals into its projects. Many of the team leads on Apple's health initiatives have medical degrees or are doctors who still spend part of their time practicing.

By bringing the expertise in-house, it means the experts can have earlier and fuller access to the projects and, instead of brief consultations, can help shape the projects and become invested in bringing them to market.

It also means Apple isn't just building tools for researchers and caregivers. Apple is building tools as and with researchers and caregivers.

Now, Apple, famously, has had… absolutist ideas about privacy. Some believe to a fault — denying themselves the acceleration in machine learning that could be gained from mining the data of its hundreds of millions of users.

But, to its core, Apple believes customer data belongs to customers and doesn't want anything to do with it, unless it absolutely has to and then only for as long as it absolutely has to.

Data collection doesn't have to lead to data exploitation, though. That the biggest internet services companies have linked those two activities is a reflection only of the business model they've chosen. Different choices can also be made.

That's why, after some reflection, Apple decided it didn't have to be quite so absolutist about data, especially not when the benefit it could provide wasn't in business model but in customer care.

So, with HealthKit, Apple set it up so users could explicitly opt-in to sharing their data. That way, if the effects or complexity of their conditions made it difficult to enter precise information, like what medications are being taken and when, Apple linking everything together for them can help.

The advantage Apple has, and the peace-of-mind Apple customers have, is that none of this information is sucked up to anyone else's servers, used to feed anyone else's database, and then used to build profiles and auction off ads.

Instead, the data is used to try and better understand healthcare concerns to, ultimately, better treat patients. And the amount of trust that engenders can't be underestimated.

Duke University's MS Mosaic is a one example.

Multiple sclerosis is an immune-mediated illness that strips neural circuitry of its insulation, thereby slowing communication.  Many factors determine how these denuded lesions emerge, and how much they impose symptoms.  While we know these factors interact, measuring the interactions is difficult because they constantly change.  As a result, MSers have fragmented experiences that haven't been explained, let alone anticipated.  "MS Mosaic" is designed to gather the fragmented MS experiences together and use advanced computing methods to create the most comprehensive picture of MS to date.

The The University of North Carolina at Chapel Hill's PPD ACT is another:

PPD ACT is a research study developed by Postpartum Depression: Action Towards Causes and Treatment (PACT) Consortium, an international group of academic clinicians and scientists committed to understanding the interaction of genes and environment to predict which women are at risk of postpartum depression (PPD). The study aims to help researchers understand why some women suffer from PPD and postpartum psychosis (PPP) and others do not - critical knowledge that will improve detection, prevention and treatment of these conditions.

Join the PPD ACT study by downloading the app in the App Store or Play Store to help find the cure.

'Play Store' there not a typo. Apple intended ResearchKit to help everyone, not just people using Apple devices.

I've had a chance to talk with several teams who've fielded these kinds of projects and all of them speak passionately not only about what they're doing, but how Apple's technologies are helping them reach more people, faster and more effectively, and obtain better results than ever before.

That's the fascinating duality of Apple's current approach: Solving healthcare problems for the individual with new watchOS features, and solving problems for healthcare itself with frameworks like ResearchKit and CareKit.

Apple never discusses future projects, of course, but it feels like we're still at the very beginning of its health and fitness activities.

Additional sensors are the most often rumored. Though, like many rumors, realizing them in a practical, mainstream way can be harder and take longer than typing them out in a blog post.

I'm more interested in how Apple can continue to make us more connected and healthcare more convenient.

I can already tap my Apple Watch for Apple Pay, to connect to Gym equipment and, coming soon, in place of Student ID cards. It's not hard to imagine that, one day, I might be able to walk into a clinic or hospital, tap my Apple Watch or iPhone, and immediately share my health records, medications, allergies, and other data. Things I'd otherwise have to spend precious time tediously filling out from scratch, each time.

That's the kind of thing that can happen when you address healthcare from the frameworks down to the silicon.