IOS HealthKit

Friends

I know this topic has come up before, but I’m not aware that a clear (to me) answer has been given. Someone said that you could only use HealthKit with declares, two other developers were apparently creating libraries that had a HealthKit feature (though I know no details). I know MBS has a HealthKit plugin for Filemaker.

Hopefully, someone knows more about this than me. Can we (the average user…me) use HealthKit with Xojo?

Thank you
fritz

Well, what do you like to do with HealthKit?
That is a huge framework with a lot of stuff…

Christian

I am not all that enamored with making an IOS app, but a friend who’s a doctor has always had this idea of a phone-based health diagnostic device. I have no idea whether this is feasible or ready for primetime in terms of real medical diagnostics, but that’s his idea.

So I’m curious if anybody in the Xojo universe has ever implemented HealthKit or parts thereof.
I guess you should know the workings of it, if you’ve stuck it in Filemaker.

He’d like to do pulse, blood pressure, temperature. I think the idea is that this would be something patients or the girls in the front office could do before he sees them maybe. Even though these three tests are really simple to do with modern inexpensive tools that even I can operate. Maybe he could do a pulse before and after a set amount of exertion, compare the two over a period of time. That would be a value-add over the standard tools.

Thanks
fritz

1 Like

Well, HealthKit is a database for health data. It synchronizes and applications can fill in data or query it.

But to do HealthKit, you would need to register with Apple as there is some extra vetting done for people who want to use HealthKit.

That is the reason we don’t include a HealthKit API right away.
Even for our FileMaker plugin, it’s not in the public release as only a few people can use it.

@Christian_Schmitz, like @friedrich_boettger I am also interested on integrating some patient data from the Healthkit database to my EMR software. You said MBS do not include APIs because a few people use it. Is the door open to join people interested like @friedrich_boettger and me in order MBS analyze the possibilty of including at least a minimun set of APIs for Healthkit ? What is it needed to be considered ?

I’m an Apple developer still (from a long time back) but I don’t participate in any IOS development simply because I don’t have the patience for the bureaucracy involved. However, if increasing political and developer pressure ever causes Apple to lighten up a little on their restrictive policies, I would love to try my hand at a phone app or two (I tried a couple with Phonegap and Node and Swift and such, but they were just hobby apps). Since I’m already old and Apple shows no signs of relenting, I fear my prospects for seeing this change are limited.

Still, from your point of view, it seems a potential lucrative market (along with HomeKit). If you’re planning on selling a lot of Filemaker-Healthkit integrations, I can’t imagine Xojo-Healthkit integrations would fare much worse. You can argue that non-programmers would find Filemaker easier to integrate, but it’s not exactly the model of scalability, and the expense of a larger deployment is onerous (especially if you buy licenses from Filemaker directly). It’s not like somebody’s going to come out with a commercial EMR system based on Filemaker (though it would be just as fine for a small practice with a clever staffer who could save money on a professional programmer).

If you try it, I guess I’d use it. But I’m not a good demographic sample. And I’m not the one doing the work.

peace
fritz

Mariano

I bet you’d be a better prospect than me for an MBS HealthKit plugin, but as a recent purchaser of MBS plugins, I enjoy seeing what Christian comes up with just on an aesthetic level. His stuff sure does give me interesting things to do on weekends.

I love Apple hardware, but submitting apps to a faceless bureaucracy is not my idea of a good time. If you could only side load these things, I’d have at least a few of them running on my phone right now.

peace
fritz

I have a handful of iOS apps in the App Store. Their policy is not very restrictive, actually. Once one has signed up as a developer, that’s pretty much it.

PS: At 71, I am hardly young anymore. But I find programming far more satisfying than arm chair and TV remote.

3 Likes

Their policy when it comes to HealthKit is quite restrictive compared to almost everything else, however.

I was not referring to Healthkit. It seems logical that when health is concerned, special precautions be in place to prevent wrong data.

I was referring to regular apps. There are no more restrictive regulations in the iOS App Store than the Mac App Store.

If anyone is really interested, we could discuss what you need.
But please read Apple’s documentation first, especially on requirements you have to fulfill to be allowed for the HealthKit entitlements.

1 Like

I have to clear up some misconceptions here. I have worked on a (sadly non-Xojo) production app for a major pharmaceutical company, and it is not true that you need to “register with Apple” for “extra vetting”, other than your regular developer account. In the app, you request permission from the user to access and update their HealthKit records, just as you request access to their Photos collection. In doing so, you provide textual descriptions of why you need access to that data, just as you do with Photos and other things. You also need to provide a privacy policy, but you should be doing that nowadays anyway. The only specific App Store requirement is that the app actually has to be related to health. In other words, you can’t request sensitive user health records, if you are making a color-matching game. Which seems perfectly reasonable.

There are many simple HealthKit tutorials out there. Many apps access HealthKit, and it’s not a scary thing. I wish Xojo could do it natively. You can read more at Apple Developer Documentation

1 Like

Continuing the discussion from IOS HealthKit:

MIchel

As a developer who was accustomed to creating an application and installing it (or giving it to someone to be installed) on customer devices without the necessity for a middleman setting the ground rules (and margins), I don’t care for Apple’s restriction on where I can sell an app (their store). The fact that some faceless employee can reject my app based on reasons I can’t anticipate or understand is enough to make me refrain from submitting one. Otherwise, I’m assuming you’re correct. Submitting an IOS app to the Apple store is probably no worse than submitting a MacOS app to the Apple store.

I have also heard from more developers than Jason that HealthKit apps are especially restrictive. I don’t know much about HealthKit or why it’s restrictive, but this is another reason for me not to actively pursue the subject. My customers are almost all businesses that want solutions for their computer network, so it’s just easier for me to continue in that vein.
Even as a youngster compared to you (I just turned 70), I am less willing to seek new markets than I was at 35.

While writing this, I started reading what Gavin Smith had to say, and certainly his experience gives me a new perspective. Obviously, as Christian Schmitz pointed out, I have to read the docs before coming to a conclusion. Clearly, as Mariono Poli suggested, Christian is willing to look into the possibility of a plugin for this purpose (without putting words in his mouth):

Probably the deal-killer for me would be the rules all the medical facilities have to deal with (or the ones they make up). Having consulted for a lot of medical facilities, I can tell you that the red tape clogging the health care system every minute of the day makes Apple’s restrictions seem inconsequential. If I did have a HealthKit-powered IOS app, I wonder how many pages of HIPAA and Sarbanes-Oxley I’d have to memorize (and be audited for) before I could get it on a customer’s phone.

peace
fritz

Please note that the restriction is only to get on devices of normal users to access their health database. e.g. you produce a bluetooth device to measure blood sugar and you like to push the results to user database. Or query the database and make analysis on top.

You writing software for doctors is unrelated to that, since that would only run in the office of the computer.

Anyway, if someone needs a plugin for this, please read HealthKit documentation from Apple first. Then send me an email later with what functionality you’d need from the framework in Xojo.

It has to be, because health information if protected by law (at least it is in the US and Canada).

1 Like

It is also in Europe, not only by local state regulations, but also by GDPR What is GDPR, the EU’s new data protection law? - GDPR.eu

1 Like

For anybody’s information, here’s the HealthKit documentation:
https://developer.apple.com/documentation/healthkit

Christian

I get the basic idea. It’s a lot more ambitious than I ever thought (of course a real lot of it is in beta). Apple, of course, is aiming high as always. They want to be the Universal Health Diagnostic device, not just keep track of your treadmill time.

Mariano Poli would be the best candidate for the plugin, because he has an EMR. I’ve installed lots of EMRs, but I don’t have APIs for them.

I know there’s a tremendous market for something like this, but I am unsure that I would be implementing a solution like this (except that I know how much fun it would be to record an EKG on my phone).

The parts where you start manually interfacing with the Apple watchdogs (evidently) is in the implementation of driverkit. I am assuming you would need to use that if you were recording an audiogram. Maybe if it’s via the internal mike you wouldn’t have to, I don’t know, but maybe that’s the part that other developers are complaining about when they talk about Apple’s restrictions.

I would want to start with something like a heart monitor for jogging and gym work, but there are already a whole pile of those. If you read some of these entries, it sounds like the Star Trek Enterprise Medical Clinic. They’re storing (and, I’m assuming, acquiring somehow) lactation, progesterone and pregnancy data–and much, more more. Do I want to be the dude collecting of all this? I don’t think so.

One can guess these are data types designed to be mapped to the fields of a particular pre-existing form (database) already in existence in an EMR, but if so it would sure be an indexing nightmare to have all these fields queryable.

peace
fritz

Hi All.
In my first approach to HealthKit I only want to create a simple iOS App that a patient (the owner of the data in the HealthKit database) will install in his/her phone and that the only thing this app will do is to read data from his/her own the HealthKit database, creates a JSON or an HL7 file/message, and send it to his/her MD.
The JSON file will be received by my EMR application and the data will be analyzed and included in the patient record in the application database.
So no privacy will be in risk and no written is needed to be done in the HealthKit database. Only reading.
The stuff is to connect to the HealthKit database and access to the right data to be transmitted.
Of course if this could be done I will go for something more complex and interesting in future steps of this “integration”.
I hope @Christian_Schmitz could have conditions to make this possible, and my life easier, with his incredible plugins I am slowly becoming some kind of addict.
Nice weekend for everyone.

Since HealthKit already has a Share With Your Doctor feature, wouldn’t it make more sense to hook into that functionality?

Q: How can interested healthcare organizations participate?

A: Healthcare organizations should confirm their eligibility for participation with their EHR vendor, and then send an email to healthrecords@apple.com to express their interest (U.S. only). To be eligible for this feature, institutions must participate in Health Records on iPhone and accept the Health app data Share with Provider Addendum to their Health Records Directory Listing Agreement. They must also accept the Health app data Share with Provider HIPAA Business Associate Agreement. Apple doesn’t charge any fees for participating organizations to offer this feature to their patients.

https://support.apple.com/guide/healthregister/health-app-data-share-with-provider-faq-apd531bc6215/web

1 Like

Thanks @Greg_O for this information. For my first step trying to communicate and get data from HealthKit it would be enough… The only issue is the “(U.S. only)” limitation for the healthcare organizations eligibility !!!