This is the iOS framework, written in Swift, for our C3-PRO research framework.
Combining 🔥 FHIR and ResearchKit, usually for data storage into i2b2, this framework allows you to use FHIR Questionnaire resources directly with ResearchKit and will return FHIR QuestionnaireResponse that you can send to your server. In addition, a FHIR Contract resource can be used to carry trial eligibility requirements and define content to be shown during consenting. Subsequently, the contract can be “signed” with a FHIR Patient resource and returned to your server, indicating consent.
There are additional utilities for encryption, geolocation, de-identification and data queueing that go well with a research app. These are individual modules, meaning you can use only the parts you need. See below for what’s included.
Taking a pure Swift approach, you will not be able to use this framework with Objective-C alone. Instead, you can use Swift code in your app, using a mix and match approach, to connect the C3-PRO components to the Objective-C bits in your app. See below for important Swift and FHIR version considerations.
master branch requires Xcode 8 and should always be compatible with the latest released version.
Swift 3.0 and
develop branch may contain new developments and have different requirements, it’s currently on
Swift 3 and
FHIR 1.6.0 (STU-3).
It is highly suggested that you use the
develop branch with the FHIR STU-3 ballot version at this time!
See the releases tab for previous releases, for newer versions look for
See CHANGELOG.md for updates. This framework combines several versioned technologies, here’s an overview over what’s included:
The framework consists of several modules that complement each other.
Shows the well-known “Welcome to my study” screens that allows users to inform themselves before joining your study.
➔ Study Intro
Eligibility & Consent
Using a FHIR
Contract resource representing the consent document, can render eligibility questions and the consenting workflow.
Enables use of a FHIR
Questionnaire resource as direct input to a ResearchKit survey task and return the encoded answers as a FHIR resource.
Also serves as return format of activity data collected on the phone.
DataQueue is a FHIR server implementation used to move FHIR resources, created on device, to a FHIR server, without the need for user interaction nor -confirmation.
HealthKit & CoreMotion (Activity Data)
ActivityReporter implementations for HealthKit and CoreMotion.
The latter includes persistence of activity data past the 7 days iOS default.
Extensions to HealthKit classes to easily query for samples and to represent quantities in FHIR.
System Service Permissions
Facilities to request permission to send notifications, access HealthKit and others.
These can be integrated into the Consent flow.
AES and RSA encryption facilities that come in handy.
These work with facilities officially exposed by iOS, meaning you don’t need to add OpenSSL to your app.
De-Identification & Geocoder
Helps creating de-identified patient resources, consistent with HIPAA Safe Harbor guidelines, with birthdate and ZIP (determined by Geocoder) truncated accordingly.
The framework uses
NSLocalizedString on the
C3PRO table name, meaning it’s looking at the C3PRO.strings file for string localization.
There is an extension on String so we can simply use
"My Text".c3_localized in code.
If you’re looking for localizable strings in code, search for this variable.