Week 13: Final GSoC Report

This is the last week of GSoC. After having fixed all the remaining bugs, we are now ready for release! Here is my entire report for the work done:

GSoC 2016

Targets:

  • Add a patient registration form.
  • Provide support for custom forms defined on a server.
  • Implement an offline mode, which allows to view patient’s historic data and enter new forms.
  • Release a new version of the client.

The work was neatly divided into issues on OpenMRS JIRA and subsequent pull requests on Github, and they are listed here, along with Weekly blog posts:

Week 10: Offline form submission

This week I finally added support for collecting form data online. I made a service to sync the data from the database using orm and send a request to create a new encounter. Also, I moved the entire visits checking and visits creation code to the service, so that the forms can be filled first and visits can be created later.

Next I will start working on the widget support.

Week 9: ORM

Once I got the Forms to work properly, I began working on making them work offline. For this I am syncing the forms once to a Database when the app opens and then referencing the forms from there. I am using ActiveAndroid ORM to save the objects.

Week 8: Bugfixes

This week I used the Forms Resources from REST to download and create forms instead of showing a static form from assets. There was also some refactoring and bug fixing done.

The two main clauses in my proposal are now over, all that remains are the details. Looking forward to finishing them!

Week 7: Notifications

Not a lot of work was done this week. I’m still awaiting the forms to be added to the devtest server so that I can fetch them at runtime.

Besides that, I added a new NotificationsUtil class under Utilities to display statusbar notifications throughout the app. Also, I consolidated the Notifier class with the ToastUtils class, so now a single class is used to display all Toast Notification types throughout the app.

Week 6: Encounters

This week I finished capturing the form entry and creating observations and encounters.

The workflow is that we open up a visit for a patient and then enter encounters, typically one encounter is one form. Under an encounter we put observations. Observations is for example temperature, so a question in a form is an observation.The important part is the concept uuid , which is for example the uuid of a temperature form field.

So now we finally have a dynamic form display system, followed by the capturing and saving of form data, all via JSON! We are now ready to ditch the odkcollect XForms system in the app.

 

 

Week 5: Midterms!

This week was slightly slow. I ran into a bug while writing patients to the database offline, and finding the problem cost me a good three days. Following this, I have started work on displaying the list of patients with the visit status before displaying the form list. It is nearly done. I also have to save the form entries as encounters, and I will work on this over the next couple of days.

Also, midterm evaluations are here, so we are supposed to make a short video highlighting our progress till now. Here’s the one that I could manage with my beginner level skills: