opensource-emr / hospital-management-emr

A complete open source for electronic healthcare record management in Hospitals, Clinics and Pharmacy.
https://opensource-emr.github.io/hospital-management-emr/
MIT License
278 stars 196 forks source link

Cannot input age greater than 150 days in vaccination form #86

Open Agnieszka0544 opened 10 months ago

Agnieszka0544 commented 10 months ago

Environment: Windows 11; Firefox 120.0.1, Edge 119.0.2151.97, Chrome 120.0.6099.71 When you go: Vaccination -> Patient List -> New Vaccination Patient and fill out the form with an age of 151 days or more, the value won’t be accepted and "Age is required" will be displayed.

video https://github.com/opensource-emr/hospital-management-emr/assets/121827184/3c19f2e3-1f5d-47b3-aa69-8b23f925d71a
RamiSJ12 commented 6 months ago

To address the issues you've described:

  1. Age Validation: It seems there's an issue with the age validation in the form where entering an age of 151 days or more isn't accepted, and instead, "Age is required" is displayed. To fix this, you need to adjust the validation rules for the age field to accept ages greater than 150 days. This likely involves updating the JavaScript code responsible for validating the form input.

  2. "Family Head Name" Auto-Update: The problem with the "Family Head Name" not auto-updating likely stems from an error in the form's scripting or database handling. To resolve this issue, you'll need to review the code responsible for populating the "Family Head Name" field and ensure it's functioning correctly. This may involve debugging the code to identify any errors or misconfigurations that are preventing the auto-update feature from working as intended.

Here are the steps to address these issues:

  1. Inspect and Modify Age Validation: Review the JavaScript code that handles the age validation in the vaccination patient form. Look for the part of the code that sets the constraints for the age field and adjust it to allow ages greater than 150 days.

  2. Debug "Family Head Name" Auto-Update: Review the code responsible for populating the "Family Head Name" field in the form. Check for any errors or issues that may be preventing the auto-update feature from functioning properly. Debug the code to identify and fix any issues.

  3. Test Thoroughly: After making changes to the form's code, thoroughly test the form in different browsers (Firefox, Edge, Chrome) to ensure that both the age validation and "Family Head Name" auto-update are working as expected.

  4. Deploy Fixes: Once you've confirmed that the issues are resolved, deploy the fixes to the production environment.

  5. Monitor for Further Issues: Keep an eye on the form's functionality after deploying the fixes to ensure that no new issues arise. If any issues are reported, investigate and address them promptly.

  6. Document Changes: Document the changes made to the form's code and any adjustments to the validation rules for future reference.

By following these steps, you should be able to address the age validation issue and fix the problem with the "Family Head Name" not auto-updating in the vaccination patient form.