Week 3 -: GSOC'23 With LibreHealth

Week 3 -: GSOC'23 With LibreHealth

ยท

4 min read

In this blog series, I will be sharing my experiences, challenges, and achievements as I embark on this GSOC adventure. Join me as I dive into Week 3, where I kickstart my work and make significant strides toward my project goals.

How the week started ๐Ÿ“ˆ

  • The week kicked off with my focus on implementing the functionality to add, update, and retrieve baby details from the DHIS2 server. However, my mentor redirected my attention toward improving my previous merge request. Initially, I used the display names of tracked attributes to fetch their UIDs. Unfortunately, this approach would create issues during wide-scale implementation, as the display names are subject to change based on the App Localization settings.

  • To ensure a more robust implementation, it would have been wiser to fetch the attributes using their short names and maintain consistency across the NeoRoo implementation on the server. By using short names, we can avoid any potential complications arising from future localization changes.

  • Following the implementation, I became aware that the unit test was failing. Upon further investigation, I discovered a few crucial elements were missing from the implementation. Firstly, the initialization of hive repositories had been overlooked, which caused the failure. Additionally, the Mockito implementation for the user role was missing, further contributing to the test failure.

  • Lastly, I noticed that the local authentication Mockito was not present in the function responsible for testing the authentication section of the application. Addressing these omissions is essential to ensure the proper functioning of the unit test and to validate the authentication functionality of the application.

Things I Coded and the Problems It Solves ๐Ÿง‘โ€๐Ÿ’ป

  • I made substantial improvements to the previous merge request, which involved fetching attributes from the DHIS2 server. Initially, the implementation relied on fetching attributes using their display names. However, I enhanced it to utilize short names instead. This modification ensures a more reliable and future-proof implementation, as it mitigates potential issues arising from changes in display names due to App Localization.

  • To ensure the robustness of the application, I dedicated effort to enhancing the test cases associated with the authentication section and the Login BLoC. By incorporating the necessary adjustments into the existing Mockito code, I successfully enabled the fetching of user roles and local authentication scenarios. Furthermore, I took the initiative to initialize the hive storage within the Mockito framework, providing a solid foundation for accurate testing.

  • In addition to these improvements, I have recently begun working on a new feature. This feature entails implementing the functionality to add, update, and retrieve infant details from the DHIS2 server. By working on this feature, I aim to enhance the overall capabilities of the application and contribute to its seamless integration with the DHIS2 server.

Contributions of the Week:

Here is the link to the contribution for this week -:

Issue -: Enhancing Authentication Flow and Retrieving Essential Attributes from the Server.

Related Merge Request -: Fixes #38 Enhancing Authentication Flow and Retrieving Essential Attributes from the Server.

*********

Issue -: Test cases in test/authentication_test.dart failing to pass: Enhancements required for passing

Related Merger Request -: Fixes #46 Test cases in test/authentication_test.dart failing to pass: Enhancements required for passing.

Upcoming week: A Focus on Adding, Updating and Fetching Data from DHIS2.

Looking ahead to the next week, I have a clear plan of action to continue advancing the project. Here are the key tasks I aim to accomplish:

  • Next week, my primary focus will be on implementing the functionality to add, update, and fetch infant data from the DHIS2 server. This task is crucial for enhancing the application's capabilities and ensuring seamless integration with the server.

  • During this week, I have already taken the necessary steps to prepare for this operation. I have created the required attributes that will facilitate the addition, update, and retrieval of infant data. By proactively setting up these attributes, I am streamlining the implementation process and ensuring that the feature can be smoothly integrated into the application.

  • If time permits, I also plan to dedicate some effort to writing comprehensive test cases for this particular feature. Thorough testing is essential to validate the functionality, identify potential issues, and ensure the reliability and stability of the application. By investing time in creating effective test cases, I aim to deliver a high-quality and robust solution.

Did you find this article valuable?

Support Mehul Kumar by becoming a sponsor. Any amount is appreciated!

ย