Project Title: Migrating Vanilla react forms to React HookForm
Primary mentors: Hadijah Kyampeire , Denis Kigen
Contributor: Lumu Christopher
Project Link: GSoC 2023: O3: Migrate vanilla React forms to RHF
Overview
Openmrs had a requirement to improve the performance and maintainability of the existing React Forms in our application. The current forms had become less performant or extensible and difficult to manage as they grow in size and number of fields and for the most part lack validation. To address this, I proposed to refactor the existing forms using the React Hook Form (RHF) library and Zod for schema validation. React Hook Form offers easy-to-use validation out of the box, performance and tiny bundle size
Objectives
- To refactor the existing forms in the application using the ReactHookForm library.
- To introduce schema validation using the Zod library.
- To improve form performance and maintainability.
- Simplify form development and reduce the amount of boilerplate code required.
Contributions
Repository:
Jira Tickets epic
https://issues.openmrs.org/browse/O3-2138
Demos(video):
Mid term evaluation:
Final Evaluation: ( underway )
Summary
Here’s a summary of what I have done during the project:
- Initialization of the react hook form and zod dependencies (completed)
- Migrated the following forms,
- Conditions form Migration (completed)
- Programs form migration (completed)
- Visit Note form Migration (completed)
- Appointments form Migration (completed)
- Start visit form Migration (completed )
- Allergy form migration (completed )
- Vitals and Biometrics form Migration (completed)
- Medications order form migration (completed)
Future Work
Part of the work to be worked on includes but not limited to work on the patient registration form to use reacthookform and zod framework
Talk threads:
Weekly Blog Posts
Project Proposal
Thoughts on GSoC
My GSoC journey has been an incredible adventure of growth and discovery. From diving into complex coding challenges to collaborating with mentors and peers @ Jessie, every moment has been a valuable learning experience. The thrill of overcoming obstacles, the satisfaction of seeing my code come to life, and the supportive community members
I’d like to thank my mentors Hadijah Kyampeire and Denis Kigen ,their expertise, insights, and willingness to share their knowledge have been invaluable. Whether it was tackling complex challenges, exploring new technologies, or making critical project decisions, their mentorship has been the cornerstone.This project has helped me in understanding the O3 project at larg and developed a base for my further contributions.
Thank you OpenMRS.
Thank you Google.
cc: @jayasanka @kdaud @grace @dkigen @hadijah315 @jexsie @dkayiwa @samuel34 @mozzy @ndacyayisenga @agabaderrick @jnsereko