

HealthKit in depth from the perspective of a swimming app - ChrisMoisan
http://info.activeintime.com/news/2014/10/8/say-hello-to-healthkit

======
scoot
What this article fails to mention is that Healthkit is still utterly broken.

I linked up a couple of health apps to it, and after MyFitnessPal's first
attempt at integration spewed a ton of duplicate data across almost every
nutrition category, I had to clean up their mess, and disable most categories.
Even their second attempt is broken.

Meanwhile, Healthkit keeps forgetting what I've added to the dashboard, and
shows empty graphs saying 'No Data' for categories that do have data, either
app generated or manually input.

Clicking _Show All Data_ just brings up an empty page with a busy spinner that
never goes away. If the database is corrupt, there's no way to reset it, and I
can't just uninstall and reinstall it. Not that I should have to.

When it did have sufficient (manually corrected) data, it failed to use this
to estimate BMI and BMR. It's nothing but a dumb, broken database.

~~~
smackfu
Yeah, now there is the potential for one buggy app creating bad data to
"infect" all your other apps via HealthKit. Like if it doubles up your runs,
now your activity calories are wrong in your diet tracker. Yay.

~~~
earltedly
One of the protections there is that if you delete an app from your phone,
you've got the option to also delete all of it's data from HealthKit. Still
agree it's a pain though when it does happen.

------
Someone
_" Apple are making quite a big deal about this. The recorded data is of an
incredibly private and personal nature and they’re preventing it from being
passed over any kind of network except as part of a secure backup. [...] A
more real world case is that hospitals are starting to create out patient
monitoring apps. Whenever a patient uses their blood pressure monitor, the
hospital app gets notified of the new reading, sends that data to the hospital
computers, a doctor might then review it, see there’s a problem and call the
patient in."_

I don't see how both can be true, and I don't know which I would want. On the
one hand, the first is highly desirable, but that second use case makes lots
of sense, too.

Reading [https://developer.apple.com/app-
store/review/guidelines/#hea...](https://developer.apple.com/app-
store/review/guidelines/#healthkit) I think the first isn't entirely true:

 _" 27.5 Apps that share user data acquired via the HealthKit API with third
parties without user consent will be rejected"_

So, that's not a blanket forbidden. And likely, they aren't preventing
anything. That game with an on screen heart rate indicator could easily
encrypt heart rate information and send it alongside other data to a game
server. It would be hard to detect that.

~~~
earltedly
Thanks for that - you've caught me being a bit ambiguous. I've corrected it
now.

What I was intending to say is that your HealthKit store itself is never
transmitted as a whole /except/ as part of an iCloud backup. Apps can of
course move individual data points around with the users permission so long as
they say so in their privacy agreements.

'The recorded data is of an incredibly private and personal nature and they’re
preventing HealthKit stores from being passed over any kind of network except
as part of a secure iCloud backup'

------
jader201
_> A more real world case is that hospitals are starting to create out patient
monitoring apps. Whenever a patient uses their blood pressure monitor, the
hospital app gets notified of the new reading, sends that data to the hospital
computers, a doctor might then review it, see there’s a problem and call the
patient in._

I don't see how doctors could rely on this data. There are so many devices
that may use HealthKit, and many of them are (for now) nowhere near as
reliable as the equipment doctors would use for the same metrics.

Take blood pressure monitors, for example. If you shop around for a good one
for iOS, even the best ones are still questionable, at best. Some people claim
they're very accurate, while others say they're way off.

It seems we have a _long_ way to go before doctors could rely on the data from
HealthKit devices.

~~~
k-mcgrady
The data may be wrong but couldn't the trends be useful? For example a heart
rate monitor consistently off by -20bpm will still provide an accurate trend
on heart rate over a period of time. I guess the problem here is that the
data, even if wrong, would have to be consistently wrong by the same amount.

~~~
danielbarla
Your example is overly optimistic - if it was consistent like that, you'd just
adjust it at the factory or calibrate it later on, and you'd have a perfect
instrument. In reality, the data is all over the place, with a large spread.
You might still be able to get some kind of weak trend out of it, if you knew
the tendencies of that particular equipment. I doubt you could even take long-
term averages and rely on them.

Take for instance an elliptical machine I own (it's about 4-5x the price of
the cheapest ones, so I guess we can call it "mid-range"). The heart-rate
monitor on it is almost worse than useless. Sometimes it will report 200 BPM
when I'm not holding the sensors. Sometimes it will under-report for long
periods (e.g. reporting < 120 in the middle of a session, where I'm fairly
confident my actual heart rate is around 150). I would not recommend relying
on these things much.

That said, I think the general idea is not a bad one; we could definitely use
more data to analyse. It's just that equipment that gets sold to the public is
pretty erratic at the time of writing.

~~~
k-mcgrady
I wonder why these instruments are so hard to get right. I'll be interested to
see how well the sensors on the Apple Watch work considering it's essentially
the official companion to the Health app. I'd assume that monitoring heart
rate form the wrist should be quite accurate but it probably depends on how
tight someone has the watch on and the exact position it is on their arm.

------
Poiesis
I have to agree with the "broken" comments. I can't speak to the API, but the
Health app sure is a head-scratcher. Those sub-minute steps intervals
mentioned by someone else are just baffling from a normal user's perspective.
And as far as I can tell, there's no way to answer "How many steps did I walk
on Monday?" without breaking out a calculator and adding them up yourself.

