GSoC 2023 with OpenMRS | Coding Week 11

Shubham Sharma
3 min readAug 14, 2023

--

The Google Summer of Code (GSoC) journey has been an incredible learning experience, and as the coding period draws to a close, it’s time to reflect on the progress made during Week 11. In this blog post, I’ll discuss the latest developments in the Android SDK of OpenMRS, specifically focusing on the integration of Drugs APIs and the Program, Program Workflow, and Program Workflow States APIs. Additionally, we’ll discuss the process followed to achieve these milestones and provide a sneak peek into the final week’s plans.

Expanding the OpenMRS Android SDK:

Over the past few weeks, significant strides have been taken to enhance the capabilities of the OpenMRS Android SDK. During Week 11, the focus was on integrating two crucial components: Drugs APIs and the Program-related APIs (Program, Program Workflow, and Program Workflow States). This expansion further empowers developers and users to manage and manipulate data effectively within the OpenMRS ecosystem.

The Development Process:

The approach to integrating these new APIs followed a familiar pattern. To begin, model classes were designed and implemented, laying the foundation for the subsequent layers of functionality. These classes serve as the building blocks that encapsulate data and behavior related to Drugs, Programs, and Workflows.

Following the creation of model classes, the development process proceeded to the implementation of the RestApi and RoomDAO methods. The RestApi facilitates online operations, allowing interaction with remote servers, while RoomDAO handles offline operations, enabling local data management. This dual approach ensures that the SDK remains versatile, catering to both online and offline scenarios.

Creating the Repository Classes:

The next step in the integration process involved the creation of a Repository class. This abstraction layer acts as a bridge between the data sources (online and offline) and the higher-level application logic. The Repository class provides an interface for performing operations related to Drugs, Programs, and Workflows. This architectural decision not only enhances code organization but also promotes reusability and maintainability.

Take a look at the Pull Requests I created:

Looking Ahead (The Final Week of Coding):

As the GSoC journey enters its final week, the focus will shift towards ensuring the robustness and reliability of the newly integrated APIs. Writing comprehensive tests for the added functionality will be a key priority. Thorough testing is essential to identify and rectify any potential issues, ensuring a smooth and error-free developer and implementer experience.

Moreover, the upcoming week will also involve an important task: converting Java code to Kotlin. Kotlin, with its concise syntax and modern features, has gained popularity in the Android development community. Migrating Java code to Kotlin not only improves code readability but also unlocks the potential for leveraging Kotlin’s advanced language constructs.

--

--