Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Projects

Page tree
Skip to end of metadata
Go to start of metadata

 

Introduction:

 

OpenMRS already has a great app on the iOS platform and Parker Erway already made a fantastic job with the UI and the functionality of the app, And with the OpenMRS users on iOS increasing, It is time to take the app to the next step. v2.0.

 

About Me:

 

I’m a 4th year student at the department of Computer Engineering and Software Systems at Faculty of Engineering Ain-Shams University, I’m from Cairo, Egypt.

 

I'm a self taught programmer, I do my programming now in Python for applying machine learning algorithms that I'm currently studying and web development in Django, and contributing to C++/C projects, and most of my education at college was in java, But my favourite programming language by far is Objective-C.

 

My Github: https://github.com/yousefhamza

I have contributed to many Open source projects including OpenMRS and other iOS app, and other projects in different domains.

 

I also love problem solving on online Judges like SPOJ, CF and TC.

Roadmap:

 

  • v1.2 (Stepping up the code) --pre-GSOC--

    • Add User experience enhancements.

    • Finish Already existing TODOs in the codebase.

    • Fixing JIRA tickets.

    • Refactoring the code.

    • Put a “CodingStyle” file for future contributors.

    • Integrate the code base with Travis CI.

    • Update the OpenMRS-iOS Development Guide.

  • v1.3 (Stepping up the app)

    • Make the app universal so iPad users *for now* can get an iPad sized app.

    • View current active visits.

    • Edit patients’ information from the app.

    • View offline saved patients with indicator are they synced with their online profiles or not.

    • Better patient view.

    • Implement synchronisation technique between offline saved data and their corresponding profiles on the server.

      • with option to disable it always, or just on WiFi.

    • Add support for other languages.

    • Add support for state restoration.

    • Add support for dynamic type.

      • UI Adapting to changes in device settings like font size.

    • Update OpenMRS-iOS User Guide.

  • v1.4 (iPad version)

    • Optimizing the app UI to the make better use of the iPad.

  • v2.0 (Filling forms capabilities)

    • Users can download, fill and upload forms from within the app.

    • Update the OpenMRS-iOS Development Guide.

    • Update OpenMRS-iOS User Guide.



Toward v1.2:

 

I already started working on the tasks I just mentioned in v1.2, I made several pull requests to the app repo that has been merged.

 

here’s a taste of the user enhancement tweak that make it easier for the user and contribute to the data integrity:

             


 

Before

After

 

 

 

Also there’s already some TODOs put by Parker that I found during working on the codebase like better handling for errors like for saving to CoreData.

 

And also re-orgnaizing the code from a single folder containing all the code to separate several files by functionality in the app, View controllers, Models, Services.. etc



Stepping up the app v1.3:

 

I have this idea that we can start by making the app available on the iPad instead of using the iPhone version on the iPad.

Making that real can’t be any easier with 0 code modification thanks to Parker Erway job with UI, Just Setting: Deployment info>Devices to “Universal” instead of only iPhone.

 

Mockups for demonstrating the changes in v1.3:



 

Before

After

 

 

  

  

  

 

 

 



New REST APIs utilized in v1.3:

 

 

REST API

Functionality

GET:

http://server:8080/openmrs/ws/rest/v1/visit?includeInactive=false

   Get all the active visits.

POST:

http://server:8080/openmrs/ws/rest/v1/patient/{uuid}

   To edit patients info.

 



iPad Version v1.4:

 

iPads are quite often used in the health industry and that raises the need to deliver a better experience for the iPad, my optimisations for the iPad design is derived by mainly 2 principles:

  • Make more use of the iPad specific UI elements

  • Bigger UI elements specifically the ones tabbed on by the user.



Next you will see a mockups to demonstrate the kind of optimisations made to the UI.

 

Mockups:

 

Filling forms capabilities v2.0:

The Big Picture:

 

The app will send request to get the xforms from an OpenMRS server with xforms module installed, the user chooses a form to fill, The form is downloaded to the App as XML, then parsed and a corresponding GUI objects will be generated that’s displayed to the user to fill the form. Check the sequence diagram below.


Implementing OpenMRS specs “Mobile Data Collection Project”:

 

The main parts to be created in the mobile application to comply to the project is:

  • Presentation Layer.

  • XForm Controller.

  • XForm Model.

  • Application Shell.

 

Presentation Layer -XForm View-:

 

The presentation layer requirements is “1 question per screen interface”, And that’s what I’m going to implement here, some examples of the UI is shown in the mockups below -The example of the UI shown below is based on the demo of ODKClinic on youtube and to give an idea of how it’s going to look on iOS:

 

 

 

 

 

 

 

 

For audio Input I will be using an external library, right now I found EZAudio to be the most popular one, but that’s subject to change in the future, example of the UI below:

XForm Controller and XForm Model:

 

Under Mobile Data Collection Project, there’s a listed description and diagrams describing the structure of of the module to be implemented in the mobile application, So I’m going to use that. And my XML Library of choice to be used in parsing will be NSXMLParser and here’s why:

  • It’s the default one in the iOS SDK so no overhead of using external library and reducing the application dependency.

  • It’s a SAX parser which is required to achieve the sequence diagram of the Mobile XForm module.

  • It supports XPath and Event-Driven XML.

 

*The sequence diagram below is from Mobile XForm Module Documentation.



The Application Shell:

 

Already exists.

 

New REST APIs utilized in v2.0:



 

REST API

Functionality

http://server:8080/openmrs/moduleServlet/xforms/xformDownload?target=xformslist&uname=name&pw=password

   Get all xforms available.

http://server:8080/openmrs/moduleServlet/xforms/xformDownload?target=xforms&uname=name&pw=password

   Get the Forms.

http://server:8080/openmrs/moduleServlet/xforms/xformDataUpload?uname=name&pw=password

   Upload filled forms.

*with property xforms.useEncounterXform to True on the server to enable editing existing encounters.

 


Diagrams for final output:

 

These diagrams demonstrate the final state of the whole iOS app.

Use-Case Diagram:

 

High-Level Diagram:

My time allocation for the project:

May 2015

June 2015

July 2015

August 2015

  • Red: working 15 hours/week -Final exams-

  • Yellow: working 25 hours/week

  • Green: working 40 hours/day



Deliverables:

 

Goals:

  • Every deliverable has been debugged extensively on different scenarios.

  • Every deliverable is 100% done and has 0 TODOs.

  • Every deliverable is well documented on the OpenMRS website for the community.

  • Every deliverable can be submitted to the public on the App Store.

 

Dates:

 

 

Date

Deliverable

27 / 4 / 2015 - 7 / 5 / 2015

   v1.2 (Stepping Up The Code)

Week 1

  • Make the app universal so iPad users *for now* can get an iPad sized app.

  • View current active visits.

Week 2

  • Better patient view

Week 3

  • Edit patients’ information from the app.

  • View offline saved patients with indicator are they synced with their online profiles or not.

  • Implement synchronisation technique between offline saved data and their corresponding profiles on the server.

Week 4

  • Add support for other languages.

  • Add support for state restoration.

  • Add support for dynamic type.

  • Update OpenMRS-iOS User Guide.

Week 5

  • Implementing SplitView for search

  • Applying some iPad specific views

Week 6

  • Apply iPad specific views to the rest of the app

  • Update OpenMRS-iOS User Guide

Week 7 - Week 9

*Work on the 8th week will be lighter

  • Implementing the chooser part of the XForm Chooser

  • Implementing the UI related for List of XForms and downloading the XForms

  • Start working on the XForm parsing engine

  • Continue implementing XForm parsing engine

  • Testing XForms parsing engine

Week 10

  • Implementing XForms controller

  • Starting implementing the presentation layer (Text, Numerical)

Week 11

  • Continue working on presentation layer (Complex [audio, video], concept sets)

Week 12 - August 17th

  • Release it as beta to be tested by the community

  • Continue testing the app XForms part specifically

  • Responding to Community feedback

  • Update the OpenMRS-iOS User/Developer manual