Giter Club home page Giter Club logo

opensrp / fhircore Goto Github PK

View Code? Open in Web Editor NEW
50.0 45.0 38.0 175.58 MB

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.

Home Page: https://smartregister.org

License: Apache License 2.0

Kotlin 99.66% Java 0.19% JavaScript 0.13% CSS 0.02%
android java kotlin fhir healthcare fhir-client android-fhir-sdk fhircore android-library kotlin-library

fhircore's Introduction

Android CI with Gradle Codecov Test Coverage License Zulip Chat Slack Chat

OpenSRP FHIR Core

FHIR Core is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and the WHO Smart Guidelines on Android.

FHIR Core is architected as a FHIR native digital health platform powered by Google's Android FHIR SDK and HAPI FHIR. FHIR Core's user experience and module oriented design are based on over a decade of real world experience implementing digital health projects with OpenSRP. This repository contains the Android mobile application built to:

  • load configuration data as FHIR resources,
  • support the WHO Smart Guidelines,
  • manage the identities of healthcare workers (HCWs), community health workers (CHWs), care teams, patients, and clients,
  • collect, view, and edit healthcare data with dynamic forms using FHIR's Structured Data Capture (SDC) implementation,
  • securely store healthcare data encrypted at rest and securely transmit healthcare data using TLS,
  • manage location hierarchies defined by community to national and international administrative boundaries.

For remote data storage and login, the mobile application requires:

FHIRcore also interoperates well with:

  • OpenSRP Web to access healthcare data from the same HAPI FHIR server.

Getting Started

Due to it's dependency on the Android FHIR SDK's workflow library, OpenSRP FHIR Core requires a minimum Android SDK version of Android 8.0 (API level 26).

This repository contains the folders

  • android: for building the Android application.
  • docs: a library of documents describing the FHIR Core solution.

We recommend reviewing the docs before setting up the Android Studio Project in the android folder.

For starter resources on the FHIR specification:

  1. Intro to FHIR - By James Agnew of Smile CDR
  2. FHIR resource list

For starter resources on the Android FHIR SDK and this repo:

  1. Android FHIR SDK Demo - Link
  2. Android FHIR SDK Intro Slide deck - Link
  3. FHIR Core Intro slide deck - Link

fhircore's People

Contributors

abdulwahabmemon avatar ahsanbhatti49 avatar allan-on avatar andati avatar aurangzaibumer avatar brandy-kay avatar debbiearita avatar dubdabasoduba avatar ekigamba avatar ellykits avatar f-odhiambo avatar fikrimilano avatar hamza-vd avatar kimigxfoxy avatar lentumunai-mark avatar lzrs avatar maimoonak avatar ndegwamartin avatar owais-vd avatar pld avatar qaziabubakar-vd avatar qiarie avatar raaziatarique avatar rkareko avatar rkodev avatar roywanyaga avatar sebamutuku avatar sharon2719 avatar shoaibmushtaq25 avatar vincent-karuri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fhircore's Issues

Vaccine Certificate Support

Add functionality to

  • Collect all the requisite information required to generate a vaccine certificate as defined by the FHIR International Patient Summary (IPS) being defined by the WHO Covid-19 Digital certificate working group. (The required resources will be made available via a FHIR API to be consumed by a program like DIVOC that is able to generate vaccine certificates.)

How to define and generate indicators

Applies to the mADX project for measure reporting. How do we go about defining a measure, running the measure operation to be able to generate a report of measures for tracking different defined indicators

G6PD - FHIR approach

We shall be mainly working on the following FHIR resources

  • Patient
  • Related Person (Optional ?)
  • Questionnaire
  • QuestionnaireResponse
  • Encounter
  • Observation
  • ServiceRequest
  • DiagnotsticReport
  • CarePlan
  • Location (Optional)

Later on, we can circle back and then link the ML kit portion

At the FHIR SDK the application will rely on the following :

  • Data Access API - Set of APIs for performing CRUD operations on FHIR resources in the SQLite DB
  • Search API - On-device fluent search API allows the application to compose complex search queries to filter FHIR resources and build lists
  • Data Capture API - SDC specification implementation
  • Sync API - Provides sync capabilities between a FHIR server and the local DB

NB. support for displaying forms and submitting (via Questionnaire/QuestionnaireResponse) and support for clinical decision support may also be core features

Common Features to the Core Android SDK app

  • Patient registration
  • Patient search
  • Patient profile view
  • Sync support
  • Multilingual support (Optional ?)

G6PD specific features

  • Image processing engine (IPE)
  • Results interpretation module (RIM)

Generation of Tasks

Generation tasks
This is can be a subproject on its own due to its complexity

Questionnaire response to a task generation

  • Who, When and how

Generation task offline
-Generation of tasks offline on the Android client

Patient Registration

User story :
As a CHW, I want to register a patient so that they can be enrolled on the platform.
The patient details will be based on the FHIR resource as a Questionnaire
Acceptance criteria :

  • On the landing page, you can view a list of already enrolled patients on the platform.
  • The patient list should show details of the patient (ID, Firstname, Lastname, Gener, DOB)
  • Click on the add patient button to be presented with a form to fill in patient details.
  • On clicking a patient you can view the patient profile (details here)

This is a subtask of #51

Web Discussion

As we look to a migration to FHIR there are several things we need to explore on the web front.

First, we will need to potentially support two versions of OpenSRP web. One that we can use to support current projects and one that runs fully off a FHIR backend like HAPI.

Current Functionality

  • User management - need to work on both OpenSRP web and HAPI
  • Locations - need to work on both OpenSRP web and HAPI
  • User permissions - ??

Patient Data View

We will use FHIR to view data for all OpenSRP projects. This mean patient views will be powered by a FHIR backend (eg. HAPI).

For existing projects, we will create a beam process to extract data from OpenSRP and into HAPI.

For the patient view we should explore multiple strategies:

Reveal

  • If we migrate Reveal to the FHIR SDK - we we'll need to evaluate how plan definitions would work in the future and if we would need to rebuild the UI for those.
  • we need to verify how team assignment would work and if the current opensrp web interface would support the plan location assignment.

Profile view

User story :
As a CHW, I want to view a patient's profile so that I can be able to view their bio-data and history

Acceptance criteria :

  • On the landing page, you can view a list of card that contain patient biodata such as name, address, telephone number
  • The patient profile can be extracted from patient & observation history FHIR resources
  • Allow for scroll view if details do not fit in the field of view

For covid app

  • Ability to show registered patients and their vaccine completion status. Eg. Completed Dose 1 of 2
  • Ability to click on the patient and view information and view information on the patient (eg. contact information) and vaccine services received.

Apply Operation - HAPI FHIR server vs CQF Lib

How will we run the apply operation from HAPI FHIR Server which is currently not supported to generate the plan/activity definitions?

Alternaternatives
Add the CQF ruler lib (CQF Ruler provides clinical reasoning on top of Hapi) - Can be part of the core codebase. If so who will be tasked to write that code base? (Google or Ona)

Configure questionnaires

Configure questionnaires to collect data for

  1. Registration
  2. Observation
  3. Immunization
  4. COVID-19 Screening

define a ResourceMapper

Resource Mapper will be used to convert QuestionnaireResponse to FHIR resources.

Documentation: FHIR SDC Extraction. Current resource mapper is definition-based extraction.

The current resourcemapper is still at early stages and needs some work. This was done as PoC.

Open Items

  • Moving away from extending HAPI fhir objects
  • Refactor ResourceMapper code
  • Testing parsing different types of widgets: string, date, radio button, checkboxes, integer
  • Merge ResourceMapperHAPI with the current ResourceMapper
  • Have the pr on android-fhir merged

Patient search

User story :
As a CHW, I want to do a basic search for a patient so that I can be able to retrieve their details

Acceptance criteria :

  • Filter by First name or Filter by the Last name
  • Display results
  • On clicking a patient show patient profile view

This is a subtask of #50

Complete Vaccine Registration flow

Add view and funtionality to

  • Enrol a patient in a Covid-19 vaccine care plan and record-related vaccinations
  • Capture the required information to generate a vaccine certificate for the international patient summary.
  • Easily author / adapt the vaccination form using SDC/FHIR questionnaires. This form when completed will be programmed to automatically update the appropriate FHIR resources (eg. Immunization). A form builder will not be included in the work but these forms can easily be authored with a tool like (https://lhcformbuilder.nlm.nih.gov)
  • Generate a Care Plan - When the patient has registered a care plan for Covid-19 will be set-up with tasks created for a single or multi-dose administration (depending on the vaccine being administered).

Support securely transmitting and storing data

This is a broad issue but includes encrypting data on the device, server and when transmitting it over the wire. This is supported in the current OpenSRP core and is part of the G6PD requirements.

Multi-Language support

We need a mechanism to support changing the app language based on preference by the app user. The SDK does this by checking the global setting of the phone and then setting the translation of the FHIR resource

  1. Add translation for different languages for LTR Locale
  2. Add translation for different languages for RTL Locale

Enroll clients in a clinical ANC program

Use the Android FHIR SDK to represent a real-world care journey without requiring Smart Guidelines

Mockups for covid-19 app needed

We need mockups for covid-19 app

  • Login page
  • Navigation drawer
  • Register page (search button included)
  • Search page
  • View patient profile
  • Add vaccine/care plan
  • View vaccination status
  • View vaccination certificate

Patient Search - Master

User story :
As a CHW, I want to search for a patient so that I can be able to retrieve their details

  • Search can be implemented based on FHIR parameters
  • Search will be based on the search API in the Android FHIR SDK

Acceptance criteria :

  • Clicking on the search icon should present you with a patient search screen - related to issue no #385
  • Able to add the search criteria via a selection list - related to issue #385
  • If the query returns a result, display search results and on select view and on click view patient details in a patient profile view
  • If the query is null result display not found message/notification

This issue is related to the below-listed issues on Android FHIR SDK. Part of the implementation will be done there

  • Investigate using DSL in Kotlin for search #57
  • Create a search panel in the patient list view in the reference app #385
  • Support contains for string search #376

Sub Tasks

  • Basic Patient search #20
  • Search from a list of patients (eg. pre-enrolled) in a FHIR datastore on the device or from the server #53
  • Filter and pagination #54
  • Handle "OR" in search filters #292

For ANC app

  • Ability to search from a list of patients (eg. pre-enrolled) in a FHIR datastore on the device or against the entire access permitted patient list on the health information system.

For the Covid app, we can add a filter in the search for

  • [Overdue](Filter patients whose second dose is overdue #176) - Missed appointment for/next jab
  • Record Jab - Start the care plan
  • Partially vaccinated - If had the first dose, the due date of 2nd dose
  • Vaccinated - If completed vaccination, view the certificate

Patient Registration - Master

User story :
As a CHW, I want to register a patient so that they can be enrolled on the platform.
The patient details will be based on the FHIR resource as a Questionnaire
Acceptance criteria :

  • On the landing page, you can view a list of already enrolled patients on the platform. - Design mocks will be required issue
  • The patient list should show details of the patient (ID, Firstname, Lastname, Gener, DOB)- Design mocks will be required issue
  • On clicking a patient you can view the patient profile (details here)
  • Click on the add patient button to be presented with a form to fill in patient details.
  • Provide an option to save the response which will be saved as an FHIR QuestionnaorResponse

Related item on Android FHIR SDK

Sub Tasks

  • Basic Patient registration #19
  • Input validation #56
  • Save FHIR resource to SQLite DB & Sync to FHIR server #55
  • Patient Profile view #22

FHIR authentication POC

From the discussion on hapi FHIR Authentication refer to document here
We need to extend the hapi fhir Authorization Interceptor to allow us talk to keycloak and obtain a login attempt response

How do we handle dynamically loading libraries with additional functionality?

We expect to have non-general functionality that we would want specific users to be able to load into the single app.

For example, we will implement an image processing engine that is only used by specific users completing questionnaires with a call out to image interpretation.

Conceptually, this is similar to app-store-like apps, e.g. the Roblox app, which is a single app that can load specific games that are not predefined or compile into the app.

Input Validation

Validate details as entered by the user for data types and also mandatory/optional fields based on the questionnaire

Building fhircore app

  • Currently, fhircore is part of android-fhir as a submodule.
  • There is a need to have fhircore standalone so that devs and anyone else can easily build
  • This will also allow CI/CD process to be set up

Sync and offline support

Save questionnaire resource to SQLite DB and ensure it syncs to FHIR server

  • Sync offline data for patient registration and vaccine administration automatically sync to the FHIR server.
  • Check for new patients/updates associated with that vaccine site or worker.

For ANC App

  • The application will be able to support all key workflows offline including patient registration and ANC visit administration. The app will be able to automatically sync with a FHIR server. This will include checking for new patients/updates associated with that.

Synchronization with the HAPI FHIR server

How to be able to go about saving locally stored FHIR resources from the SQLite DB to the HAPI FHIR server. MIght be done on the Android FHIR SDK. Link to similar issue in Android FHIR SDK

Data dictionary for covid-19 app needed

Data dictionary to define:-

  • Patient form questionnaire - fields required and the correct labels & translations
  • Vaccine form questionnaire - fields required and the correct labels & translations

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.