GSoC 2023 with OpenMRS | Coding Week 02
After a productive first week of the coding period, the second week has gracefully concluded as well. In this blog post, I will provide you with an insightful update on the progress I have made during Week 2 of my GSoC timeline.
Part 1: Adding Observation APIs to the Android SDK
This week, my focus was directed towards enhancing the “Observations” endpoint of the Android SDK, with the aim of simplifying interactions between implementers and the OpenMRS platform.
To achieve this goal, I dedicated my efforts to integrating numerous essential functions of the Observations into the SDK. This addition of functions will provide seamless communication with the OpenMRS endpoints. I have added support for both offline(for saving data to the local db on mobile) and online (for interacting with the server instance) operations for the patient observations.
It is important to note that observations form an integral part of the Encounter, which, in turn, is an essential component of a Visit within the OpenMRS framework. By expanding my focus to these interconnected elements, I am ensuring a holistic approach to the development process.
Looking ahead, my upcoming week I am willing to conclude the implementation of support functions for all three endpoints: Observations, Encounter, and Visit. Wrapping these endpoints together will provide a convenient and comprehensive understanding of how they interact with each other and if there is a need for any additional improvements.
Take a look at my PR for this work:
Converting the remaining codebase from Java to Kotlin
Long ago migration of java code to kotlin was started but still many files are written in Java.
This week I migrated the class `VisitRoomDAO.java` to `VisitRoomDAO.kt`.
This transformation is not as simple as pressing a button. It requires meticulous attention to detail and careful consideration of various factors. One crucial aspect we are focusing on is ensuring nullability in Kotlin. Kotlin’s strong null safety features allow us to write safer and more robust code, eliminating pesky null pointer exceptions that can lead to unexpected crashes.
Here’s the PR:
Thank you for reading and stay tuned for week 3 progress :)
Connect with me on LinkedIn: www.linkedin.com/amshubham