Logo

OpenMRS Android Client

Build Status Travis Build Status AppVeyor Demo Server GitHub version Codacy Badge codecov IRC

Table of Contents

Description

The purpose of this project is to provide an OpenMRS 2.x client for Android devices. The app is designed to cover most of the functionality currently on the web application. The app communicates with OpenMRS instances using REST. It supports working offline (without network connection). The database on the device is encrypted and password protected to secure patient data. For more information on the client, visit https://wiki.openmrs.org/display/projects/OpenMRS+2.x+Android+Client

Key Features

  • Connect to OpenMRS server and sync all data
  • Register and Edit patients
  • Record Visits and Encounters
  • View patient data (Details, Diagnoses, Visits, and Vitals)
  • Offline access

Screenshots

Login page

GSoC 2019

This project was also selected for Google Summer of Code 2019. More details can be found on the Project Wiki Page.

It was been selected as a candidate for Google Summer of Code 2017. Please visit the Project Wiki Page for more details.

The project was also a part of GSoC 2016, the details of which can be seen in the GSoC_2016.md file.

Development

We use JIRA to track issues and monitor project development. Refer to this link to view all issues and project summary: Android Client JIRA. To get started contributing, try working on introductory issues in JIRA and check out OpenMRS Pull Request Tips. Also, before creating a pull request, please run code review tools (Lint) and all tests.

Code Style

The coding conventions used by OpenMRS are outlined here. These can be applied to Android Studio by following the steps given below.

  1. Install Eclipse Code Formatter plugin in Android studio I. Go to Settings > Preferences > Plugins II. Select Marketplace and searh for the plugin by name. Then install it
  2. Copy the required XML
  3. Go to Settings > Eclipse Code Formatter and import the XML created in previous step
  4. Now go to Editor > Code Style in the same window
  5. Select Java in the menu on left and update values in Imports as shown in below picture Java:Imports settings
  6. Now select XML in the menu on left and update values in Tabs and Indents tab as shown in below picture XMLOther setings

Please follow the below instructions while contributing:

  1. When project is opened with Android Studio, go to File > Settings > Editor > Code Style
  2. Select Project from the Scheme dropdown
  3. Make sure that hard wrap is set to 125 for Java and XML language settings.

Model pattern

We are following Google's MVP sample for this application's development.

HTTP call debugging

In order to debug HTTP calls, we have integrated Android Snooper (a GUI based open source library) to track network calls. To use Android snooper, all you have to do is shake your device and snooper will present list of network calls made by OpenMRS app.

Quick Start

As of February 2016, this project has been migrated to gradle to work successfully with Android Studio.

Steps to set up:

  1. Fork the repository and clone your fork.
  2. From the Android Studio menu select File > New > Import Project. Alternatively, from the Welcome screen, select Import project.
  3. Navigate to the folder where you have cloned this repo and select the build.gradle file inside. Select Import.
  4. Done! Wait for dependencies to load and download from Maven, then you're ready to go!
  5. Make sure that you have the latest SDK and build tools downloaded, as we always build against the latest release.

In-depth tutorial

Note:

Demo Server

The demo test server dedicated to the client is (https://demo.openmrs.org/openmrs/).

Demo Username: admin
Demo Password: Admin123

Releasing [Collaborators only]

We follow the sprint model for development. Read more about it here: OpenMRS Sprints.

To release the application, make sure to do these steps in order:

  1. Update the version variable in build.gradle prior to the release.
  2. Update the Release notes section.
  3. Update the release notes text file to publish in the Play store. Ideally change the wording so that normal end users understand.
  4. Now commit with the title Release <version number here> to the master branch.
  5. Tag the commit, using the version as the tag name. Make sure CI is green!
  6. Go to the releases page and click the Draft a new release button. It will create a new version tag in the repository and build the app. The tag name will be used as the version number for this. Be sure to bump unfinished issues to the next due version.
  7. Go to JIRA's releases page, click on the three-dots on the right, and hit Release.
  8. [Optional] Post a new Talk thread and describe what is changed or improved in the release.

Release Notes

Version 2.8.1

Summary:

  1. Fix window leakage error when viewing patient details
  2. Fix various performance issues
  3. Integrate leak canary for debug builds
  4. Add a splash screen
  5. Add intro slides for first time users
  6. Set a code style
  7. Fix broken unit tests

Version 2.8.0

Summary:

  1. Add Dark mode to the app
  2. Provider management: admins can now find, add, edit and delete providers
  3. Refactor Repository names.
  4. Fix details not showing when searching patients

Version 2.7.4

Summary:

  1. Make UI more consistent and follow more of the material design specs
  2. Implement Initial Provider Management
  3. Remove redundant type cast
  4. Add Floating Action Button in patient's details tab

Version 2.7.3

Summary:

  1. Remove Apache HTTP API Client library
  2. Patient now extends Person
  3. Make Search primary function for Find Patients
  4. Revamp Settings Page (new material design!)
  5. Integrated android snooper for debugging purpose

Version 2.7.2

Summary:

  1. Added Kotlin dependency to app level build.gradle file
  2. Added release folder to gitignore
  3. Initialized SQLCipher, made app 64-bit compliant
  4. Changed Gradle to latest version
  5. Fixed Play Publisher not publishing to Play store

Version 2.7.1

Summary:

  1. Fixed bug on showing/hiding the password during login
  2. Visit Notes can now correctly show details
  3. Use Codecov as the code coverage tool
  4. Add privacy policy link to Settings page
  5. Re-developed OpenMRSLogger - faster loading times
  6. Most buttons now follow the material design guideline
  7. User is now taken back to the completed form on clicking cancel during registration
  8. Replace country selection with a country picker
  9. Setup Android Room and create entities
  10. Add Contextual Action Bar in Synced Patients to delete multiple patients at once

Version 2.7.0

Summary:

  1. Implement RxJava in DAOs and migration to AndroidX
  2. Pick patient photo when registering
  3. Login form improved and doesn't require login locations when no locations are configured
  4. Add data validation when registering patients
  5. Encrypted the database with BCrypt, derived from username and password
  6. Show toasts when toggling sync button and fixed crash when updating non-synced patient
  7. Saving user input when device is rotated, or when app instance is lost
  8. Added a Privacy Policy
  9. Renewed GitHub API Key
  10. Set a Custom Path to look for the Release APK

Version 2.6.2

Summary:

  1. Add patient picture
  2. Bug Fixes

Version 2.6.1

Summary:

  1. Handle camera and storage permissions manually
  2. Bug Fixes

Version 2.6.0

Summary:

  1. Fixed patient selection when changing orientation
  2. More user-friendly register form
  3. Added unit tests
  4. Filter patients by given/middle/family names at the same time
  5. Get data from DB in background task
  6. Lint check to GitHub Pull Requests

Version 2.5

Summary:

  1. Log in offline
  2. Coded fields in forms
  3. Edit forms
  4. Edit patients
  5. Lots of bug fixes

Version 2.4

Summary:

  1. Added merging patients registered offline
  2. Find Patient storyboard refactoring
  3. Fixed bugs

Objectives

Version 2.8+ (next releases)

Goals:

  1. Forgot Password
  2. Provider Relationship Module
  3. UI Improvements
  4. Analytics

User Manual

Check this link for the manual: Version 2.x

License

This project is licensed under the OpenMRS Public License, see the copyright file for details.

Resources