/android-fhir

The Android FHIR SDK is a Kotlin library for building offline-capable, mobile-first healthcare applications using FHIR resources on Android.

Primary LanguageKotlinApache License 2.0Apache-2.0

Android FHIR SDK (Early Access) master

The Android FHIR SDK (the SDK) is an Android library for building offline-capable, mobile-first healthcare applications using FHIR resources on Android. The overall goal is to simplify the process of incorporating support for FHIR into new or existing mobile solutions and to accelerate the adoption of FHIR standards as part of broader interoperability efforts in healthcare.

The SDK is a community collaboration. To submit feature requests and suggestions about specific use cases, see Feedback. To contribute to the codebase, see Contributing.

Status

This is currently in Early Access for Developers ONLY and is NOT production-ready. Do NOT use in production.

Usage

The SDK is designed to support Android 21 (lollipop) and above. Android Studio 4.0 is required for Java 8 library desugaring.

Libraries

The repository is organised into two main libraries, core and structured data capture.

Core library

This is the main library for building a mobile based clinical data repository using FHIR. It provides:

  • SQLite database for FHIR resources
  • APIs for accessing (create, read, update, and delete) FHIR resources in the database
  • APIs for searching FHIR resources in the database

Structured data capture (SDC) library Google Maven

This library is a partial implementation of the Structured Data Capture FHIR IG on Android. It includes the UI components and APIs to capture healthcare data using FHIR questionnaires.

The following code snippet renders a questionnaire using a FHIR questionnaire resource and an optional questionnaire response resource.

if (savedInstanceState == null) {
    val fragment = QuestionnaireFragment()
    fragment.arguments = bundleOf(
        QuestionnaireFragment.BUNDLE_KEY_QUESTIONNAIRE to questionnaireJsonString
        QuestionnaireFragment.BUNDLE_KEY_QUESTIONNAIRE_RESPONSE to
            questionnaireResponseJsonString
    )

    supportFragmentManager.commit {
        add(R.id.container, fragment, QUESTIONNAIRE_FRAGMENT_TAG)
    }
}

Sample Applications

Two sample applications are provided that demonstrate different features of the SDK.

These applications are provided for demonstration purposes only and are not for use in production. Do NOT use in production.

Clinical Data Repository (CDR) Application

This is the initial demo application for showcasing core SDK features and CQL proof of concept. The demo uses synthea generated data that has been loaded into the HAPI FHIR server public demo site.

CQL Proof of Concept

Within the CDR demo is an example of evaluating CQL using the CQL Engine.

SDC Gallery App

This app includes a number of pre-loaded sample FHIR Questionnaires.

It uses the SDC library to create data capture forms using FHIR questionnaires. For supported widgets, features and known bugs, see the latest release notes.

Contributing

The SDK is being developed by a consortium of application developers. We welcome contributions. Please see the project boards.

Feedback

If you want to provide any feedback, discuss use cases, raise feature requests, or simply want to get involved, please use the Discussions section, or email us at android-fhir-sdk-feedback@google.com.

Disclaimer

This is not an officially supported Google product.

This product is not intended to be a medical device.