GSoC 2023 Final Work Submission Report

GSoC 2023 Final Work Submission Report

ยท

7 min read

Project: Migrate EHR to Laravel - User & Roles Module

Introduction

I am excited to present my final work submission report for the Google Summer of Code (GSoC) 2023 project: "Migrating LibreHealth EHR to Laravel: Roles and Users Module." Over the past few months, my focus has been on working on implementing a robust Roles Module and an efficient Users Module using Laravel. In this report, I will provide an overview of the project, its goals, my contributions, and the key lessons and challenges encountered during this journey.

About the Project

The LibreHealth EHR application is a robust, clinically-focused electronic health record (EHR) system designed to cater to the diverse needs of healthcare settings. It combines ease of use right from the start while offering extensive customizability for various healthcare environments. Building upon the foundation of the LibreHealth Toolkit, this application inherits the wealth of experience gained from years of development with OpenEMR. It stands as a testament to modernity, offering an intuitive and efficient experience for healthcare professionals in their daily work.

Project Admin: Robby O'Connor

Project Mentors: Mua Rachmann, Tony McCormick

Project Scope: Migration to Laravel: Users and Roles Module

The essence of my GSoC 2023 project revolved around the migration of the LibreHealth EHR to the Laravel framework. Specifically, my tasks were concentrated on implementing the Users and Roles modules within this newly adopted Laravel architecture.

  • Roles Module:

    • Create roles to govern specific access rights to various facilities and sections within the LibreHealth EHR project.
  • Users Module:

    • Facilitate the addition of new users to the system.

    • Implement user management features for efficient administration.

What I Did

Throughout the GSoC 2023 program, I was actively engaged in implementing the crucial roles and user modules for the LibreHealth EHR system. These modules serve as the backbone of user management and access control within the application. Additionally, I introduced a separate Invitation Module to streamline user invitations. Here is a detailed breakdown of my accomplishments:

Roles Module:

In the Roles Module, I undertook the following tasks:

Designed Intuitive User Interface: I crafted an intuitive user interface that simplifies the process of adding and viewing roles. The aim was to make role management as user-friendly as possible. As shown in the image there is a 'Add-Role' form on the left side of the page where we can add role details like name, display name, and description and then select the permissions for the roles. On the right side, we can view the existing roles and click on "More Details" for the role details page.

Roles Details Page: To facilitate effective role management, I created a detailed Roles Details Page. This page provides comprehensive insights into each role, the permissions the role has and the user this role is assigned to.

Laravel Seeder Scripts: I developed Laravel Seeder scripts tailored for Laratrust roles and permissions. These scripts automate and standardize the role-creation process, ensuring consistency and reliability. This will not only help us to create the basic roles but also ensure each role has specific crud access to the different modules in the project.

Here is the part of the seeder which shows how the roles are created for 'admin' and 'users'

Invitation Module:

The Invitation Module was introduced to enhance user onboarding through streamlined email invitations. Here's what I accomplished in this module:

Dedicated Invitation Class: I crafted a dedicated invitation class designed to simplify the process of email invitations and related operations. This class optimizes the invitation workflow, ensuring a smooth user registration experience.

Here how the invitation class looks like:

Efficient DataTable with Filtering: I implemented a DataTable with server-side filtering capabilities. This feature allows administrators to efficiently manage user invitations, improving the overall user management process.

Users Module:

Within the Users Module, I focused on enabling efficient user management and customization:

Add User Form UI: Added the form to add user details and select the facility and role of the user. After filling up the form an invitation mail is sent to the user to accept the invitation and set up the account password.

This is what the invitation mail looks like. We can use different designs to customise the invitation mail later on.

User List with DataTable: I developed a User List with DataTable functionality. This powerful tool simplifies user administration by providing a dynamic and sortable list of users.

User Profile and Edit User: I designed User Profile and Edit User features, allowing for enhanced user customization. This empowers users to tailor their profiles to their specific needs.

Role-Based Access Control:

Finally, I implemented role-based access control throughout the LibreHealth EHR system. This critical security feature ensures that only authorized individuals can access specific routes and perform designated actions, safeguarding sensitive healthcare data.

For this, I have used the default roles and permission middleware provided by Laratrust in the routes to give only selective access to the roles.

As in the given example below only the roles with permission 'calendar-read' can access the calendar route and only the super_admin and admin can access the roles-related routes.

Challenges and Important Lessons

Throughout the GSoC 2023 program, I encountered several challenges and learned valuable lessons:

Collaboration and Open Source: Collaborating with a diverse group of developers from the open-source community taught me the importance of effective communication and teamwork.

Software Development Best Practices: Applying best practices in software development, such as testing, documentation, and code organization, is vital for creating robust and maintainable systems. Throughout the program, I made many silly mistakes. I am thankful to my mentor. He always suggested to me the best practices I should follow.

Problem Solving: Gaining experience in troubleshooting and problem-solving within a real-world software project has been incredibly rewarding.

What's Next

In the immediate future, I plan to focus on the following:

  • Polishing the Code: I will continue to refine and optimize the codebase, ensuring that it meets the highest standards of quality and performance.

  • Testing and Quality Assurance: Comprehensive testing and debugging will be an ongoing effort to ensure the reliability and stability of the Users and Roles Module.

  • Documentation Enhancement: I will work on enhancing the documentation to make it even more user-friendly and developer-friendly.

Additionally, I am excited about the prospect of contributing further to different modules of the LibreHealth EHR project. This journey has been an incredible learning experience, and I look forward to continuing my collaboration with the LibreHealth community to further improve healthcare technology.

Additional Details

Weekly Report: Reports

Project Chat: Forum

Conclusion

In conclusion, my journey through GSoC 2023 has been nothing short of transformative. I feel incredibly grateful for the opportunity to contribute to the LibreHealth EHR project, and I'm excited about the promising developments that lie ahead.

I want to express my heartfelt gratitude to the entire LibreHealth organization for their unwavering support and the warm welcome into their open-source community. Your dedication to improving healthcare through technology is truly inspiring.

A special thanks goes out to my mentor, Mua Rachmann, whose guidance and mentorship were invaluable throughout this program. Your expertise and patience have been instrumental in helping me navigate the challenges and make meaningful contributions.

I also want to extend my appreciation to everyone who followed my progress through the weekly blogs. Your interest and encouragement have motivated me to strive for excellence in every aspect of this project.

As I continue my journey in the world of open-source development, I look forward to further collaboration with the LibreHealth community and contributing to the evolution of healthcare technology. This GSoC experience has been a stepping stone towards a future filled with exciting opportunities and innovative solutions.

Thank you once again to GSoC, LibreHealth, my mentor, and everyone who has been a part of this incredible journey. Here's to a brighter, healthier future through the power of open-source technology! โœจ๐Ÿš€

ย