Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Projects

Page tree
Skip to end of metadata
Go to start of metadata


  Primary mentor                                                      Dennis Kigen       

Backup mentor

Assigned toChristopher Lumu 

Abstract

Currently OpenMRS  has a bunch of forms written in O3 in vanilla React. These forms, though functional, are not the most performant or extensible and for the most part, lack validation. React Hook Form offers easy-to-use validation out of the box, performance and tiny bundle size. The task is to refactor existing forms to use the React Hook Form library as well as Zod for schema validations.

Required Skills

  • Excellent  React, Typescript, HTML , CSS skills
  • Experience with or desire to learn about refactoring

Project Rating and length

Medium

175 hours

Objectives

  • To refactor the existing forms in the application using the RHF 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.

Identified forms to Refactor


There are
9 forms  that this refactor targets which include: 

  • Conditions form >>>>>1
  • Programs form>>>2
  • Allergy from >>>>>3
  • Start Visit form >>>>>
  • Visit Notes form >>>>>
  • Appointments form >>>>
  • Vitals and Biometrics form >>>>>>
  • Medication Order form >>>>>
  • Patient Registration (heaviest lift, written in Formik) >>>>>

Methodology

  1. Identify Forms to Refactor:
  2. Install and Configure RHF and Zod:
  3. Create RHF Form Components
  4. Integrate Zod for Schema Validation:
  5. Migrate Existing Form Data:
  6. Test and Debug:


Issues

Issue NumberIssue LinkPull RequestStatus


Weekly Reports/blogs

Final Presentation



Resources

OpenMRS 3.0: A Frontend Framework that enables collaboration and better User Experience
https://talk.openmrs.org/t/gsoc-2023-o3-migrate-vanilla-react-forms-to-rhf-project-updates-discussion/39625


  • No labels