# Project: Migrate EHR to Laravel - User & Roles Module

**URL:** <https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792>\
**Category:** Google Summer of Code\
**Tags:** ehr, 350-hour-project, gsoc2023-project, gsoc2023\
**Created:** [March 26, 2023, 12:23am UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792 "2023-03-26T00:23:06Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![muarachmann](https://forums.librehealth.io/user_avatar/forums.librehealth.io/muarachmann/32/2291_2.png) [@muarachmann](https://forums.librehealth.io/u/muarachmann)\
**Post date:** [March 26, 2023, 12:23am UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/1 "2023-03-26T00:23:06Z")

</div>

**Background:**

The [LibreHealth EHR](https://gitlab.com/librehealth/ehr/lh-ehr) is a great resource for training informaticians in a real-world patient workflow and documentation system. LibreHealth EHR is a free and open-source electronic health records and medical practice management application. The mission of LibreHealth is to help provide high-quality medical care to all people, regardless of race, socioeconomic status, or geographic location, by providing medical practices and clinics across the globe access to free-of-charge medical software. That same software is designed to save clinics both time and money, which gives practitioners more time to spend with individual patients, thereby supplying patients with higher-quality care.

**Project description:**

With many new enhancements under the hood and whole new MVC architecture using Laravel, the [LibreHealth EHR Laravel](https://gitlab.com/librehealth/ehr/lh-ehr-laravel) is moving to cutting-edge architecture using the PHP web framework.

The goal of this project is to migrate the whole **User’s Module** as it is it in the Legacy codebase into the new Laravel codebase. You should know that you might have to make any adjustments required if there need be in the current codebase as it will demand and work closely with other team members in order to transition to the new framework.

**NB** : You will be provided with a demo of EHR to facilitate your work during the project.

**Preliminary tasks:** You are required to do at least (1) and any other 2 task of your choice

1. [LH EHR SETUP - INITIAL TASK (LEGACY CODE) · Issue #27 · LibreHealthIO/lh-ehr-laravel · GitHub](https://github.com/LibreHealthIO/lh-ehr-laravel/issues/27)
2. Create a detailed [ReadMe](https://github.com/LibreHealthIO/lh-ehr-laravel#readme) for the new Laravel EHR project on how to install it, explaining where to find common modules, tech stack used etc.
3. Fix or suggest at least 2 PRs that implements feature from the Legacy codebase (NB: It could be anything like suggesting a button style, building a global component (input field) to fixing a broken link).
4. Design a mockup User Screen showing relevant forms to create/add a user and role(s).

**Skills required:**

- PHP (Laravel), HTML, CSS, JavaScript (VueJS) (required skills)
- SQL and MariaDB/MySQL (required skills)
- Tailwind CSS, InertiaJS (good to have)
- Designing Skills (good to have)

**Mentors:** @muarachmann and @tony

---

<div class="post-metadata">

**Author:** ![chaitak-gorai](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@chaitak-gorai](https://forums.librehealth.io/u/chaitak-gorai)\
**Post date:** [March 26, 2023, 8:50pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/2 "2023-03-26T20:50:37Z")

</div>

Hello, @muarachmann , I am Chaitak Gorai, a full-stack web developer with MERN, PHP, and MYSQL skills. I’m interested in the “Migrate EHR to Laravel” project for patient and user modules. This aligns perfectly with my skill set and interests, as I have experience working with Laravel and PHP/MYSQL, which is valuable in migrating the EHR to Laravel.

I have completed the 1st task ie the setup. It will be great if you guide me on how to proceed further.

---

<div class="post-metadata">

**Author:** ![muarachmann](https://forums.librehealth.io/user_avatar/forums.librehealth.io/muarachmann/32/2291_2.png) [@muarachmann](https://forums.librehealth.io/u/muarachmann)\
**Post date:** [March 26, 2023, 9:14pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/3 "2023-03-26T21:14:54Z")

</div>

Hi @chaitak-gorai with the legacy codebase: You will need to seed some data to better understand this can be found in `sql/nhanes/libreehr_nhanes.sql.gz` . Your goal is to go around the legacy codebase thoroughly so that you can understand how it works. If you have any doubts on what a particular stuff does, feel free to reply here.

You will need to identify the users module, the various roles and which users have access to what as this will be the core of your proposal.

You can submit PRs to add existing features of the legacy codebase in this revamp that will help assess your skillset e.g design wise, maybe fixing a broken stuff or adding a feature like forgot password etc.

Also you are expected to design a mockup UI of how adding/creating a user in the revamp will look like. Looking forward to seeing you around.

---

<div class="post-metadata">

**Author:** ![flako](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@flako](https://forums.librehealth.io/u/flako)\
**Post date:** [March 28, 2023, 6:07am UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/4 "2023-03-28T06:07:53Z")

</div>

My name is Obiasong Frank, a full stack software engineer with over eight years of experience. I have good experience working mainly with PHP, Laravel (versions 5.0 to 9), SQL and NoSQL databases, JavaScript, VueJS, and Tailwind CSS. I am interested and look forward to contributing very positively to the **Migrate EHR to Laravel - User Module** project. Thank you in advance for your consideration

---

<div class="post-metadata">

**Author:** ![chaitak-gorai](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@chaitak-gorai](https://forums.librehealth.io/u/chaitak-gorai)\
**Post date:** [April 4, 2023, 11:51am UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/5 "2023-04-04T11:51:10Z")

</div>

Hello @muarachmann , I was going through the legacy code base, After seeding the data I found that all the users have only one menu role “Default role” Is this what you were talking about or is it something else? Also in the “Add User” form, I found NewCrop eRX Role too. What are the differences between them? In the code base, i found code for creating and editing roles but was unavailable to find in the UI. Can you solve please my doubts?

---

<div class="post-metadata">

**Author:** ![muarachmann](https://forums.librehealth.io/user_avatar/forums.librehealth.io/muarachmann/32/2291_2.png) [@muarachmann](https://forums.librehealth.io/u/muarachmann)\
**Post date:** [April 4, 2023, 1:15pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/6 "2023-04-04T13:15:02Z")

</div>

Hello nice to see your interest in LH. Have you already submitted a proposal?

@chaitak-gorai the roles can be seen in the `Admin -> ACL` also when adding a user roles can be assigned to them via the add user in `Admin -> Users` also we want to give them `CRUD` acccess. I think Laratrust handle’s this well. So you will have to identify, suggest or remove any role/permission that is not necessary.

---

<div class="post-metadata">

**Author:** ![chaitak-gorai](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@chaitak-gorai](https://forums.librehealth.io/u/chaitak-gorai)\
**Post date:** [April 4, 2023, 4:20pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/7 "2023-04-04T16:20:23Z")

</div>

There was some missing part to be done in my resume. I just now completed it. It has been so late already. Here is my final doc [GSOC proposal LibreHealthIO - Google Documenten](https://docs.google.com/document/d/1I-xeYRM_q1Xc8A6X2-vYc7xYFchWb5MxN2wB3eU9hBU/edit?usp=sharing) . Any suggestions or improvements?

---

<div class="post-metadata">

**Author:** ![muarachmann](https://forums.librehealth.io/user_avatar/forums.librehealth.io/muarachmann/32/2291_2.png) [@muarachmann](https://forums.librehealth.io/u/muarachmann)\
**Post date:** [April 4, 2023, 4:47pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/8 "2023-04-04T16:47:10Z")

</div>

Great @chaitak-gorai . Can you grant me edit/comment access to review ? Also I don’t see the screen/designs of adding roles

---

<div class="post-metadata">

**Author:** ![chaitak-gorai](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@chaitak-gorai](https://forums.librehealth.io/u/chaitak-gorai)\
**Post date:** [April 4, 2023, 4:55pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/9 "2023-04-04T16:55:56Z")

</div>

I am giving you the access.

---

<div class="post-metadata">

**Author:** ![chaitak-gorai](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@chaitak-gorai](https://forums.librehealth.io/u/chaitak-gorai)\
**Post date:** [April 4, 2023, 5:00pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/10 "2023-04-04T17:00:46Z")

</div>

actually, the roles module was added later on so i wasn’t able to complete the design on time. Doing it now, hope so can complete it before the submission deadline.

---

<div class="post-metadata">

**Author:** ![chaitak-gorai](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@chaitak-gorai](https://forums.librehealth.io/u/chaitak-gorai)\
**Post date:** [April 4, 2023, 5:30pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/11 "2023-04-04T17:30:37Z")

</div>

I have submitted the final pdf with the add/remove role UI too and the changes you have suggested.

---

<div class="post-metadata">

**Author:** ![muarachmann](https://forums.librehealth.io/user_avatar/forums.librehealth.io/muarachmann/32/2291_2.png) [@muarachmann](https://forums.librehealth.io/u/muarachmann)\
**Post date:** [April 22, 2023, 7:34pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/12 "2023-04-22T19:34:07Z")

</div>

@chaitak-gorai can you continue working on you proposal here as to polish it?

---

<div class="post-metadata">

**Author:** ![chaitak-gorai](https://forums.librehealth.io/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@chaitak-gorai](https://forums.librehealth.io/u/chaitak-gorai)\
**Post date:** [April 22, 2023, 8:50pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/13 "2023-04-22T20:50:51Z")

</div>

Sure @muarachmann… please guide me on how to proceed. As you suggested, we will require the `Role` models before the `User` model. So should we proceed with that first? Any prerequisite tasks I should start working on now?

---

<div class="post-metadata">

**Author:** ![r0bby](https://forums.librehealth.io/user_avatar/forums.librehealth.io/r0bby/32/1781_2.png) [@r0bby](https://forums.librehealth.io/u/r0bby)\
**Post date:** [May 5, 2023, 10:36pm UTC](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4792/14 "2023-05-05T22:36:21Z")

</div>

## Communication should continue over here: [Project: Migrate EHR to Laravel - User & Roles Module](https://forums.librehealth.io/t/project-migrate-ehr-to-laravel-user-roles-module/4851)
