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
255 stars 176 forks source link

[Probable issue] No upper bound for weight in birth certificate #88

Open Agnieszka0544 opened 7 months ago

Agnieszka0544 commented 7 months ago

I'm not sure if it's an issue - this might be on purpose - but the baby weight in birth certificate may be set to absurd values like several tonnes. This is inconsistent with different forms (e.g. vaccination patient register) where age is restricted to 150 years.

pictures ![Zrzut ekranu 2023-12-07 164128-kopia](https://github.com/opensource-emr/hospital-management-emr/assets/121827184/af1a5165-5a50-48cb-afb6-80c86e5beb5e) ![Zrzut ekranu 2023-12-07 164155-kopia](https://github.com/opensource-emr/hospital-management-emr/assets/121827184/33e685ae-9e27-4cf5-83df-b0177472a235)
RamiSJ12 commented 4 months ago

If the issue you're encountering involves inconsistent data validation or constraints across different forms within the application, it's important to ensure that such inconsistencies are addressed to maintain data integrity and usability. Here are some steps you can take to handle this:

  1. Review Data Validation Rules: Check the data validation rules implemented in the birth certificate form. If there are no constraints set for the baby weight field, it could potentially allow absurd values like several tonnes. Implement appropriate validation rules to ensure that only realistic values are accepted.

  2. Implement Consistent Validation: Make sure that data validation rules are consistent across different forms within the application. If the vaccination patient register restricts age to a maximum of 150 years, consider implementing similar constraints for other relevant fields such as weight in the birth certificate form.

  3. Consider Realistic Limits: Determine realistic limits for the baby weight field based on typical newborn weights. Absurdly high values such as several tonnes are clearly unrealistic and should be prevented through proper validation.

  4. Error Handling: Implement error handling mechanisms to inform users when they input invalid data. Provide clear error messages indicating the reason for rejection and guidance on how to correct the input.

  5. User Experience Consideration: While enforcing strict validation rules is important for data integrity, it's also essential to consider the user experience. Provide helpful hints or suggestions for valid input values to assist users in filling out the form correctly.

  6. Testing and Feedback: Thoroughly test the forms to ensure that the implemented validation rules work as expected. Gather feedback from users to identify any usability issues or areas for improvement.

  7. Documentation: Document the validation rules and constraints applied to different fields within the application. This helps maintain consistency and provides reference for future development and troubleshooting.

By addressing these aspects, you can ensure that the application maintains consistent and realistic data validation across different forms while providing a user-friendly experience.