iOS app to export HealthKit data to InterSystems IRIS for Health (or any FHIR repository)
The objective is to create an end-to-end demonstration of the FHIR protocol.
What I mean by end-to-end, from an information source such as an iPhone. Collect your health data in Apple format (HealthKit), transform it into FHIR and then send it to the InterSystems IRIS for Health repository.
This information must be accessible via a web interface.
TL;DR: iPhone -> InterSystems FHIR -> Web Page.
- For the client part (iOS)
- Xcode 12
- For the server and Web app
- Docker
Not much to say here, open the AppStore, search for Xcode, Install.
Swift is Apple's programming language for iOS, Mac, Apple TV and Apple Watch. It is the replacement for objective-C.
Double click on Swift-FHIR-Iris.xcodeproj
Open the simulator by a click on the top left arrow.
Go to Health
Click Steps
Add Data
In the root folder of this git, run the following command:
docker-compose up -d
At the end of the building process you will be able to connect to the FHIR repository :
http://localhost:32783/fhir/portal/patientlist.html
This portal was made by @diashenrique.
With some modification to handle Apple's activity footsteps.
The app will first request you to accept to share some information.
Click on authorize
Then you can test the FHIR server by clicking on 'Save and test server'
The default settings point to the docker configuration.
If succeed, you can enter your patient information.
First Name, Last Name, Birthday, Genre.
The save the patient to Fhir. A pop-up will show you your unique Fhir ID.
Consult this patient on the portal:
Go to: http://localhost:32783/fhir/portal/patientlist.html
We can see here, that there is a new patient "toto" with 0 activities.
Send her activities:
Go back to the iOS application and click on Step count
This panel summaries the step count of the week. In our case 2 entries.
Now you can send them to InterSystems IRIS FHIR by a click on send.
Consult the new activities on the portal:
We can see now that Toto has two new observation and activities.
You can event click on the chart button to display it as a chart.
Most of this demo is built on SwiftUI.
https://developer.apple.com/xcode/swiftui/
Who is the latest framework for iOS and co.